pynrc.NIRCam¶
NIRCam base instrument class
Creates a NIRCam instrument class that holds all the information pertinent to
an observation using a given observation. This class extends the NIRCam subclass
webbpsf_ext.NIRCam_ext
, to generate PSF coefficients to calculate an arbitrary
PSF based on wavelength, field position, and WFE drift.
In addition to PSF generation, includes ability to estimate detector saturation limits, sensitivities, and perform ramp optimizations.
- Parameters
filter (str) – Name of input filter.
pupil_mask (str, None) – Pupil elements such as grisms or lyot stops (default: None).
image_mask (str, None) – Specify which coronagraphic occulter (default: None).
ND_acq (bool) – Add in neutral density attenuation in throughput and PSF creation? Used primarily for sensitivity and saturation calculations. Not recommended for simulations (TBI).
detector (int or str) – NRC[A-B][1-5] or 481-490
apname (str) – Pass specific SIAF aperture name, which will update pupil mask, image mask, and detector subarray information.
autogen_coeffs (bool) – Automatically generate base PSF coefficients. Equivalent to performing
self.gen_psf_coeff()
. Default: True WFE drift and field-dependent coefficients should be run manually viagen_wfedrift_coeff
,gen_wfefield_coeff
, andgen_wfemask_coeff
.
- keyword wind_mode
Window mode type ‘FULL’, ‘STRIPE’, ‘WINDOW’.
- kwtype wind_mode
str
- keyword xpix
Size of window in x-pixels for frame time calculation.
- kwtype xpix
int
- keyword ypix
Size of window in y-pixels for frame time calculation.
- kwtype ypix
int
- keyword x0
Lower-left x-coord position of detector window.
- kwtype x0
int
- keyword y0
Lower-left y-coord position of detector window.
- kwtype y0
int
- keyword read_mode
NIRCam Ramp Readout mode such as ‘RAPID’, ‘BRIGHT1’, etc.
- kwtype read_mode
str
- keyword nint
Number of integrations (ramps).
- kwtype nint
int
- keyword ngroup
Number of groups in a integration.
- kwtype ngroup
int
- keyword nf
Number of frames per group.
- kwtype nf
int
- keyword nd1
Number of drop frame after reset (before first group read).
- kwtype nd1
int
- keyword nd2
Number of drop frames within a group (ie., groupgap).
- kwtype nd2
int
- keyword nd3
Number of drop frames after final read frame in ramp.
- kwtype nd3
int
- keyword nr1
Number of reset frames within first ramp.
- kwtype nr1
int
- keyword nr2
Number of reset frames for subsequent ramps.
- kwtype nr2
int
- keyword PSF Keywords
- keyword ============
- keyword fov_pix
Size of the PSF FoV in pixels (real SW or LW pixels). The defaults depend on the type of observation. Odd number place the PSF on the center of the pixel, whereas an even number centers it on the “crosshairs.”
- kwtype fov_pix
int
- keyword oversample
Factor to oversample during WebbPSF calculations. Default 2 for coronagraphy and 4 otherwise.
- kwtype oversample
int
- keyword include_si_wfe
Include SI WFE measurements? Default=True.
- kwtype include_si_wfe
bool
- keyword include_distortions
If True, will include a distorted version of the PSF.
- kwtype include_distortions
bool
- keyword pupil
File name or HDUList specifying telescope entrance pupil. Can also be an OTE_Linear_Model.
- kwtype pupil
str
- keyword pupilopd
Tuple (file, index) or filename or HDUList specifying OPD. Can also be an OTE_Linear_Model.
- kwtype pupilopd
tuple or HDUList
- keyword wfe_drift
Wavefront error drift amplitude in nm.
- kwtype wfe_drift
float
- keyword offset_r
Radial offset from the center in arcsec.
- kwtype offset_r
float
- keyword offset_theta
Position angle for radial offset, in degrees CCW.
- kwtype offset_theta
float
- keyword bar_offset
For wedge masks, option to set the PSF position across the bar.
- kwtype bar_offset
float
- keyword jitter
Currently either ‘gaussian’ or None.
- kwtype jitter
str or None
- keyword jitter_sigma
If
jitter = 'gaussian'
, then this is the size of the blurring effect.- kwtype jitter_sigma
float
- keyword npsf
Number of wavelengths/PSFs to fit.
- kwtype npsf
int
- keyword ndeg
Degree of polynomial fit.
- kwtype ndeg
int
- keyword nproc
Manual setting of number of processor cores to break up PSF calculation. If set to None, this is determined based on the requested PSF size, number of available memory, and hardware processor cores. The automatic calculation endeavors to leave a number of resources available to the user so as to not crash the user’s machine.
- kwtype nproc
int
- keyword save
Save the resulting PSF coefficients to a file? (default: True)
- kwtype save
bool
- keyword force
Forces a recalculation of PSF even if saved PSF exists. (default: False)
- kwtype force
bool
- keyword quick
Only perform a fit over the filter bandpass with a lower default polynomial degree fit. (default: True)
- kwtype quick
bool
- keyword use_legendre
Fit with Legendre polynomials, an orthonormal basis set. (default: True)
- kwtype use_legendre
bool
Module Attributes
Use Coronagraphic ND acquisition square? |
|
SIAF aperture name for detector pixel to sky coords transformations |
|
Return bandpass throughput |
|
Include coronagraphic substrate material? |
|
Dictionary housing detector info parameters and keywords. |
|
Detector selected for simulated PSF |
|
Detectors on which the simulated PSF could lie |
|
The pixel position in (X, Y) on the detector, relative to the currently-selected SIAF aperture subarray. |
|
Fast readout direction in sci coords |
|
Currently selected filter name (e.g. |
|
List of available filter names for this instrument |
|
Currently selected image plane mask, or None for direct imaging |
|
Observation with coronagraphic mask (incl Lyot stop)? |
|
Is a Lyot mask in the pupil wheel? |
|
|
|
Exposure timings in dictionary |
|
Number of wavelengths/PSFs to fit |
|
A dictionary capable of storing other arbitrary options, for extensibility. |
|
Detector pixel scale, in arcsec/pixel |
|
PSF parameters |
|
Filename or fits.HDUList for JWST pupil mask. |
|
Currently selected Lyot pupil mask, or None for direct imaging |
|
Filename or fits.HDUList for JWST pupil OPD. |
|
Perform quicker coeff calculation over limited bandwidth? |
|
Coefficient save directory |
|
Coefficient file name |
|
SCA ID (481, 482, . |
|
SIAF Aperture object |
|
Give all possible SIAF aperture names |
|
Slow readout direction in sci coords |
|
Wavelength range to fit |
|
Detector well level in units of electrons |