Skip to content

Commit

Permalink
fix AstroDataF2.camera() logic to not require pixel_scale() (so it wo…
Browse files Browse the repository at this point in the history
…rks on 1D spectra)
  • Loading branch information
chris-simpson committed Dec 21, 2022
1 parent 6d3a37a commit cf79749
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions gemini_instruments/f2/adclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,16 @@ def camera(self, stripID=False, pretty=False):
# [2022-02-22] The LYOT keyword is now being used to store filters as
# well as LYOT mask. Therefore, that keyword cannot be reliably used
# to return the camera string.

if self.pixel_scale() > 0.10 and self.pixel_scale() < 0.20:
camera = "f/16_G5830"
else:
camera = self.lyot_stop()
camera = self.lyot_stop()
if camera is None or not camera.startswith("f/"):
focus = self.phu.get("FOCUS", "")
if not re.match('^f/\d+$', focus):
# Use original pixel scale
pixscale = (self.phu["PIXSCALE"] if 'PREPARED' in self.tags
else self.pixel_scale())
focus = "f/16" if pixscale > 0.1 else "f/32"
# Make up component number (for now) should f/32 happen
camera = focus + ("_G5830" if focus == "f/16" else "_G9999")

if camera:
if stripID or pretty:
Expand Down

0 comments on commit cf79749

Please sign in to comment.