-
Notifications
You must be signed in to change notification settings - Fork 13
Fixes needed for IFU/LMS mode #376
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
Changes from all commits
ba9df7a
2522e3a
1c27b55
710636a
671b4f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -109,9 +109,9 @@ def make_strehl_map_from_table(tbl, pixel_scale=1*u.arcsec): | |||||
| return map_hdu | ||||||
|
|
||||||
|
|
||||||
| def rescale_kernel(image, scale_factor, spline_order=None): | ||||||
| def rescale_kernel(image, scale_factor, spline_order=None, cmds=None): | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I appreciate why this is here, but I would prefer to keep I would suggest deleting the call to
Suggested change
|
||||||
| if spline_order is None: | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| spline_order = utils.from_currsys("!SIM.computing.spline_order") | ||||||
| spline_order = utils.from_currsys("!SIM.computing.spline_order", cmds=cmds) | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, if we remove this here, then it is not necessary to add Note that you can comment on multiple lines at a time by "dragging the plus down" next to the lines in the diff view. |
||||||
| sum_image = np.sum(image) | ||||||
| image = zoom(image, scale_factor, order=spline_order) | ||||||
| image = np.nan_to_num(image, copy=False) # numpy version >=1.13 | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -495,7 +495,7 @@ def remake_kernel(self, x): | |||||
| def wavelength(self): | ||||||
| wave = from_currsys(self.meta["wavelength"], self.cmds) | ||||||
| if isinstance(wave, str) and wave in tu.FILTER_DEFAULTS: | ||||||
| wave = tu.get_filter_effective_wavelength(wave) | ||||||
| wave = tu.get_filter_effective_wavelength(wave, cmds=self.cmds) | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same here as above. I feel it would be better to force the
Suggested change
|
||||||
| wave = quantify(wave, u.um).value | ||||||
|
|
||||||
| return wave | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,9 +50,9 @@ | |||||||
| PATH_SVO_DATA = PATH_HERE.parent / "data" / "svo" | ||||||||
|
|
||||||||
|
|
||||||||
| def get_filter_effective_wavelength(filter_name): | ||||||||
| def get_filter_effective_wavelength(filter_name, cmds=None): | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as before, lets delete the currsys call
Suggested change
|
||||||||
| if isinstance(filter_name, str): | ||||||||
| filter_name = from_currsys(filter_name) | ||||||||
| filter_name = from_currsys(filter_name, cmds=cmds) | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| wave, trans = download_svo_filter(FILTER_DEFAULTS[filter_name], | ||||||||
| return_style="quantity") | ||||||||
| eff_wave = np.sum(wave * trans) / np.sum(trans) # convert from Angstrom | ||||||||
|
|
||||||||
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 assume these assert statements are fine for now, and because this whole class is METIS specific, and nobody is going to screw too much with the current status quo in the METIS IRDB, these will not affect anything down the line. Or?
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.
These asserts should not affect anything. I kept them in because maybe they are a canary that could indicate that something is wrong. What could go wrong is that someone changes
__init__()of one of the super classes (e.g.Effect) to delete everything inself.meta. This will highlight if that happens.