Skip to content

Commit

Permalink
hlogger, added instrument name column
Browse files Browse the repository at this point in the history
  • Loading branch information
trmrsh committed Mar 14, 2022
1 parent fb2c616 commit b5c8499
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions hipercam/scripts/hlogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,11 @@ def hlogger(args=None):
nhtml.write(f'<td class="lalert">{run}</td>')
nhtml.write("</tr>\n")
if instrument == 'ULTRACAM':
brow = [rname, night, run[3:]] + 50*[None]
brow = [rname, night, run[3:]] + 50*[None] + [linstrument,]
elif instrument == 'ULTRASPEC':
brow = [rname, night, run[3:]] + 57*[None]
brow = [rname, night, run[3:]] + 57*[None] + [linstrument,]
elif instrument == 'HiPERCAM':
brow = [rname, night, run[3:]] + 62*[None]
brow = [rname, night, run[3:]] + 62*[None] + [linstrument,]
continue

hd = rthead.header
Expand Down Expand Up @@ -1005,6 +1005,9 @@ def hlogger(args=None):
# at last: end the row
nhtml.write("\n</tr>\n")

# instrument name at end
brow.append(linstrument)

if len(brow) != len(COLNAMES):
print(
f'{runname}: data items vs colnames' +
Expand Down Expand Up @@ -2012,6 +2015,7 @@ def make_positions(
('moon_alt_start', 'float32', 'Altitude of Moon at start of run'),
('moon_alt_end', 'float32', 'Altitude of Moon at end of run'),
('moon_phase', 'float32', 'Angle between Sun and Moon / 180')
('instrument', 'str', 'The instrument (ultracam, etc) used')
)

ULTRACAM_COLNAMES = (
Expand Down Expand Up @@ -2068,6 +2072,7 @@ def make_positions(
('moon_alt_start', 'float32', 'Altitude of Moon at start of run'),
('moon_alt_end', 'float32', 'Altitude of Moon at end of run'),
('moon_phase', 'float32', 'Angle between Sun and Moon / 180')
('instrument', 'str', 'The instrument (ultracam, etc) used')
)

ULTRASPEC_COLNAMES = (
Expand Down Expand Up @@ -2131,6 +2136,7 @@ def make_positions(
('moon_alt_start', 'float32', 'Altitude of Moon at start of run'),
('moon_alt_end', 'float32', 'Altitude of Moon at end of run'),
('moon_phase', 'float32', 'Angle between Sun and Moon / 180')
('instrument', 'str', 'The instrument (ultracam, etc) used')
)


Expand Down

0 comments on commit b5c8499

Please sign in to comment.