You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ericasaw reports that PR #89 affected the behavior of rtell files, with a shift in the uncertainty scaling. Tracking down the cause of the discrepancy was tricky because there are so many conditional control flows (nested if statements).
I propose a solution to refactor and modularize these into three main IGRINS use cases:
We should have two or three separate functions: init_rtell_spectrum(fn) and init_spec_spectrum(fn) and init_spec_A0V_spectrum(fn) or equivalent names.
Then we can simplify the sequencing substantially:
if"rtell"infn:
output_spectrum=`init_rtell_spectrum(fn)`# and so on [...]
There will be significant code duplication among these three functions, but that's OK for now. We can modularize some of those subroutines later. But currently the intermingling of the scenarios is making it tricky to see what is happening at-a-glance.
This fix is aimed at code sustainability and readability.
The text was updated successfully, but these errors were encountered:
Kyle I "assigned" you just to keep you in the notification loop, and because you were the author of the PR, but really anyone is invited to work on this if you have the time and energy.
I am currently fixing some issues with the signal-to-noise files (and S/N stored in the rtell files) propagating the correct uncertainty. I think I have a fix ready for later today. It is all intertwined with this mess of nested if statements I will submit a pull request and then in the same branch we can look into modifying the code for this, but please wait until the signal-to-noise issue is fixed later today so we don't have the code diverge.
Okay the uncertainty propagation issues should be fixed now in PR #89. My tests show I get the same uncertainty no matter what combination of .spec.fits, .spec_a0v.fits, .sn.fits, .variance.fits, and rtell files are used (rtell files combine the uncertainty of the standard star with the science target so if the science target is bright, the SNR will be lower). Please feel free to test the branch in the PR.
@gully to be clear, are you suggesting IGRINSSpectrumList and IGRINSSpectrum classes be split into three different versions to handle the .spec.fits, .spec_a0v.fits, and rtell files?
@ericasaw reports that PR #89 affected the behavior of rtell files, with a shift in the uncertainty scaling. Tracking down the cause of the discrepancy was tricky because there are so many conditional control flows (nested
if
statements).I propose a solution to refactor and modularize these into three main IGRINS use cases:
We should have two or three separate functions:
init_rtell_spectrum(fn)
andinit_spec_spectrum(fn)
andinit_spec_A0V_spectrum(fn)
or equivalent names.Then we can simplify the sequencing substantially:
There will be significant code duplication among these three functions, but that's OK for now. We can modularize some of those subroutines later. But currently the intermingling of the scenarios is making it tricky to see what is happening at-a-glance.
This fix is aimed at code sustainability and readability.
The text was updated successfully, but these errors were encountered: