Skip to content

Commit

Permalink
genred instrument recognition problem
Browse files Browse the repository at this point in the history
was causing problems with colours
  • Loading branch information
trmrsh committed Jun 3, 2021
1 parent c00d7c5 commit 0d671cd
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions hipercam/scripts/genred.py
Expand Up @@ -297,7 +297,7 @@ def genred(args=None):
nccd = 1
ccd = '1'

else:
elif instrument == "other":

# unrecognised instrument need extra stuff
nccd = cl.get_value("nccd", "how many CCDs?", 3, 1)
Expand Down Expand Up @@ -345,6 +345,11 @@ def genred(args=None):
"gain", "gain, electrons/ADU, (float or file name)", "1.1"
)

else:
raise hcam.HipercamError(
"Programming error: instrument unrecognised"
)


if ccd not in aper:
# make sure 'ccd' is in aper, even if our
Expand Down Expand Up @@ -497,28 +502,28 @@ def genred(args=None):
souter = 1.4*sinner

# standard colours for CCDs
if instrument == "hipercam":
if instrument.startswith("hipercam"):
CCD_COLS = {
"1": "purple",
"1": "blue",
"2": "green",
"3": "orange",
"4": "red",
"5": "darkred",
}

elif instrument == "ultracam":
elif instrument.startswith("ultracam"):
CCD_COLS = {
"1": "red",
"2": "green",
"3": "blue",
}

elif instrument == "ultraspec":
elif instrument.startswith("ultraspec"):
CCD_COLS = {
"1": "green",
}

else:
elif instrument == "other":
# 'other'
CCD_COLS = {
"1": "green",
Expand All @@ -527,6 +532,10 @@ def genred(args=None):
"4": "orange",
"5": "purple",
}
else:
raise hcam.HipercamError(
"Programming error: instrument unrecognised"
)

# Extraction lines
extraction = ""
Expand Down

0 comments on commit 0d671cd

Please sign in to comment.