-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add iue miri lrs and improve iue support #127
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #127 +/- ##
==========================================
+ Coverage 39.47% 40.73% +1.26%
==========================================
Files 22 22
Lines 3035 3071 +36
==========================================
+ Hits 1198 1251 +53
+ Misses 1837 1820 -17 ☔ View full report in Codecov by Sentry. |
d9a2512
to
d39c3aa
Compare
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.
Hi Karl,
Looks good overall, mostly corrected some typos, and added a few comments here and there to improve clarity.
docs/data_formats.rst
Outdated
@@ -4,19 +4,90 @@ | |||
Data Formats | |||
############ | |||
|
|||
The data for each stars is stored in a combination of an ASCII "DAT" file |
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.
The data for each stars is stored in a combination of an ASCII "DAT" file | |
The data for each star are stored in a combination of an ASCII "DAT" file |
iue_table["ERROR"] = Column(np.full((len(iue_table)), 1.0)) * fluxunit | ||
|
||
rb_iue = merge_iue_obsspec([iue_table]) | ||
rb_iue["SIGMA"] = rb_iue["FLUX"] * 0.0 |
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.
What is the point of multiplying the flux by 0?
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.
And what is the difference between ERROR and SIGMA?
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.
Multiplying by zero gives zero uncertainties. These are models, hence there is not uncertainty (ERROR or SIGMA). No difference, just words meaning the same thing. Different observed data uses different words for the uncertainty.
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.
Added more comments.
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.
Still somewhat confused here. For the iue_table["ERROR"], you set the values to 1, but for the rb_iue["SIGMA"], you set them to 0. Is there a particular reason for that? I guess in the second case, you could just set them to 0 instead of multiplying the flux by 0 (which I assume takes less memory/time).
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.
The ERRORs are used in the merging as weights. Hence setting them to 1 gives all the points equal weights. But in the end, there are no uncertainties on models, hence setting them to 0 for the final result makes sense.
@@ -4,7 +4,7 @@ | |||
Data Formats | |||
############ | |||
|
|||
The data for each stars is stored in a combination of an ASCII "DAT" file | |||
The data for each stars are stored in a combination of an ASCII "DAT" file |
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.
The data for each stars are stored in a combination of an ASCII "DAT" file | |
The data for each star are stored in a combination of an ASCII "DAT" file |
assert ckey in otable.keys() | ||
|
||
nowaves = len(otable["WAVELENGTH"]) | ||
np.testing.assert_allclose(otable["FLUX"], np.full(nowaves, 1.5)) |
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.
I'm still confused.
If flux1=1, flux2=2, w1=1 and w2=0.5, then the weighted average is:
(f1w1+f2w2)/(w1+w2) = 2/1.5 = 1.3333
iue_table["ERROR"] = Column(np.full((len(iue_table)), 1.0)) * fluxunit | ||
|
||
rb_iue = merge_iue_obsspec([iue_table]) | ||
rb_iue["SIGMA"] = rb_iue["FLUX"] * 0.0 |
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.
Still somewhat confused here. For the iue_table["ERROR"], you set the values to 1, but for the rb_iue["SIGMA"], you set them to 0. Is there a particular reason for that? I guess in the second case, you could just set them to 0 instead of multiplying the flux by 0 (which I assume takes less memory/time).
Add in support for MIRI LRS. Includes StarData read and merge_obsspec merge functions. Included mocking of spectra from the stellar atmosphere models.
Add in support for mocking IUE spectra from stellar atmosphere models.
Expands documentation for the format of the DAT and spectra files and how to generate the spectra files.
Add in tests on the merge functions in merge_obsspec.
Switched from deprecated pkg_resources to importlib for getting paths.