;+ ; NAME: ; pl_1_slitoffset ; PURPOSE: (one line) ; Plot the slit offsets ; DESCRIPTION: ; Plot the slit offsets in the file ; fig/YYMMDD_1_slitoffset_v_framenum.png ; fig/YYMMDD_1_slitoffset_v_airmass.png ; CATEGORY: ; NIRES reduction ; CALLING SEQUENCE: ; pl_1_slitoffset ; INPUTS: ; OUTPUTS: ; none ; SIDE EFFECTS: ; writes two files ; fig/YYMMDD_1_slitoffset_v_framenum.png ; fig/YYMMDD_1_slitoffset_v_airmass.png ; RESTRICTIONS: ; fig directory must exist ; PROCEDURE: ; wrapper for nsx proceedure nsxng_wide_profile_mash ; MODIFICATION HISTORY: ; Written 2021 Dec 30, by Leslie Young, SwRI ;- pro pl_1_slitoffset ; TASK Identify the orders ; Find the SlitOffset ; Write the SlitOffset file 'tables/YYMMDD_1_slitoffset.txt ; and the diagnostic YYMMDD_1_id_orders_SlitOffset_v_airmass.png YYMMDD_1_id_orders_SlitOffset_v_framenum.png datestr = datestr6_pwd() color_u = [255, x11rgb('DarkGreen'), x11rgb('DarkBlue'), x11rgb('DarkViolet'), x11rgb('orange')] window, xs=1131, ys=580 nd = rd_1_slitoffset(datestr, framenum, object, airmass, slitoffset, slitoffset_override) framenumend = framenum[nd-1] SlitOffset_median = median(slitoffset_override) str_SlitOffset_median = datestr+' SlitOffset_median ' +string(SlitOffset_median) print, datestr, ' SlitOffset_median ', SlitOffset_median plot, airmass, slitoffset, ps=4, xtit='Airmass', yr=[2.2, 3.2], ytit='SlitOffset' xyouts, !x.crange[0], mean(!y.crange), str_SlitOffset_median a=object & s = a[sort(a)] & object_u = s[uniq(s)] for iu = 0, n_elements(object_u)-1 do begin indx = where(object eq object_u[iu]) oplot, airmass[indx], slitoffset[indx], ps=4, color=color_u[iu] xyouts, 1.2, 2.3 + iu/10., object_u[iu], color=color_u[iu] endfor oplot, !x.crange, [0,0]+SlitOffset_median tv2png, 'fig/'+datestr+'_1_slitoffset_v_airmass.png', /tr, /co plot, framenum, slitoffset, ps=4, xtit='Framenum', yr=[2.2, 3.2], ytit='SlitOffset' xyouts, !x.crange[0], mean(!y.crange), str_SlitOffset_median a=object & s = a[sort(a)] & object_u = s[uniq(s)] for iu = 0, n_elements(object_u)-1 do begin indx = where(object eq object_u[iu]) oplot, framenum[indx], slitoffset[indx], ps=4, color=color_u[iu] xyouts, framenumend, 2.3 + iu/10., object_u[iu], color=color_u[iu], al=1 endfor oplot, !x.crange, [0,0]+SlitOffset_median tv2png, 'fig/'+datestr+'_1_slitoffset_v_framenum.png', /tr, /co end