Skip to content

Commit

Permalink
add prism_motor_steps descriptor to support flat association with HR-…
Browse files Browse the repository at this point in the history
…IFU and sci-ops prism mechanism reproducability workarounds Apr-2024
  • Loading branch information
phirstgemini committed Apr 18, 2024
1 parent bf3b6c4 commit ce7d8ab
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gemini_instruments/gnirs/adclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,27 @@ def well_depth_setting(self):
else:
return "Unknown"

def prism_motor_steps(self):
"""
Returns the PRSM_ENG header value, which is the step count of the prism
mechanism. This is needed to associate HR-IFR (at least) flats correctly
following discovery in Apr-2024 that the prism mechanism does not
position with sufficient reproducability for the HR-IFU. Thus, sci-ops
will tweak the step count on the fly at the start of a sequence, taking
"dummy" flats to do so. The correct flat to use must have the same
prism_eng value as the science.
Returns
-------
PRSM_ENG value from the PHU as an int, or None if unable.
"""

try:
return int(self.phu.get('PRSM_ENG'))
except (ValueError, TypeError):
return None


# --------------------------------------
# Private methods
def _grating(self, stripID=False, pretty=False):
Expand Down

0 comments on commit ce7d8ab

Please sign in to comment.