-
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 rebin mod post fit fix #116
base: master
Are you sure you want to change the base?
Conversation
Not yet... did not mean to push a change to my home dir path in utils/helpers.py. Will revert temporarily. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #116 +/- ##
==========================================
- Coverage 41.07% 40.82% -0.26%
==========================================
Files 21 21
Lines 2858 2878 +20
==========================================
+ Hits 1174 1175 +1
- Misses 1684 1703 +19 ☔ View full report in Codecov by Sentry. |
@karllark, I am not given the option to formally request a review (but can convert to draft?), so feel free to take a look and see what you think. |
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.
Some changes/responses needed.
new_uncs[j] = np.sum(full_flux_uncs[cspec][k][indxs]) / len(indxs) | ||
|
||
# assign rebinned flux values to flux arrays | ||
self.waves["STIS"] = new_waves |
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.
Shouldn't this be cspec
instead of "STIS"
?
full_fluxes = {} | ||
full_flux_uncs = {} | ||
full_fluxes[cspec] = np.zeros( | ||
(self.n_models, len(moddata.data[cspec].fluxes)) | ||
) | ||
full_flux_uncs[cspec] = np.zeros( | ||
(self.n_models, len(moddata.data[cspec].fluxes)) | ||
) |
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.
This seems like it is in the wrong place. Will this not re-initialize these variables for every value of k
? This does not seem like the correct behavior.
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.
Almost feel that the self.n_models
can be removed and just do full_fluxes and full_flux_uncs for each model. There is no need to have information about a previous model for rebinning, right?
if self.temps_width2 == 0: | ||
self.temps_width2 == 1.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.
Is there a reason these 2 lines (and the other two sets of two lines below) are removed? These are needed in case the width in a model parameter is zero (e.g., input a list of files w/o any variation in that parameter).
Adds the option to rebin the model spectra to a given resolution over a WL range.
Rebinning structure is slightly different than in stardata.py but method is identical.