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
updated BUNIT to proper units #284
Conversation
Thanks! This PR fixes the BUNIT for fluxcalib output. Could you also add BUNIT for cframe? In that case I think it is completely missing. |
It is completely missing, but the cframe files seem to be generated using the same write_frame function as the frame files. Since these two files do not have the same output flux units, this may be why the BUNIT keyword is not included. If desired, I could simply write a new function or change the current one to distinguish between the outputs. Also, I'm assuming the stdstars output should also include the factor of 1e-17 as well? If so, this is a simple fix. |
Good point. Let's add an optional if units is not None and 'BUNIT' not in hdr:
hdr['BUNIT'] = str(units) That should work for And then update the code that calls
Yep. |
I have set the BUNIT for frame files to photons/bin and cframe files to 1e-17 erg/s/cm^2/A. |
We had a misunderstanding about my suggestion for how to propagate units to the frame files. Implementing it was easier than re-describing it, so I went ahead and changed it. Since we do propagate header keywords from inputs to outputs, I would like to run an integration test on this to check if we end up with any intermediate steps with incorrect BUNITs. i.e. don't merge yet; I'll fix or report any problems, then merge. |
I made a number of small changes:
I checked this with an integration test to make sure that BUNITs weren't incorrectly propagated from one file type to another. After the Travis tests pass I think this is ready to merge. Thanks @rstaten for getting this started. |
This PR: