;+ ; NAME: ; spe_fitshead2fits ; ; PURPOSE: (one line) ; convert a FITS header to a Princeton Instruments SPE header structure ; ; CATEGORY: ; File IO ; ; CALLING SEQUENCE: ; fitsh = spefitshead2fits(speh, infitsh=infitsh) ; ; INPUTS: ; fitsh = FITS header (array of strings) as returned by spe_head2fits ; ; OUTPUTS: ; speh : structure for the header of Princeton Instruments ; WinView or WinSpec programs, as output by ; convert_princeton_header2 ; ; MODIFICATION HISTORY: ; Written 17 Sep 2007 Leslie Young SwRI ;- function spe_fitshead2struct, fitshin speh = {princeton_header} ; get the header between FIRSTSPE and LASTSPE first = where(strmid(fitshin,0,8) eq 'FIRSTSPE', nfirst) last = where(strmid(fitshin,0,8) eq 'LASTSPE ', nlast) if nfirst ne 1 or nlast ne 1 then begin print, 'spe_fitshead2struct : fitsh does not have the expected format' return, speh endif else begin fitsh = fitshin[first[0] : last[0] ] endelse ; sxaddpar, fitsh, 'CONTVERS', speh.controllerversion, $ ; 'ControllerVersion:Hardware Version', before='LASTSPE' speh.controllerversion = sxpar(fitsh, 'CONTVERS') ; sxaddpar, fitsh, 'LOGICOUT', speh.logicoutput, $ ; 'LogicOutput:Definition of Output BNC', before='LASTSPE' speh.logicoutput = sxpar(fitsh, 'LOGICOUT') ; sxaddpar, fitsh, 'AMPHICAP', speh.AmpHiCapLowNoise, $ ; 'AmpHiCapLowNoise:Amp Switching Mode', before='LASTSPE' speh.AmpHiCapLowNoise = sxpar(fitsh, 'AMPHICAP') ; sxaddpar, fitsh, 'XDIMDET', speh.xDimDet, $ ; 'xDimDet:Detector x dimension of chip.', before='LASTSPE' speh.xDimDet = sxpar(fitsh, 'XDIMDET') ; sxaddpar, fitsh, 'MODE', speh.mode, $ ; 'mode:timing mode', before='LASTSPE' speh.mode = sxpar(fitsh, 'MODE') ; sxaddpar, fitsh, 'EXP_SEC', speh.exp_sec, $ ; 'exp_sec:alternitive exposure, in sec.', before='LASTSPE' speh.exp_sec = sxpar(fitsh, 'EXP_SEC') ; sxaddpar, fitsh, 'VCHIPXDI', speh.VChipXdim, $ ; 'VChipXdim:Virtual Chip X dim', before='LASTSPE' speh.VChipXdim = sxpar(fitsh, 'VCHIPXDI') ; sxaddpar, fitsh, 'VCHIPYDI', speh.VChipYdim, $ ; 'VChipYdim:Virtual Chip Y dim', before='LASTSPE' speh.VChipYdim = sxpar(fitsh, 'VCHIPYDI') ; sxaddpar, fitsh, 'YDIMDET', speh.yDimDet, $ ; 'yDimDet: y dimension of CCD or detector.', before='LASTSPE' speh.yDimDet = sxpar(fitsh, 'YDIMDET') ; sxaddpar, fitsh, 'DATE', speh.date, $ ; 'date[DATEMAX]:date', before='LASTSPE' speh.date = sxpar(fitsh, 'DATE') ; sxaddpar, fitsh, 'VIRTFLAG', speh.VirtualChipFlag, $ ; 'VirtualChipFlag:On/Off', before='LASTSPE' speh.VirtualChipFlag = sxpar(fitsh, 'VIRTFLAG') ; ; Spare_1 is type byte, but string(0b) = '', so force to uint ; sxaddpar, fitsh, 'SPAR1_1', uint( speh.Spare_1[0] ), $ ; 'Spare_1[2] :', before='LASTSPE' ; ; sxaddpar, fitsh, 'SPAR1_2', uint( speh.Spare_1[1] ), $ ; 'Spare_1[2] :', before='LASTSPE' ; sxaddpar, fitsh, 'NOSCAN', speh.noscan, $ ; 'noscan:Old # of scans - should always be -1', before='LASTSPE' speh.noscan = sxpar(fitsh, 'NOSCAN') ; sxaddpar, fitsh, 'DETEMP', speh.DetTemperature, $ ; 'DetTemperature:Detector Temperature Set', before='LASTSPE' speh.DetTemperature = sxpar(fitsh, 'DETEMP') ; sxaddpar, fitsh, 'DETTYPE', speh.dettype, $ ; 'DetType:CCD/DiodeArray type', before='LASTSPE' speh.dettype = sxpar(fitsh, 'DETTYPE') ; sxaddpar, fitsh, 'XDIM', speh.xdim, $ ; 'xdim:actual # of pixels on x axis', before='LASTSPE' speh.xdim = sxpar(fitsh, 'XDIM') ; sxaddpar, fitsh, 'STDIODE', speh.stdiode, $ ; 'stdiode:trigger diode', before='LASTSPE' speh.stdiode = sxpar(fitsh, 'STDIODE') ; sxaddpar, fitsh, 'DELAYTIM', speh.DelayTime, $ ; 'DelayTime:Used with Async Mode', before='LASTSPE' speh.DelayTime = sxpar(fitsh, 'DELAYTIM') ; sxaddpar, fitsh, 'SHUTCNTL', speh.ShutterControl, $ ; 'ShutterControl:Normal,DisabledOpen,DisabledClosed', before='LASTSPE' speh.ShutterControl = sxpar(fitsh, 'SHUTCNTL') ; sxaddpar, fitsh, 'ABSLIVE', speh.AbsorbLive, $ ; 'AbsorbLive:On/Off', before='LASTSPE' speh.AbsorbLive = sxpar(fitsh, 'ABSLIVE') ; sxaddpar, fitsh, 'ABSMODE', speh.AbsorbMode, $ ; 'AbsorbMode:Reference Strip or File', before='LASTSPE' speh.AbsorbMode = sxpar(fitsh, 'ABSMODE') ; sxaddpar, fitsh, 'CAN_VIRT', speh.CanDoVirtualChipFlag, $ ; 'CanDoVirtualChipFlag:T/F Chip able to do Virtual Chip', before='LASTSPE' speh.CanDoVirtualChipFlag = sxpar(fitsh, 'CAN_VIRT') ; sxaddpar, fitsh, 'THRSHMNL', speh.ThresholdMinLive, $ ; 'ThresholdMinLive:On/Off', before='LASTSPE' speh.ThresholdMinLive = sxpar(fitsh, 'THRSHMNL') ; sxaddpar, fitsh, 'THRSHMNV', speh.ThresholdMinVal, $ ; 'ThresholdMinVal:Threshold Minimum Value', before='LASTSPE' speh.ThresholdMinVal = sxpar(fitsh, 'THRSHMNV') ; sxaddpar, fitsh, 'THRSHMXL', speh.ThresholdMaxLive, $ ; 'ThresholdMaxLive:On/Off', before='LASTSPE' speh.ThresholdMaxLive = sxpar(fitsh, 'THRSHMXL') ; sxaddpar, fitsh, 'THRSHMXV', speh.ThresholdMaxVal, $ ; 'ThresholdMaxVal:Threshold Maximum Value', before='LASTSPE' speh.ThresholdMaxVal = sxpar(fitsh, 'THRSHMXV') ; sxaddpar, fitsh, 'SPMODE', speh.SpecAutoSpectroMode,$ ; 'SpecAutoSpectroMode:T/F Spectrograph Used', before='LASTSPE' speh.SpecAutoSpectroMode = sxpar(fitsh, 'SPMODE') ; sxaddpar, fitsh, 'SPCTRNM', speh.SpecCenterWlNm, $ ; 'SpecCenterWlNm:Center Wavelength in Nm', before='LASTSPE' speh.SpecCenterWlNm = sxpar(fitsh, 'SPCTRNM') ; sxaddpar, fitsh, 'SPGFLAG', speh.SpecGlueFlag, $ ; 'SpecGlueFlag:T/F File is Glued', before='LASTSPE' speh.SpecGlueFlag = sxpar(fitsh, 'SPGFLAG') ; sxaddpar, fitsh, 'SPGSTART', speh.SpecGlueStartWlNm, $ ; 'SpecGlueStartWlNm:Starting Wavelength in Nm', before='LASTSPE' speh.SpecGlueStartWlNm = sxpar(fitsh, 'SPGSTART') ; sxaddpar, fitsh, 'SPGEND', speh.SpecGlueEndWlNm, $ ; 'SpecGlueEndWlNm:Starting Wavelength in Nm', before='LASTSPE' speh.SpecGlueEndWlNm = sxpar(fitsh, 'SPGEND') ; sxaddpar, fitsh, 'SPGOVRLP', speh.SpecGlueMinOvrlpNm, $ ; 'SpecGlueMinOvrlpNm:Minimum Overlap in Nm', before='LASTSPE' speh.SpecGlueMinOvrlpNm = sxpar(fitsh, 'SPGOVRLP') ; sxaddpar, fitsh, 'SPGRESNM', speh.SpecGlueFinalResNm, $ ; 'SpecGlueFinalResNm:Final Resolution in Nm', before='LASTSPE' speh.SpecGlueFinalResNm = sxpar(fitsh, 'SPGRESNM') ; sxaddpar, fitsh, 'PULSETYP', speh.PulserType, $ ; 'PulserType:0=None, PG200=1, PTG=2, DG535=3', before='LASTSPE' speh.PulserType = sxpar(fitsh, 'PULSETYP') ; sxaddpar, fitsh, 'CSTOMCHP', speh.CustomChipFlag, $ ; 'CustomChipFlag:T/F Custom Chip Used', before='LASTSPE' speh.CustomChipFlag = sxpar(fitsh, 'CSTOMCHP') ; sxaddpar, fitsh, 'XPREPIX', speh.XPrePixels, $ ; 'XPrePixels:Pre Pixels in X direction', before='LASTSPE' speh.XPrePixels = sxpar(fitsh, 'XPREPIX') ; sxaddpar, fitsh, 'XPOSTPIX', speh.XPostPixels, $ ; 'XPostPixels:Post Pixels in X direction', before='LASTSPE' speh.XPostPixels = sxpar(fitsh, 'XPOSTPIX') ; sxaddpar, fitsh, 'YPREPIX', speh.YPrePixels, $ ; 'YPrePixels:Pre Pixels in Y direction', before='LASTSPE' speh.YPrePixels = sxpar(fitsh, 'YPREPIX') ; sxaddpar, fitsh, 'YPOSTPIX', speh.YPostPixels, $ ; 'YPostPixels:Post Pixels in Y direction', before='LASTSPE' speh.YPostPixels = sxpar(fitsh, 'YPOSTPIX') ; sxaddpar, fitsh, 'ASYNEN', speh.asynen, $ ; 'asynen:asynchron enable flag 0 = off', before='LASTSPE' speh.asynen = sxpar(fitsh, 'ASYNEN') ; sxaddpar, fitsh, 'DATA_TYP', speh.datatype, $ ; 'datatype:experiment datatype', before='LASTSPE' speh.datatype = sxpar(fitsh, 'DATA_TYP') ; sxaddpar, fitsh, '', '0 = FLOATING POINT', before='LASTSPE' ; sxaddpar, fitsh, '', '1 = LONG INTEGER', before='LASTSPE' ; sxaddpar, fitsh, '', '2 = INTEGER', before='LASTSPE' ; sxaddpar, fitsh, '', '3 = UNSIGNED INTEGER', before='LASTSPE' ; sxaddpar, fitsh, 'PMODE', speh.PulserMode, $ ; 'PulserMode:Repetitive/Sequential', before='LASTSPE' speh.PulserMode = sxpar(fitsh, 'PMODE') ; sxaddpar, fitsh, 'PACCUM', speh.PulserOnChipAccums, $ ; 'PulserOnChipAccums:Num PTG On-Chip Accums', before='LASTSPE' speh.PulserOnChipAccums = sxpar(fitsh, 'PACCUM') ; sxaddpar, fitsh, 'PREPEXP', speh.PulserRepeatExp, $ ; 'PulserRepeatExp:Num Exp Repeats (Pulser SW Accum)', before='LASTSPE' speh.PulserRepeatExp = sxpar(fitsh, 'PREPEXP') ; sxaddpar, fitsh, 'PREPWID', speh.PulseRepWidth, $ ; 'PulseRepWidth:Width Value for Repetitive pulse (usec)', before='LASTSPE' speh.PulseRepWidth = sxpar(fitsh, 'PREPWID') ; sxaddpar, fitsh, 'PREPDLY', speh.PulseRepDelay, $ ; 'PulseRepDelay:Width Value for Repetitive pulse (usec)', before='LASTSPE' speh.PulseRepDelay = sxpar(fitsh, 'PREPDLY') ; sxaddpar, fitsh, 'PSEQSWID', speh.PulseSeqStartWidth, $ ; 'PulseSeqStartWidth:Start Width for Sequential pulse (usec)', before='LASTSPE' speh.PulseSeqStartWidth = sxpar(fitsh, 'PSEQSWID') ; sxaddpar, fitsh, 'PSEQEWID', speh.PulseSeqEndWidth, $ ; 'PulseSeqEndWidth:End Width for Sequential pulse (usec)', before='LASTSPE' speh.PulseSeqEndWidth = sxpar(fitsh, 'PSEQEWID') ; sxaddpar, fitsh, 'PSEQSDLY', speh.PulseSeqStartDelay, $ ; 'PulseSeqStartDelay:Start Delay for Sequential pulse (usec)', before='LASTSPE' speh.PulseSeqStartDelay = sxpar(fitsh, 'PSEQSDLY') ; sxaddpar, fitsh, 'PSEQEDLY', speh.PulseSeqEndDelay, $ ; 'PulseSeqEndDelay:End Delay for Sequential pulse (usec)', before='LASTSPE' speh.PulseSeqEndDelay = sxpar(fitsh, 'PSEQEDLY') ; sxaddpar, fitsh, 'PSEQMODE', speh.PulseSeqIncMode, $ ; 'PulseSeqIncMode:Increments: 1=Fixed, 2=Exponential', before='LASTSPE' speh.PulseSeqIncMode = sxpar(fitsh, 'PSEQMODE') ; sxaddpar, fitsh, 'PIUSED', speh.PImaxUsed, $ ; 'PImaxUsed:PI-Max type controller flag', before='LASTSPE' speh.PImaxUsed = sxpar(fitsh, 'PIUSED') ; sxaddpar, fitsh, 'PIMODE', speh.PImaxMode, $ ; 'PImaxMode:PI-Max mode', before='LASTSPE' speh.PImaxMode = sxpar(fitsh, 'PIMODE') ; sxaddpar, fitsh, 'PIGAIN', speh.PImaxGain, $ ; 'PImaxGain:PI-Max Gain', before='LASTSPE' speh.PImaxGain = sxpar(fitsh, 'PIGAIN') ; sxaddpar, fitsh, 'BKGDAPPL', speh.BackGrndApplied, $ ; 'BackGrndApplied:1 if background subtraction done', before='LASTSPE' speh.BackGrndApplied = sxpar(fitsh, 'BKGDAPPL') ; sxaddpar, fitsh, 'PI2NSBRD', speh.PImax2nsBrdUsed, $ ; 'PImax2nsBrdUsed:T/F PI-Max 2ns Board Used', before='LASTSPE' speh.PImax2nsBrdUsed = sxpar(fitsh, 'PI2NSBRD') ; sxaddpar, fitsh, 'MINBLK', speh.minblk, $ ; 'minblk:min. # of strips per skips', before='LASTSPE' speh.minblk = sxpar(fitsh, 'MINBLK') ; sxaddpar, fitsh, 'NMINBLK', speh.numminblk, $ ; 'numminblk:# of min-blocks before geo skps', before='LASTSPE' speh.numminblk = sxpar(fitsh, 'NMINBLK') ; sxaddpar, fitsh, 'SPMLOC_1', speh.SpecMirrorLocation[0], $ ; 'SpecMirrorLocation:Spectro Mirror Location, 0=Not Present', before='LASTSPE' speh.SpecMirrorLocation[0] = sxpar(fitsh, 'SPMLOC_1') ; sxaddpar, fitsh, 'SPMLOC_2', speh.SpecMirrorLocation[1], $ ; 'SpecMirrorLocation:Spectro Mirror Location, 0=Not Present', before='LASTSPE' speh.SpecMirrorLocation[1] = sxpar(fitsh, 'SPMLOC_2') ; sxaddpar, fitsh, 'SPSLOC_1', speh.SpecSlitLocation[0], $ ; 'SpecSlitLocation:Spectro Slit Location, 0=Not Present', before='LASTSPE' speh.SpecSlitLocation[0] = sxpar(fitsh, 'SPSLOC_1') ; sxaddpar, fitsh, 'SPSLOC_2', speh.SpecSlitLocation[1], $ ; 'SpecSlitLocation:Spectro Slit Location, 0=Not Present', before='LASTSPE' speh.SpecSlitLocation[1] = sxpar(fitsh, 'SPSLOC_2') ; sxaddpar, fitsh, 'SPSLOC_3', speh.SpecSlitLocation[2], $ ; 'SpecSlitLocation:Spectro Slit Location, 0=Not Present', before='LASTSPE' speh.SpecSlitLocation[2] = sxpar(fitsh, 'SPSLOC_3') ; sxaddpar, fitsh, 'SPSLOC_4', speh.SpecSlitLocation[3], $ ; 'SpecSlitLocation:Spectro Slit Location, 0=Not Present', before='LASTSPE' speh.SpecSlitLocation[3] = sxpar(fitsh, 'SPSLOC_4') ; sxaddpar, fitsh, 'CSTOMTIM', speh.CustomTimingFlag, $ ; 'CustomTimingFlag:T/F Custom Timing Used', before='LASTSPE' speh.CustomTimingFlag = sxpar(fitsh, 'CSTOMTIM') ; sxaddpar, fitsh, 'EXTIMLOC', speh.ExperimentTimeLocal, $ ; 'ExperimentTimeLocal:Experiment Local Time as hhmmss\0', before='LASTSPE' speh.ExperimentTimeLocal = sxpar(fitsh, 'EXTIMLOC') ; sxaddpar, fitsh, 'EXTIMUTC', speh.ExperimentTimeUTC, $ ; 'ExperimentTimeUTC:Experiment UTC Time as hhmmss\0', before='LASTSPE' speh.ExperimentTimeUTC = sxpar(fitsh, 'EXTIMUTC') ; sxaddpar, fitsh, 'EXPUNITS', speh.ExposUnits, $ ; 'ExposUnits:User Units for Exposure', before='LASTSPE' speh.ExposUnits = sxpar(fitsh, 'EXPUNITS') ; sxaddpar, fitsh, 'ADCOFFSE', speh.ADCoffset, $ ; 'ADCoffset:ADC offset', before='LASTSPE' speh.ADCoffset = sxpar(fitsh, 'ADCOFFSE') ; sxaddpar, fitsh, 'ADCRATE', speh.ADCrate, $ ; 'ADCrate:ADC rate', before='LASTSPE' speh.ADCrate = sxpar(fitsh, 'ADCRATE') ; sxaddpar, fitsh, 'ADCTYPE', speh.ADCtype, $ ; 'ADCtype:ADC type', before='LASTSPE' speh.ADCtype = sxpar(fitsh, 'ADCTYPE') ; sxaddpar, fitsh, 'ADCRES', speh.ADCresolution, $ ; 'ADCresolution:ADC resolution', before='LASTSPE' speh.ADCresolution = sxpar(fitsh, 'ADCRES') ; sxaddpar, fitsh, 'ADCBITAD', speh.ADCbitAdjust, $ ; 'ADCbitAdjust:ADC bit adjust', before='LASTSPE' speh.ADCbitAdjust = sxpar(fitsh, 'ADCBITAD') ; sxaddpar, fitsh, 'GAIN', speh.gain, $ ; 'gain:gain', before='LASTSPE' speh.gain = sxpar(fitsh, 'GAIN') ; sxaddpar, fitsh, 'COMMNTS1', speh.Comments[0], $ ; 'Comments:File Comments', before='LASTSPE' speh.Comments[0] = sxpar(fitsh, 'COMMNTS1') ; sxaddpar, fitsh, 'COMMNTS2', speh.Comments[1], $ ; 'Comments:File Comments', before='LASTSPE' speh.Comments[1] = sxpar(fitsh, 'COMMNTS2') ; sxaddpar, fitsh, 'COMMNTS3', speh.Comments[2], $ ; 'Comments:File Comments', before='LASTSPE' speh.Comments[2] = sxpar(fitsh, 'COMMNTS3') ; sxaddpar, fitsh, 'COMMNTS4', speh.Comments[3], $ ; 'Comments:File Comments', before='LASTSPE' speh.Comments[3] = sxpar(fitsh, 'COMMNTS4') ; sxaddpar, fitsh, 'COMMNTS5', speh.Comments[4], $ ; 'Comments:File Comments', before='LASTSPE' speh.Comments[4] = sxpar(fitsh, 'COMMNTS5') ; sxaddpar, fitsh, 'GEOMETRI', speh.geometric, $ ; 'geometric:geometric ops',before='LASTSPE' speh.geometric = sxpar(fitsh, 'GEOMETRI') ; sxaddpar, fitsh, '', 'rotate 0x01, reverse 0x02, flip 0x04',before='LASTSPE' ; sxaddpar, fitsh, 'XLABEL', speh.xlabel, $ ; 'xlabel:intensity display string', before='LASTSPE' speh.xlabel = sxpar(fitsh, 'XLABEL') ; sxaddpar, fitsh, 'CLEANS', speh.cleans, $ ; 'cleans:cleans', before='LASTSPE' speh.cleans = sxpar(fitsh, 'CLEANS') ; sxaddpar, fitsh, 'NUMSKIP', speh.NumSkpPerCln, $ ; 'NumSkpPerCln:number of skips per clean.', before='LASTSPE' speh.NumSkpPerCln = sxpar(fitsh, 'NUMSKIP') ; sxaddpar, fitsh, 'SPMPOS_1', speh.SpecMirrorPos[0], $ ; 'SpecMirrorPos:Spectrograph Mirror Positions', before='LASTSPE' speh.SpecMirrorPos[0] = sxpar(fitsh, 'SPMPOS_1') ; sxaddpar, fitsh, 'SPMPOS_2', speh.SpecMirrorPos[1], $ ; 'SpecMirrorPos:Spectrograph Mirror Positions', before='LASTSPE' speh.SpecMirrorPos[1] = sxpar(fitsh, 'SPMPOS_2') ; sxaddpar, fitsh, 'SPSPOS1', speh.SpecSlitPos[0], $ ; 'SpecSlitPos:Spectrograph Slit Positions', before='LASTSPE' speh.SpecSlitPos[0] = sxpar(fitsh, 'SPSPOS1') ; sxaddpar, fitsh, 'SPSPOS2', speh.SpecSlitPos[1], $ ; 'SpecSlitPos:Spectrograph Slit Positions', before='LASTSPE' speh.SpecSlitPos[1] = sxpar(fitsh, 'SPSPOS2') ; sxaddpar, fitsh, 'SPSPOS3', speh.SpecSlitPos[2], $ ; 'SpecSlitPos:Spectrograph Slit Positions', before='LASTSPE' speh.SpecSlitPos[2] = sxpar(fitsh, 'SPSPOS3') ; sxaddpar, fitsh, 'SPSPOS4', speh.SpecSlitPos[3], $ ; 'SpecSlitPos:Spectrograph Slit Positions', before='LASTSPE' speh.SpecSlitPos[3] = sxpar(fitsh, 'SPSPOS4') ; sxaddpar, fitsh, 'AUTOCLEA', speh.AutoCleansActive, $ ; 'AutoCleansActive:T/F', before='LASTSPE' speh.AutoCleansActive = sxpar(fitsh, 'AUTOCLEA') ; sxaddpar, fitsh, 'USECONTC', speh.UseContCleansInst, $ ; 'UseContCleansInst:T/F', before='LASTSPE' speh.UseContCleansInst = sxpar(fitsh, 'USECONTC') ; sxaddpar, fitsh, 'ABSSTRIP', speh.AbsorbStripNum, $ ; 'AbsorbStripNum:Absorbance Strip Number', before='LASTSPE' speh.AbsorbStripNum = sxpar(fitsh, 'ABSSTRIP') ; sxaddpar, fitsh, 'SPSPOSUN', speh.SpecSlitPosUnits, $ ; 'SpecSlitPosUnits:Spectrograph Slit Position Units', before='LASTSPE' speh.SpecSlitPosUnits = sxpar(fitsh, 'SPSPOSUN') ; sxaddpar, fitsh, 'SGROOVES', speh.SpecGrooves, $ ; 'SpecGrooves:Spectrograph Grating Grooves', before='LASTSPE' speh.SpecGrooves = sxpar(fitsh, 'SGROOVES') ; sxaddpar, fitsh, 'SRCOMP', speh.srccmp, $ ; 'srccmp:number of source comp. diodes', before='LASTSPE' speh.srccmp = sxpar(fitsh, 'SRCOMP') ; sxaddpar, fitsh, 'YDIM', speh.ydim, $ ; 'ydim:y dimension of raw data.', before='LASTSPE' speh.ydim = sxpar(fitsh, 'YDIM') ; sxaddpar, fitsh, 'SCRAMBLE', speh.scramble, $ ; 'scramble:0=scrambled,1=unscrambled', before='LASTSPE' speh.scramble = sxpar(fitsh, 'SCRAMBLE') ; sxaddpar, fitsh, 'CONTCLEFF', speh.ContinuousCleansFlag, $ ; 'ContinuousCleansFlag:T/F Continuous Cleans Timing Option', before='LASTSPE' speh.ContinuousCleansFlag = sxpar(fitsh, 'CONTCLEFF') ; sxaddpar, fitsh, 'EXTTRIGF', speh.ExternalTriggerFlag, $ ; 'ExternalTriggerFlag:T/F External Trigger Timing Option', before='LASTSPE' speh.ExternalTriggerFlag = sxpar(fitsh, 'EXTTRIGF') ; sxaddpar, fitsh, 'LNOSCAN', speh.lnoscan, $ ; 'lnoscan:Number of scans (Early WinX)', before='LASTSPE' speh.lnoscan = sxpar(fitsh, 'LNOSCAN') ; sxaddpar, fitsh, 'LAVGEXP', speh.lavgexp, $ ; 'lavgexp:Number of Accumulations', before='LASTSPE' speh.lavgexp = sxpar(fitsh, 'LAVGEXP') ; sxaddpar, fitsh, 'READOUTT', speh.ReadoutTime, $ ; 'ReadoutTime:Experiment readout time', before='LASTSPE' speh.ReadoutTime = sxpar(fitsh, 'READOUTT') ; sxaddpar, fitsh, 'TRIGMODE', speh.TriggeredModeFlag, $ ; 'TriggeredModeFlag:T/F Triggered Timing Option', before='LASTSPE' speh.TriggeredModeFlag = sxpar(fitsh, 'TRIGMODE') ; sxaddpar, fitsh, 'SPAR2_1', uint( speh.Spare_2[0] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_2', uint( speh.Spare_2[1] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_3', uint( speh.Spare_2[2] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_4', uint( speh.Spare_2[3] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_5', uint( speh.Spare_2[4] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_6', uint( speh.Spare_2[5] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_7', uint( speh.Spare_2[6] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_8', uint( speh.Spare_2[7] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_9', uint( speh.Spare_2[8] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR2_10', uint( speh.Spare_2[9] ), $ ; 'Spare_2 :', before='LASTSPE' ; sxaddpar, fitsh, 'SW_VERSI', speh.sw_version, $ ; 'sw_version:Version of SW creating this file', before='LASTSPE' speh.sw_version = sxpar(fitsh, 'SW_VERSI') ; sxaddpar, fitsh, 'TYPE', speh.type, $ ; 'type: 1 = new120 (Type II)', before='LASTSPE' speh.type = sxpar(fitsh, 'TYPE') ; sxaddpar, fitsh, '', $ ; ' 2 = old120 (Type I )', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 3 = ST130', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 4 = ST121', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 5 = ST138', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 6 = DC131 (PentaMax)', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 7 = ST133 (MicroMax/SpectroMax)', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 8 = ST135 (GPIB)', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 9 = VICCD', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 10 = ST116 (GPIB)', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 11 = OMA3 (GPIB)', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' 12 = OMA4', before='LASTSPE' ; sxaddpar, fitsh, 'FLATAPPL', speh.flatFieldApplied, $ ; 'flatFieldApplied:1 if flat field was applied.', before='LASTSPE' speh.flatFieldApplied = sxpar(fitsh, 'FLATAPPL') ; sxaddpar, fitsh, 'SPAR3_1', uint( speh.Spare_3[0] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_2', uint( speh.Spare_3[1] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_3', uint( speh.Spare_3[2] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_4', uint( speh.Spare_3[3] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_5', uint( speh.Spare_3[4] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_6', uint( speh.Spare_3[5] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_7', uint( speh.Spare_3[6] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_8', uint( speh.Spare_3[7] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_9', uint( speh.Spare_3[8] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_10', uint( speh.Spare_3[9] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_11', uint( speh.Spare_3[10] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_12', uint( speh.Spare_3[11] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_13', uint( speh.Spare_3[12] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_14', uint( speh.Spare_3[13] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_15', uint( speh.Spare_3[14] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'SPAR3_16', uint( speh.Spare_3[15] ), $ ; 'Spare_3 :', before='LASTSPE' ; sxaddpar, fitsh, 'KINTMODE', speh.kin_trig_mode, $ ; 'kin_trig_mode:Kinetics Trigger Mode', before='LASTSPE' speh.kin_trig_mode = sxpar(fitsh, 'KINTMODE') ; sxaddpar, fitsh, 'DLABEL', speh.dlabel, $ ; 'dlabel:Data label.', before='LASTSPE' speh.dlabel = sxpar(fitsh, 'DLABEL') ; char Spare_4[436] 742 ; sxaddpar, fitsh, 'PFILENAM', speh.PulseFileName, $ ; 'PulseFileName:Name of Pulser File with', before='LASTSPE' speh.PulseFileName = sxpar(fitsh, 'PFILENAM') ; sxaddpar, fitsh, '', $ ; ' Pulse Widths/Delays (for Z-Slice)', before='LASTSPE' ; sxaddpar, fitsh, 'AFILENAM', speh.AbsorbFileName, $ ; 'AbsorbFileName:Name of Absorbance File (if File Mode)', before='LASTSPE' speh.AbsorbFileName = sxpar(fitsh, 'AFILENAM') ; sxaddpar, fitsh, 'NEXPREP', speh.NumExpRepeats, $ ; 'NumExpRepeats:Number of Times experiment repeated', before='LASTSPE' speh.NumExpRepeats = sxpar(fitsh, 'NEXPREP') ; sxaddpar, fitsh, 'NEXPACC', speh.NumExpAccums, $ ; 'NumExpAccums:Number of Time experiment accumulated', before='LASTSPE' speh.NumExpAccums = sxpar(fitsh, 'NEXPACC') ; sxaddpar, fitsh, 'YTFLAG', speh.YT_Flag, $ ; 'YT_Flag:Set to 1 if this file contains YT data', before='LASTSPE' speh.YT_Flag = sxpar(fitsh, 'YTFLAG') ; sxaddpar, fitsh, 'CLKSPDUS', speh.clkspd_us, $ ; 'clkspd_us:Vert Clock Speed in micro-sec', before='LASTSPE' speh.clkspd_us = sxpar(fitsh, 'CLKSPDUS') ; sxaddpar, fitsh, 'HWACCUMF', speh.HWaccumFlag, $ ; 'HWaccumFlag:set to 1 if accum done by Hardware.', before='LASTSPE' speh.HWaccumFlag = sxpar(fitsh, 'HWACCUMF') ; sxaddpar, fitsh, 'STORSYNC', speh.StoreSync, $ ; 'StoreSync:set to 1 if store sync used', before='LASTSPE' speh.StoreSync = sxpar(fitsh, 'STORSYNC') ; sxaddpar, fitsh, 'BLEMAPPL', speh.BlemishApplied, $ ; 'BlemishApplied:set to 1 if blemish removal applied', before='LASTSPE' speh.BlemishApplied = sxpar(fitsh, 'BLEMAPPL') ; sxaddpar, fitsh, 'COSMAPPL', speh.CosmicApplied, $ ; 'CosmicApplied:set to 1 if cosmic ray removal applied', before='LASTSPE' speh.CosmicApplied = sxpar(fitsh, 'COSMAPPL') ; sxaddpar, fitsh, 'COSMTYPE', speh.CosmicType, $ ; 'CosmicType:if cosmic ray applied, this is type', before='LASTSPE' speh.CosmicType = sxpar(fitsh, 'COSMTYPE') ; sxaddpar, fitsh, 'COSMTHSH', speh.CosmicThreshold, $ ; 'CosmicThreshold:Threshold of cosmic ray removal.', before='LASTSPE' speh.CosmicThreshold = sxpar(fitsh, 'COSMTHSH') ; sxaddpar, fitsh, 'NFRAMES', speh.NumFrames, $ ; 'NumFrames:number of frames in file.', before='LASTSPE' speh.NumFrames = sxpar(fitsh, 'NFRAMES') ; sxaddpar, fitsh, 'MAXINTEN', speh.MaxIntensity, $ ; 'MaxIntensity:max intensity of data (future)', before='LASTSPE' speh.MaxIntensity = sxpar(fitsh, 'MAXINTEN') ; sxaddpar, fitsh, 'MININTEN', speh.MinIntensity, $ ; 'MinIntensity:min intensity of data (future)', before='LASTSPE' speh.MinIntensity = sxpar(fitsh, 'MININTEN') ; sxaddpar, fitsh, 'YLABEL', speh.ylabel, $ ; 'ylabel:y axis label.', before='LASTSPE' speh.ylabel = sxpar(fitsh, 'YLABEL') ; sxaddpar, fitsh, 'SHUTTYPE', speh.ShutterType, $ ; 'ShutterType:shutter type.', before='LASTSPE' speh.ShutterType = sxpar(fitsh, 'SHUTTYPE') ; sxaddpar, fitsh, 'SHUTCOMP', speh.shutterComp, $ ; 'shutterComp:shutter compensation time.', before='LASTSPE' speh.shutterComp = sxpar(fitsh, 'SHUTCOMP') ; sxaddpar, fitsh, 'READMODE', speh.readoutMode, $ ; 'readoutMode:readout mode, full,kinetics, etc', before='LASTSPE' speh.readoutMode = sxpar(fitsh, 'READMODE') ; sxaddpar, fitsh, 'WINDSIZE', speh.WindowSize, $ ; 'WindowSize:window size for kinetics only.', before='LASTSPE' speh.WindowSize = sxpar(fitsh, 'WINDSIZE') ; sxaddpar, fitsh, 'CLKSPD', speh.clkspd, $ ; 'clkspd:clock speed for kinetics & frame transfer', before='LASTSPE' speh.clkspd = sxpar(fitsh, 'CLKSPD') ; sxaddpar, fitsh, 'INTETYPE', speh.interface_type, $ ; 'interface_type:computer interface', before='LASTSPE' speh.interface_type = sxpar(fitsh, 'INTETYPE') ; sxaddpar, fitsh, '', $ ; ' (isa-taxi, pci, eisa, etc.)', before='LASTSPE' ; sxaddpar, fitsh, 'NROIEXP', speh.NumROIsInExperiment, $ ; 'NumROIsInExperiment:May be more than the 10 allowed', before='LASTSPE' speh.NumROIsInExperiment = sxpar(fitsh, 'NROIEXP') ; sxaddpar, fitsh, '', $ ; ' in this header (if 0, assume 1)', before='LASTSPE' ; char Spare_5[16] 1490 ; sxaddpar, fitsh, 'CONTRNUM', speh.controllerNum, $ ; 'controllerNum:if multiple controller system will', before='LASTSPE' speh.controllerNum = sxpar(fitsh, 'CONTRNUM') ; sxaddpar, fitsh, '', $ ; ' have controller number data came from.', before='LASTSPE' ; sxaddpar, fitsh, '', $ ; ' this is a future item. ', before='LASTSPE' ; sxaddpar, fitsh, 'SWMADE', speh.SWmade, $ ; 'SWmade:Which software package created this file', before='LASTSPE' speh.SWmade = sxpar(fitsh, 'SWMADE') ; sxaddpar, fitsh, 'NUMROI', speh.NumROI, $ ; 'NumROI:number of ROIs used. if 0 assume 1.', before='LASTSPE' speh.NumROI = sxpar(fitsh, 'NUMROI') ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', $ ; ' START OF ROI STRUCTURES ', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' for i = 0, 9 do begin s = strtrim(string(i+1),2) ; sxaddpar, fitsh, 'STARTX'+s, speh.ROIinfoblk[i].startx, $ ; 'startx:left x start value.', before='LASTSPE' speh.ROIinfoblk[i].startx = sxpar(fitsh, 'STARTX'+s) ; sxaddpar, fitsh, 'ENDX'+s, speh.ROIinfoblk[i].endx, $ ; 'endx:right x value.', before='LASTSPE' speh.ROIinfoblk[i].endx = sxpar(fitsh, 'ENDX'+s) ; sxaddpar, fitsh, 'GROUPX'+s, speh.ROIinfoblk[i].groupx, $ ; 'groupx:amount x is binned/grouped in hw..', before='LASTSPE' speh.ROIinfoblk[i].groupx = sxpar(fitsh, 'GROUPX'+s) ; sxaddpar, fitsh, 'STARTY'+s, speh.ROIinfoblk[i].starty, $ ; 'starty:left y start value.', before='LASTSPE' speh.ROIinfoblk[i].starty = sxpar(fitsh, 'STARTY'+s) ; sxaddpar, fitsh, 'ENDY'+s, speh.ROIinfoblk[i].endy, $ ; 'endy:right y value.', before='LASTSPE' speh.ROIinfoblk[i].endy = sxpar(fitsh, 'ENDY'+s) ; sxaddpar, fitsh, 'GROUPY'+s, speh.ROIinfoblk[i].groupy, $ ; 'groupy:amount y is binned/grouped in hw..', before='LASTSPE' speh.ROIinfoblk[i].groupy = sxpar(fitsh, 'GROUPY'+s) end ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', $ ; ' END OF ROI STRUCTURES ', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'FLATFIEL', speh.FlatField, $ ; 'FlatField:Flat field file name.', before='LASTSPE' speh.FlatField = sxpar(fitsh, 'FLATFIEL') ; sxaddpar, fitsh, 'BKGD', speh.background, $ ; 'background:background sub. file name.', before='LASTSPE' speh.background = sxpar(fitsh, 'BKGD') ; sxaddpar, fitsh, 'BLEMISH', speh.blemish, $ ; 'blemish:blemish file name.', before='LASTSPE' speh.blemish = sxpar(fitsh, 'BLEMISH') ; sxaddpar, fitsh, 'FILEHVER', speh.file_header_ver, $ ; 'file_header_ver:version of this file header', before='LASTSPE' speh.file_header_ver = sxpar(fitsh, 'FILEHVER') ; char YT_Info[1000] 1996-2996 Reserved for YT information ; sxaddpar, fitsh, 'WINVI_ID', speh.WinView_id, $ ; 'WinView_id:== 0x01234567L if file created by WinX', before='LASTSPE' speh.WinView_id = sxpar(fitsh, 'WINVI_ID') ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', $ ; ' START OF X CALIBRATION STRUCTURE ', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'XOFFSET', speh.XCALIBRATION.offset, $ ; 'offset:offset for absolute data scaling', before='LASTSPE' speh.XCALIBRATION.offset = sxpar(fitsh, 'XOFFSET') ; sxaddpar, fitsh, 'XFACTOR', speh.XCALIBRATION.factor, $ ; 'factor:factor for absolute data scaling', before='LASTSPE' speh.XCALIBRATION.factor = sxpar(fitsh, 'XFACTOR') ; sxaddpar, fitsh, 'XCURUNIT', uint(speh.XCALIBRATION.current_unit), $ ; 'current_unit:selected scaling unit', before='LASTSPE' speh.XCALIBRATION.current_unit = sxpar(fitsh, 'XCURUNIT') ; sxaddpar, fitsh, 'XRESERV1', uint(speh.XCALIBRATION.calibreserved1), $ ; 'reserved1:reserved', before='LASTSPE' speh.XCALIBRATION.calibreserved1 = sxpar(fitsh, 'XRESERV1') ; sxaddpar, fitsh, 'XSTRING', string(speh.XCALIBRATION.Display_String), $ ; 'string:special string for scaling', before='LASTSPE' speh.XCALIBRATION.Display_String = byte(sxpar(fitsh, 'XSTRING')) ; sxaddpar, fitsh, 'XRESERV2', string(speh.XCALIBRATION.calibreserved2), $ ; 'reserved2:reserved', before='LASTSPE' speh.XCALIBRATION.calibreserved2 = byte(sxpar(fitsh, 'XRESERV2')) ; sxaddpar, fitsh, 'XCALVALI', uint(speh.XCALIBRATION.calib_valid), $ ; 'calib_valid:flag if calibration is valid', before='LASTSPE' speh.XCALIBRATION.calib_valid = sxpar(fitsh, 'XCALVALI') ; sxaddpar, fitsh, 'XINPUNIT', uint(speh.XCALIBRATION.input_unit), $ ; 'input_unit:current input units for calib_value', before='LASTSPE' speh.XCALIBRATION.input_unit = sxpar(fitsh, 'XINPUNIT') ; sxaddpar, fitsh, 'XPOLUNIT', uint(speh.XCALIBRATION.polynounit), $ ; 'polynom_unit:linear UNIT and used ', before='LASTSPE' speh.XCALIBRATION.polynounit = sxpar(fitsh, 'XPOLUNIT') ; sxaddpar, fitsh, '', $ ; ' in the polynom_coeff', before='LASTSPE' ; sxaddpar, fitsh, 'XPOLORDE', uint(speh.XCALIBRATION.polynoorder), $ ; 'polynom_order:ORDER of calibration POLYNOM', before='LASTSPE' speh.XCALIBRATION.polynoorder = sxpar(fitsh, 'XPOLORDE') ; sxaddpar, fitsh, 'XCALCOUN', uint(speh.XCALIBRATION.calib_count), $ ; 'calib_count:valid calibration data pairs', before='LASTSPE' speh.XCALIBRATION.calib_count = sxpar(fitsh, 'XCALCOUN') for i = 0, 9 do begin s = strtrim(string(i+1),2) ; sxaddpar, fitsh, 'XPOSI'+s, speh.XCALIBRATION.pixel_position[i], $ ; 'pixel_position:pixel pos. of calibration data', before='LASTSPE' speh.XCALIBRATION.pixel_position[i] = sxpar(fitsh, 'XPOSI'+s) ; sxaddpar, fitsh, 'XVALUE'+s, speh.XCALIBRATION.calib_value[i], $ ; 'calib_value:calibration VALUE at above pos', before='LASTSPE' speh.XCALIBRATION.calib_value[i] = sxpar(fitsh, 'XVALUE'+s) end for i = 0, 5 do begin s = strtrim(string(i+1),2) ; sxaddpar, fitsh, 'XPOCOEF'+s, speh.XCALIBRATION.polynocoeff[i], $ ; 'polynom_coeff:polynom COEFFICIENTS', before='LASTSPE' speh.XCALIBRATION.polynocoeff[i] = sxpar(fitsh, 'XPOCOEF'+s) endfor ; sxaddpar, fitsh, 'XLASERPO', speh.XCALIBRATION.laser_position, $ ; 'laser_position:laser wavenumber for relativ WN', before='LASTSPE' speh.XCALIBRATION.laser_position = sxpar(fitsh, 'XLASERPO') ; sxaddpar, fitsh, 'XRESERV3', uint(speh.XCALIBRATION.CalibReserved3), $ ; 'reserved3:reserved', before='LASTSPE' speh.XCALIBRATION.CalibReserved3 = sxpar(fitsh, 'XRESERV3') ; sxaddpar, fitsh, 'XNEWCAL', uint(speh.XCALIBRATION.leftover_flag), $ ; 'new_calib_flag:If set to 200, valid label below', before='LASTSPE' speh.XCALIBRATION.leftover_flag = sxpar(fitsh, 'XNEWCAL') ; sxaddpar, fitsh, 'XCALLAB', string(speh.XCALIBRATION.user_label), $ ; 'calib_label:Calibration label (NULL terminated)', before='LASTSPE' speh.XCALIBRATION.user_label = byte(sxpar(fitsh, 'XCALLAB')) ; char expansion[87] 3402 Calibration Expansion area ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', $ ; ' END OF X CALIBRATION STRUCTURE ', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', $ ; ' START OF Y CALIBRATION STRUCTURE ', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'YOFFSET', speh.YCALIBRATION.offset, $ ; 'offset:offset for absolute data scaling', before='LASTSPE' speh.YCALIBRATION.offset = sxpar(fitsh, 'YOFFSET') ; sxaddpar, fitsh, 'YFACTOR', speh.YCALIBRATION.factor, $ ; 'factor:factor for absolute data scaling', before='LASTSPE' speh.YCALIBRATION.factor = sxpar(fitsh, 'YFACTOR') ; sxaddpar, fitsh, 'YCURUNIT', uint(speh.YCALIBRATION.current_unit), $ ; 'current_unit:selected scaling unit', before='LASTSPE' speh.YCALIBRATION.current_unit = sxpar(fitsh, 'YCURUNIT') ; sxaddpar, fitsh, 'YRESERV1', uint(speh.YCALIBRATION.calibreserved1), $ ; 'reserved1:reserved', before='LASTSPE' speh.YCALIBRATION.calibreserved1 = sxpar(fitsh, 'YRESERV1') ; sxaddpar, fitsh, 'YSTRING', string(speh.YCALIBRATION.Display_String), $ ; 'string:special string for scaling', before='LASTSPE' speh.YCALIBRATION.Display_String = byte(sxpar(fitsh, 'YSTRING')) ; sxaddpar, fitsh, 'YRESERV2', string(speh.YCALIBRATION.calibreserved2), $ ; 'reserved2:reserved', before='LASTSPE' speh.YCALIBRATION.calibreserved2 = byte(sxpar(fitsh, 'YRESERV2')) ; sxaddpar, fitsh, 'YCALVALI', uint(speh.YCALIBRATION.calib_valid), $ ; 'calib_valid:flag if calibration is valid', before='LASTSPE' speh.YCALIBRATION.calib_valid = sxpar(fitsh, 'YCALVALI') ; sxaddpar, fitsh, 'YINPUNIT', uint(speh.YCALIBRATION.input_unit), $ ; 'input_unit:current input units for calib_value', before='LASTSPE' speh.YCALIBRATION.input_unit = sxpar(fitsh, 'YINPUNIT') ; sxaddpar, fitsh, 'YPOLUNIT', uint(speh.YCALIBRATION.polynounit), $ ; 'polynom_unit:linear UNIT and used ', before='LASTSPE' speh.YCALIBRATION.polynounit = sxpar(fitsh, 'YPOLUNIT') ; sxaddpar, fitsh, '', $ ; ' in the polynom_coeff', before='LASTSPE' ; sxaddpar, fitsh, 'YPOLORDE', uint(speh.YCALIBRATION.polynoorder), $ ; 'polynom_order:ORDER of calibration POLYNOM', before='LASTSPE' speh.YCALIBRATION.polynoorder = sxpar(fitsh, 'YPOLORDE') ; sxaddpar, fitsh, 'YCALCOUN', uint(speh.YCALIBRATION.calib_count), $ ; 'calib_count:valid calibration data pairs', before='LASTSPE' speh.YCALIBRATION.calib_count = sxpar(fitsh, 'YCALCOUN') for i = 0, 9 do begin s = strtrim(string(i+1),2) ; sxaddpar, fitsh, 'YPOSI'+s, speh.YCALIBRATION.pixel_position[i], $ ; 'pixel_position:pixel pos. of calibration data', before='LASTSPE' speh.YCALIBRATION.pixel_position[i] = sxpar(fitsh, 'YPOSI'+s) ; sxaddpar, fitsh, 'YVALUE'+s, speh.YCALIBRATION.calib_value[i], $ ; 'calib_value:calibration VALUE at above pos', before='LASTSPE' speh.YCALIBRATION.calib_value[i] = sxpar(fitsh, 'YVALUE'+s) end for i = 0, 5 do begin s = strtrim(string(i+1),2) ; sxaddpar, fitsh, 'YPOCOEF'+s, speh.YCALIBRATION.polynocoeff[i], $ ; 'polynom_coeff:polynom COEFFICIENTS', before='LASTSPE' speh.YCALIBRATION.polynocoeff[i] = sxpar(fitsh, 'YPOCOEF'+s) endfor ; sxaddpar, fitsh, 'YLASERPO', speh.YCALIBRATION.laser_position, $ ; 'laser_position:laser wavenumber for relativ WN', before='LASTSPE' speh.YCALIBRATION.laser_position = sxpar(fitsh, 'YLASERPO') ; sxaddpar, fitsh, 'YRESERV3', uint(speh.YCALIBRATION.CalibReserved3), $ ; 'reserved3:reserved', before='LASTSPE' speh.YCALIBRATION.CalibReserved3 = sxpar(fitsh, 'YRESERV3') ; sxaddpar, fitsh, 'YNEWCAL', uint(speh.YCALIBRATION.leftover_flag), $ ; 'new_calib_flag:If set to 200, valid label below', before='LASTSPE' speh.YCALIBRATION.leftover_flag = sxpar(fitsh, 'YNEWCAL') ; sxaddpar, fitsh, 'YCALLAB', string(speh.YCALIBRATION.user_label), $ ; 'calib_label:Calibration label (NULL terminated)', before='LASTSPE' speh.YCALIBRATION.user_label = byte(sxpar(fitsh, 'YCALLAB')) ; char expansion[87] 3402 Calibration Expansion area ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', $ ; ' END OF Y CALIBRATION STRUCTURE ', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'ISTRING', speh.istring, $ ; 'Istring:special intensity scaling string', before='LASTSPE' speh.istring = sxpar(fitsh, 'ISTRING') ; char Spare_6[76] 4018 ; sxaddpar, fitsh, 'AVGAINUS', speh.AvGainUsed, $ ; 'AvGainUsed:avalanche gain was used', before='LASTSPE' speh.AvGainUsed = sxpar(fitsh, 'AVGAINUS') ; sxaddpar, fitsh, 'AVGAIN', speh.AvGain, $ ; 'AvGain:avalanche gain value', before='LASTSPE' speh.AvGain = sxpar(fitsh, 'AVGAIN') ; sxaddpar, fitsh, 'LASTVAL', speh.lastvalue, $ ; 'lastvalue:Always the LAST value in the header', before='LASTSPE' speh.lastvalue = sxpar(fitsh, 'LASTVAL') ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', 'END values from SPE header', $ ; before='LASTSPE' ; sxaddpar, fitsh, 'COMMENT', '*******************************************', $ ; before='LASTSPE' return, speh end