-
Notifications
You must be signed in to change notification settings - Fork 63
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
Roman Prism and Grism #416
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #416 +/- ##
===========================================
+ Coverage 64.06% 64.47% +0.41%
===========================================
Files 11 11
Lines 4352 4408 +56
===========================================
+ Hits 2788 2842 +54
- Misses 1564 1566 +2
Continue to review full report at Codecov.
|
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.
Looks good overall. See below for a few small requests for revisions but nothing big.
Note, I have not reviewed any of the data values within the new files, either for the aberration coefficients or the filter transmissions. I assume you have double checked those values are are they should be.
# Update Aberrations | ||
# ------------------ | ||
# Check if _aberrations_files has been initiated (not empty) and if aberrations are locked by user | ||
if self._aberrations_files and not self._is_custom_aberrations: |
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.
Why the check for if the aberrations files are empty? Under what circumstances would that be the case?
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.
When the class is initialized, with super(WFI, self).__init__("WFI", pixelscale=pixelscale)
, the filter is set to a new value in that function. We can not fill in self._aberrations_files
before the super.__init__
call because the self._datapath
attribute is not yet initialized. So we have to initialize self._aberrations_files
to be empty and check for when super.__init__
sets the filter, so the code does not crash.
If we define self._datapath
before super.__init__
, this will not be needed. But I thought this was the safest way forward.
From @Skyhawk172 :
|
from . import webbpsf_core | ||
from scipy.interpolate import griddata | ||
|
||
from scipy.interpolate import griddata, RegularGridInterpolator |
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.
RegularGridInterpolator is not needed anymore now that we've simplified the handling of the extrapolation case.
from astropy.io import fits | ||
import astropy.units as u | ||
import logging | ||
|
||
from . import webbpsf_core | ||
from .optics import _fix_zgrid_NaNs |
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.
_fix_zgrid_NaNs is not needed anymore now that we've simplified the handling of the extrapolation case.
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've done a series of tests and all my results indicate that the implementation is correct. We will be examining the results closer to understand some interesting features (e.g. FWHM), but it does appear those features are the result of the reference data provided to us by GSFC.
Added data to v1.0.0rc2 and tests are passing |
This PR introduces the Prism and Grism modes for the Roman WFI based on cycle 8 design. It also introduces the ability to user override the aberrations files used to construct detectors.
This PR means #382 can be closed (any time).
Updates
WebbPSF
GRISM_FILTER = 'G150'
PRISM_FILTER = 'P120'
G150
orP120
changes the mode of the WFI and the aberrations files (unless there is a user aberrations override)WFI._aberrations_files
: Dictionary with all default aberrations files paths. Dictionary key is the WFI mode.WFI._load_detector_aberrations(path)
: Class function to load aberrations files atpath
WFI. _get_filter_mode (wfi_filter)
: given a filter (string),wfi_filter
, return the WFI mode. WFI modes are:WFI.mode
: Class property that returns the current mode of the WFI instance by passing the current filter toWFI. _get_filter_mode
WFI.override_aberrations(aberrations_path)
: Overrides and locks the current aberrations with aberrations ataberrations_path
. Lock means changing the filter/mode has no effect on the aberrations.WFI.reset_override_aberrations()
: ReleasesWFI.override_aberrations
lock and start using the default aberrations.WebbPSF Data
wim_zernikes_cycle8_prism.csv
andwim_zernikes_cycle8_grism.csv
aberrations files.webbpsf-data/WFI/filters.tsv
to add 'G150' and 'P120' (nlambda
set to 20)G150
andP120
from PandeiaSample PSFs