Giter Site home page Giter Site logo

pmoired's Introduction

I am an 🔭astronomer🔭 keen on sharing my experience and expertise via my codes! I thouroughly check my implementations for accuracy, but these are still research codes, and they may contain bugs: If you use my codes, please give me feedback (report issues, request features, etc). The codes below have reference publications, and have been used in more than 80 refereed publications as of mid-2023.

pmoired's People

Contributors

amerand avatar astro-mh avatar kywzor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pmoired's Issues

Arbitrary profiles don't seem to work

Trying to run the example for arbitrary radial profiles causes an error.
Am I doing something wrong?

param = {'diam':1.0, 'profile':'$MU**$alpha', '$alpha':0.1}

data.doFit(param)

[dpfit] 2 FITTED parameters: ['$alpha', 'diam']
[dpfit] using scipy.optimize.leastsq
Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 8, in
data.doFit(param)

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/init.py", line 191, in doFit
self.bestfit = oimodels.fitOI(self._merged, model, fitOnly=fitOnly,

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/oimodels.py", line 1795, in fitOI
fit = dpfit.leastsqFit(residualsOI, tmp, firstGuess, z, verbose=verbose,

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/dpfit.py", line 361, in leastsqFit
scipy.optimize.leastsq(_fitFunc, pfit,

File "/usr/lib/python3/dist-packages/scipy/optimize/minpack.py", line 383, in leastsq
shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)

File "/usr/lib/python3/dist-packages/scipy/optimize/minpack.py", line 26, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/dpfit.py", line 673, in _fitFunc
model = func(x, params)

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/oimodels.py", line 1615, in residualsOI
res = np.append(res, residualsOI(o, param, timeit=timeit))

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/oimodels.py", line 1646, in residualsOI
m = VmodelOI(oi, param, timeit=timeit)

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/oimodels.py", line 884, in VmodelOI
return VsingleOI(oi, param, imFov=imFov, imPix=imPix, imX=imX, imY=imY,

File "/home/pboley/.local/lib/python3.8/site-packages/pmoired-0.1.dev0-py3.8.egg/pmoired/oimodels.py", line 423, in VsingleOI
Ir = eval(tmp)

File "", line 1
_mu**$alpha
^
SyntaxError: invalid syntax

Wrong results starting from a specific position

Hello,
I discovered, trying to loop over a bunch of files extracted from OiDB for a technical comparison that starting from "bad" values often converge to wrong results.

This seems the case starting to fit a disk from diameter=0. It probably exists a way to avoid such cases and this may point to other related numerical issues ? I know that other tools sometimes add the smallest values just to avoid an exact 0, but this is all I can say ;)

I may have skipped some of your documentation...

Thank you for your tool!

Guillaume

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.