;+ ; NAME: ; wr_1_slitoffset ; PURPOSE: (one line) ; Write a table of slit offsets ; DESCRIPTION: ; Write a table of slit offsets ; tables/YYMMDD_1_slitoffset.txt ; CATEGORY: ; NIRES reduction ; CALLING SEQUENCE: ; wr_1_slitoffset, datestr, framenum, object, airmass, slitoffset, slitoffset_override ; INPUTS: ; datestr: string (YYMMDD) ; framenum: array of integers. FRAMENUM from header ; object: array of strings. OBJECT from header ; airmass: array of floats. AIRMASS from header ; slitoffset: offset to the slit as used by NSX, for each exposure, ; as calculated by nsxng_wide_profile_mash ; slitoffset_override: override to slitoffset ; OUTPUTS: ; none ; SIDE EFFECTS: ; writes tables/YYMMDD_1_slitoffset.txt ; RESTRICTIONS: ; tables directory must exist ; PROCEDURE: ; wrapper for nsx proceedure nsxng_wide_profile_mash ; MODIFICATION HISTORY: ; Written 2021 Dec 30, by Leslie Young, SwRI ;- pro wr_1_slitoffset, datestr, framenum, object, airmass, slitoffset, slitoffset_override fn = 'tables/'+datestr+'_1_slitoffset.txt' format = 'I6, " ", I04, A12, F8.4, F16.7, F20.7' formatA = '(A6, " ", A4, A12, A8, A16, A21)' n = n_elements(framenum) head = string('Date', 'SEQ', 'Object', 'Airmass', 'SlitOffset-calc','SlitOffset-override', form=formatA) forprint, replicate(datestr, n), framenum, object, airmass, slitoffset, slitoffset_override, form=format, comment=head, $ textout=fn end