Skip to content

Commit

Permalink
work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrin committed Dec 18, 2024
1 parent 3a7ae40 commit da21e23
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
15 changes: 10 additions & 5 deletions stpsf/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@

JWST_TYPICAL_LOS_JITTER_PER_AXIS = 0.0008 # milliarcseconds jitter, 1 sigma per axis. = approx 1 mas rms radial, typically


# ad hoc, highly simplified models for charge diffusion within detectors
# These values are PLACEHOLDERS and should be updated based on comparisons with data and ePSFs (ongoing)
# Note, these are parameterized as arcseconds for convenience (and consistency with the jitter paramater)
Expand Down Expand Up @@ -410,10 +409,16 @@

# Alignment information about instrument internal pupil masks (
INSTRUMENT_PUPIL_MASK_DEFAULT_POSITIONS = {
'NIRCam_MASKSWB': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_MASKLWB': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_MASKRND_SW': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_MASKRND_LW': {'pupil_shift_x': -0.012, 'pupil_shift_y': -0.023, 'pupil_rotation': -0.60}, # from K. Lawson, fits to ERS progid 1386 data
'NIRCam_SWA_MASKSWB': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_SWA_MASKLWB': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_SWA_MASK210R': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_SWA_MASK335R': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_SWA_MASK430R': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_LWA_MASKSWB': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_LWA_MASKLWB': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_LWA_MASK210R': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'NIRCam_LWA_MASK335R': {'pupil_shift_x': -0.012, 'pupil_shift_y': -0.023, 'pupil_rotation': -0.60}, # from K. Lawson, fits to ERS progid 1386 data
'NIRCam_LWA_MASK430R': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'MIRI_MASKFQPM_F1065C': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'MIRI_MASKFQPM_F11140': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
'MIRI_MASKFQPM_F1550C': {'pupil_shift_x': None, 'pupil_shift_y': None, 'pupil_rotation': None},
Expand Down
7 changes: 6 additions & 1 deletion stpsf/stpsf_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,12 @@ def _get_pupil_mask_alignment(self, lookup_key=None):
return 0, 0, None

if not lookup_key:
lookup_key = self.name + '_' + self.pupil_mask
if self.name == 'NIRCam':
# This is complicated. Depends on the channel, and the image plane mask used...
# TODO more work needed here.
lookup_key = f'{self.name}_{self.channel[0].upper()}W{self.module}_' + self.pupil_mask
else:
lookup_key = self.name + '_' + self.pupil_mask

values = []
for param in ('pupil_shift_x', 'pupil_shift_y', 'pupil_rotation'):
Expand Down

0 comments on commit da21e23

Please sign in to comment.