perwin / imfit

Imfit: an open-source astronomical image-fitting program.
www.mpe.mpg.de/~erwin/code/imfit/
GNU General Public License v3.0
33 stars 7 forks source link

Add InclinedFlatSky model #8

Closed danjampro closed 4 years ago

danjampro commented 4 years ago

Hi @perwin, I have been working on a project that required an inclined (flat) sky plane model, similar to the one available in GALFIT. Since I wanted to use Imfit for its superior speed, I decided to add such a model. Perhaps you would like to merge it with the main code?

I have tested it out locally but have not added any additional unit tests. If you are interested then perhaps we can discuss how to proceed on that front.

perwin commented 4 years ago

Thanks! I'm kinda busy at the moment (propsals, etc.), but I'll try to take a look at this in the next week.

perwin commented 4 years ago

Hi -- Sorry for the long delay in dealing with this!

I've added a function called TiltedSkyPlane which basically does the same thing as your function, except that it also defines the center (where I = I_sky, or I_0 in my version) using the X0,Y0 coordinates of the function block. This is equivalent to your function if X0=Y0=0. (This makes it a little easier to set things up -- e.g., if you know that the sky in your data image is ~ 200 at x,y = 400,1200, then you can set up X0=400,Y0=1200,I_0=200 as the initial parameter values.)

perwin commented 4 years ago

I haven't formally accepted your pull request into the repo, but that's only because of the weird development setup I'm still using, where I use mercurial on my main computer and a mercurial-to-git translator to update things on Github. But I'll be sure to credit your original idea in the source code, changelog, etc. (Am I correct in inferring that @danjampro = "Dan Prole"?)

danjampro commented 4 years ago

Hi @perwin, sorry, I missed your previous comments. Thanks for implementing this useful feature. And yes, your inference is correct!

perwin commented 4 years ago

If you'd like to be added to the Imfit mailing list, send me an email address to use. (It's basically just for new-version announcements, about once or twice a year; I'll probably make a new version -- including your suggested inclined-plane background -- available in the next few weeks.)