-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major update for initializing via a file, ingest of spectra, generalizing constraints, scripts, etc. #51
Conversation
This pull request introduces 1 alert when merging ed7bc13 into 8c21419 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 1 alert when merging 8838ea3 into 8c21419 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 1 alert when merging a017f7c into 8c21419 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
Ready for review. Lots of changes! @alexmaragko , @jdtsmith , @els1 , @ThomasSYLai : you can see the documentation that will be on readthedocs once this pull request is merged at http://www.stsci.edu/~kgordon/pahfit/. |
Hi Karl,
I will look at it on Friday (Alexandros and I sit together to work on PAHFIT on Friday afternoons).
Best regards,
Els
…---------------------------------------------------------------------------------
Els Peeters | Associate Professor
Dept. of Physics & Astronomy, University of Western Ontario
SETI Institute
Tel: +1 519 661 2111 x80973
e-mail:epeeters@uwo.ca, epeeters@seti.org
www:http://www.astro.uwo.ca/~epeeters
---------------------------------------------------------------------------------
On Feb 25, 2019, at 1:18 PM, Karl Gordon ***@***.***> wrote:
That's a stellar idea. I'd be happy to walk through all the updates in person. Apologies for this large PR - lots of changes needed to get the code read for "easy" use by others.
Those not in Tucson next week, please go ahead and look at the PR if you have time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Great. Thanks @els1! |
I wonder if it would be valuable to have one default input unit, for example mJy, in case units are not provided. Is the plan to convert unit implicitly to an internal f_nu unit system? |
Yes the units are converted currently in Jy and microns in run_pahfit.py lines 66-71. It's not clear to me thought how it gets the current units from the ipac file (which currently has units of Jy and microns). Otherwise if no units are assigned before converting it would raise an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Looking forward to trying out the new version!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 2.0 getting ready...
Major changes to enable a fit to be done starting with a file instead of the code setup of parameters, etc. Building off the work already done by @alexmaragko on the write/read functions for an astropy Table format file. Later the more flexible YAML file format will be added. But for now, just getting things working for v2.0.
Should address (or partially address) issues #46, #31, #28, #27, and #1.
Generalized the parameters for all the components. Now all can have limits and be fixed. This includes the temperatures for the blackbody components. This means that the user can specify the starting values for all variables, fix any variable, and provide constraints (or not) for any variable. Significant code changes were required to make this possible for all variables.
Plotting script created to plot saved results.
Code that can be run (e.g., run_pahfit or plot_pahfit) moved to be in the scripts directory. These scripts are installed when installing pahfit allowing these scripts to be run from any directory w/o giving the full path to the script.
Renamed the "base" of PAHFIT from PAHFITBase.py to base.py. This makes imports easier. E.g., 'from pahfit.base import PAHFITBase' instead of 'from pahfit.PAHFITBase import PAHFITBase'.
First real continuous integration test code. Tests if the "classic" pack file on disk (in ipac format) matches a static version encoded in python code. Ensures that the classic data file does not change. Keeping the python code to allow this test as well as providing an example of generating pack info from code instead of via a file (interesting for advanced users). This test naturally emerged from checking the save/read code and revealed bugs. Instead of making it a one-off test, I went ahead and made a continuous integration test that will run with every pull request ensuring no such bugs reemerge!
Starting documentation for running pahfit and plotting the results via the run_pahfit and plot_pahfit scripts. Docs updated for this pull request can be seen at http://www.stsci.edu/~kgordon/pahfit/ (after PR merged, these docs will appear automatically at the readthedocs link).
Added support and command line option for reading in observed spectra. Includes support for units
through astropy.units. This requires that the input observed spectrum file has units defined.