Change page style: 

Data Format and Reduction

NICI Data Format and Reduction

This page describing the NICI data format is organized as follows:

MEF File Format

NICI data are processed by the Gemini Data-Handling System (DHS) and written in Multi-Extension FITS (MEF) format similar to other Gemini Instruments. The NICI MEF format contains a Primary Header followed by two extensions:

  • Primary Header
  • Extension 1: Red (holmes) channel header and data
  • Extension 2: Blue (watson) channel header and data

See the bottom of this page for an example NICI header.

Primary Header

The primary header contains keywords common to both channels: date and time, telescope configuration, environment, and instrument configuration items such as the AO system and Focal Plane Mask. Due to GSA requirements, the primary header also contains channel-specific keywords such as the filter and integration times that are repeated in the extension headers.

Extensions

The two extensions contain the data for each channel, called "red" and "blue" (or "holmes" and "watson" respectively, in much of NICI's engineering documentation). Both detectors are always read out and both extensions are always written, even when one channel may not have useful data eg. when the Dichroic Wheel is set to Mirror or Open. The first extension is always the Red channel and the second the Blue channel.

Extension Headers

The header of each extension contains information specific to the channel, such as the filter, the detector integration time and coadds, and the World Coordinate System (WCS). Although separate integration parameters are specified for each channel, in NICI's current implementation the detectors are read out identically so the two sets of parameters have the save values. However, the two WCS's indicate the different reflections and a slight rotation between the two channels (see the WCS section for details).

Extension Data

The image data are written in 32-bit floating point format. The pixel in the upper left corner of each detector is the first written to its corresponding extension. Note that by default most image viewers display the first pixel in the lower left corner, so NICI images will appear flipped up-down unless the data or image are inverted.

Science Detector Readout

Each of the two science detectors is paired with an array controller which contains real-time clocking patterns programmed into firmware, and a pixel server: a rackmount computer running linux which reads and processes data from the controller.

The detectors are read out using a sample-up-ramp algorithm as follows:

  • Each detector is read non-destructively by array controller every 0.38 s up to a total of N NDR's. The equivalent exposure time, which is listed as Exposure Time in the OT and ITIME_R and ITIME_B in the headers, is therefore (N-1)*0.38s.
  • At the end of the ramp, the pixel server software fits a slope m to the sampled values for each pixel and computes (N-1)*m as the signal value.
  • If NCOADDS > 1, the detectors are reset and another ramp begins. The successive frames are coadded in the pixel server memory.
  • After the desired number of coadds are taken, the controller passes the accumulated coadds to the DHS which writes the MEF extensions. The saved signal value is represented as S = NCOADDS * (N-1) * m.

Note that the recorded values are sums, not averages, so they may have to be scaled accordingly during data reduction, eg. to compare science and calibration data possibly taken with different NCOADDs. For example: for ADU per 0.38 s frame, compute S / (NCOADDS *(N-1)) for ADU per second, compute S / (NCOADDS * (N-1) * 0.38)

World Coordinate System

Each of the two NICI extensions contains a set of World Coordinate System (WCS) records for that channel's science data array.

Related to the WCS are two parameters: Instrument Position Angle (IPA) and Instrument Alignment Angle (IAA). The IPA is the position angle on sky, in degrees east of north, which is up on the science detector; i.e. IPA = 0 means that North will be up. The IAA is the rotation between the telescope and science detector reference frames. IPA and IAA are related by:

CassRotator Angle = IPA - Parallactic Angle - IAA + 180 deg.

For example, if a science detector is mounted exactly aligned with the telescope frame, IAA = 0. To achieve IPA = 0 (North up on detector) on the meridian where parallactic angle = 0, the CassRotator would be set to 180.

Because the TCS uses the IAA to position the Cass Rotator and thus the physical rotation of the instrument relative to sky, setting the IAA accurately is required to achieve the correct IPA that is requested by an observation. If NICI is dismounted from the telescope and moved to another port, or even if it is remounted on the same port, slight variances in the mounting require the IAA to be updated. After the IAA is set properly, instrument software parameters are updated to generate a correct WCS.

Image Distortion

The Gemini-standard WCS indicates the pixel scale and orientation of the data, but it does not include higher order terms such as distortion. With NICI, to measure and correct distortion the following procedure is used.

  • A rectangular grid mask in the Fiber Optic Calibration Source (FOCS) is inserted into the beam, illuminated with GCAL, and imaged with the science camera. This mask is at the telescope focal plane, above the NICI AO system, so the total distortion from both the AO and science camera optics is present in the images.
  • A perfectly rectilinear grid of points is fitted to the imaged mask spots over the inner ~ 512 pixels. The offset, spot separation, and rotation of the grid are adjusted to obtain the best least-squares fit. Only the inner section of the image, where distortion is small, is used for this initial step so that overall scale and rotation are not affected by the larger distortion near the edges and corners.
  • The position differences between the grid points and the spots are measured and fitted to an 3rd order polynomial using the IDL routine POLY_WARP. This routine generates a set of fitting coefficients kx and ky.
  • Science data are corrected by reading the files of fitting coefficients and applying them with the IDL routine POLY_2D.
  • Examples of the data and fitting coefficients:

    A simple example of applying the distortion corrections in IDL is:

          ;; Open MEF file and read Red (holmes) and Blue (watson) extensions
          fits_open, 'S20110101_S0001.fits', fcb
          fits_read, fcb, imh, hdrh, exten_no=1, /no_pdu
          fits_read, fcb, imw, hdrw, exten_no=2, /no_pdu
    
          ;; Warp holmes channel
          restore, 'niciwarp_focs_2010dec_h.sav'
          imh_w = poly_2d(imh, kx, ky, 2, cubic=-0.5)
    
          ;; Warp watson channel
          restore, 'niciwarp_focs_2010dec_w.sav'
          imw_w = poly_2d(imw, kx, ky, 2, cubic=-0.5)
    

    Calibrating the IAA and WCS

    The following procedure is used to calibrate the IAA and WCS.

    • A high-precision binary star or astrometric field is imaged with the AO loop closed.
    • The images are distortion-corrected using the above procedure.
    • The Red (holmes) channel position angle is measured and a new IAA value computed. (Strictly speaking, the IAA is correct for the Red channel only, due to the 1.1 degree rotation between the two detectors.)
    • The new IAA is applied, the data retaken, and the cycle is repeated until the IAA is correct.
    • The new WCS coefficients for both channels (including the 1.1 deg relative rotation of the Blue channel) are derived from the measured alignment and pixel scale, then applied to the instrument software which generates the WCS during observing.

    During NICI's history, we have steadily upgraded these procedures in order to improve the WCS accuracy. Our goal was to achieve a rotation accuracy of about 0.1 degree (1 pixel across NICI's 1024-pixel field is equivalent to 0.056 deg). Before November 2010, the binary stars 70 Oph and HDO 171 B-C were imaged for these calibrations. Stars with very precise orbits based on speckle imaging are required to reach 0.1 deg accuracy; we found that many binary orbits are insufficiently precise, and typical star pairs and star fields suffer from significant proper motion effects. These binaries' positions appeared to be sufficiently precise, but the components spanned only about 1/2 the field and saturated slightly with the AO loop closed, which limited the NICI measurement accuracy.

    Starting in November 2010 we began to use an LMC field that has been characterized for JWST calibrations. The field contains one 11 mag star for AO guiding, plus a dozen faint stars which can be detected with NICI. The distortion-corrected position data are fitted to a model which yields typical errors below 1 pixel rms.

    A reference to the JWST LMC field is at:
    Photometric and Astrometric Calibration of the JWST Instrument Complement, R. Diaz-Miller, 2006

    Note that the distortion correction is incorporated into the WCS measurement; therefore in order to achieve consistent astrometric results the above distortion correction must be applied.

    The following table summarizes the NICI port changes and subsequent IAA and WCS revisions.

    NICI IAA and WCS Measurements
    Mounting Date Port WCS Revision Date Target IAA Red Scale Blue Scale Example Dataset
    2008-07-2752008-10-0770 Oph 112.317.90017.900GS-NICI-COMM1-318
    2009-10-2412009-10-29HDO 171 B-C 247.518.06018.060Eng files 20101024 1-11
    2010-03-2052010-05-0970 Oph 111.717.80017.800GS-CAL20100509-2
    2010-10-2052010-12-14LMC-11mag 112.617.93217.970GS-CAL20101225-2
    2011-01-1412011-02-16LMC-11mag 247.517.97318.009GS-CAL20110117-2
    2011-03-1112011-03-14LMC-11mag 247.517.97318.009GS-CAL20110314-2
    2011-04-2712011-04-15LMC-11mag 247.517.97318.009GS-CAL20110512-1
    2011-06-0852011-06-24HIP 62403 112.8217.97818.014GS-CAL20110626-3
    2012-02-1552012-02-01LMC-11mag 112.6417.95017.986GS-CAL20120224-5
    2012-07-1352012-08-27LMC-11mag 112.4217.93617.973 --

    Table Description:

    • Mounting Date: The date NICI was mounted or remounted on the telescope.
    • Port : The port on which NICI was mounted, 5 = side-looking, 1 = up-looking.
    • WCS Revision Date : The date that the IAA and WCS parameters were updated for the final time after a remounting. Note that this date can be several days or weeks after the mounting date, due to delays caused by instrument problems or weather. (See below.)
    • Target : Target observed for alignment measurements.
    • IAA : IAA value derived from alignment, for N up at IPA=0 on distortion-corrected Red channel data.
    • Red Scale : Red channel pixel scale, in mas/pixel.
    • Blue Scale : Blue channel pixel scale, in mas/pixel.
    • Example Data : An example astrometric data set, taken after the WCS update when possible.

    Notes:

    • This table does not include details of the astrometric measurement efforts between the dates of an instrument mounting and the "final" WCS. Often, multiple measurement and correction cycles over several days or weeks were required due to instrument problems or poor weather. In some cases, we were forced to take science data with an incorrect WCS before the final astrometric solution was available. Information on correcting science data taken in these intermediate periods is available on request.
    • The relative rotation of the Blue channel relative to the Red is 1.1 degrees. Before 2010 Nov 22, the Blue channel WCS was incorrectly set to a relative angle of 0.8 degrees, due to a previous measurement error on one of the binary stars. Information on correcting this error is available on request.
    • The Blue channel pixel scale is approximately 1.002 times the Red channel scale. Before 2010 Nov 22, this is not represented in the two WCS's (both are set to the same scale), due to the limited precision of the binary star measurements. With the LMC astrometric field, however, the difference is detectable, so the WCS's now represent the different scales.
    • The uncertainty of the rotation measurement is approximately +-0.05 deg, as judged from both the precision of fitting the distortion-corrected images (typically 0.5 - 1.0 pixels), and the variation in the fitted angle between different images. Note that a 1 pixel shift across the width of the detector (1024 pixels) is equivalent to a rotation of 0.056 degrees.
    • The uncertainty in the pixel scale is also around 1 pixel across the detector, or 0.1%. Variations at the 0.1 - 0.2% level are present between the individual measurements.
    • The principal source of measurement error appears to be variability in PSF shape and quality across the field due to anisoplanatism in the AO correction. However, the distortion correction is also probably an important factor. We have not thoroughly investigated the sources of error at the 0.1% or 0.05 degree level.

    nici_fixwcs

    The IDL program

  • NICI_FIXWCS
  • corrects the NICI Red and Blue WCS's for known errors, based on the date of the image.

    Data Processing

    At present, the Gemini IRAF package does not include specific routines for processing NICI data. However, processing follows typical imaging data reduction pipeline steps (as for NIRI, for example). An experimental Python package for processing of NICI ADI/ASDI data using the LOCI algorithm is available, but it is not officially supported.

    Example NICI Header

    Extracted from file S20110117S0029.fits
    The keywords have been sorted into groups, and explanatory notes added for each group.
    
    PRIMARY HEADER
    --------------
    # DATE-OBS and TIME-OBS are generated by the low-level Instrument
    # Controller and most accurately indicate the start of the integration.
    DATE-OBS= '2011-01-17'         / UTC Date of observation (YYYY-MM-DD)           
    TIME-OBS= '01:28:01'           / UTC at array controller start of integration
    
    # Other times are generated by the higher-level software and are less accurate.
    UT      = '01:27:58.1'         / UTC at observation start                       
    MJD_OBS =           55578.0619 / MJD of start of obseration
    
    # Standard FITS keywords                     
    OBSERVAT= 'Gemini-South'       / Name of telescope (Gemini-North|Gemini-South)  
    TELESCOP= 'Gemini-South'       / Gemini-South                                   
    INSTRUME= 'NICI    '           / Instrument used to acquire data
    
    # Observers
    OBSERVER= 'Lee, Hayward'       / Gemini Observers                               
    SSA     = 'Wenderoth'          / Gemini SSAs
    
    # Gemini program, observation, and data labels
    OBSTYPE = 'OBJECT  '           / Observation type                               
    OBSCLASS= 'partnerCal'         / Observe class                                  
    GEMPRGID= 'GS-CAL20110117'     / Gemini Science Program ID                      
    OBSID   = 'GS-CAL20110117-2'   / Gemini Observation ID                          
    DATALAB = 'GS-CAL20110117-2-018' / DHS Data Label                               
    
    # Observing conditions as set by Observer in SeqExec at time of observation                                    
    RAWIQ   = '70-percentile'      / Raw Image Quality                              
    RAWCC   = '50-percentile'      / Raw Cloud Cover                                
    RAWWV   = '80-percentile'      / Raw Water Vapour/Transparency                  
    RAWBG   = '80-percentile'      / Raw Background
    
    # Data assessment and release status                                 
    RAWPIREQ= 'UNKNOWN '           / PI Requirements Met                            
    RAWGEMQA= 'UNKNOWN '           / Gemini Quality Assessment                      
    RELEASE = '2011-01-17'         / End of proprietary period YYYY-MM-DD           
    
    # Target and Pointing data from the TCS
    # Not to be confused with the WCS in the extensions
    OBJECT  = 'f606w_11.341'       / Object Name                                    
    FRAME   = 'FK5     '           / Target coordinate system                       
    EQUINOX =                2000. / Equinox of coordinate system                   
    EPOCH   =                2000. / Target Coordinate Epoch                        
    RA      =          80.48629583 / Target Right Ascension                         
    DEC     =         -69.44843889 / Target Declination                             
    PMRA    =                   0. / Target Proper Motion in RA                     
    PMDEC   =                   0. / Target Proper Motion in Declination            
    PARALLAX=                   0. / Target Parallax                                
    RADVEL  =                   0. / Target Heliocentric Radial Velocity            
    RATRGOFF=                   0. / Target offset in RA in arcsec                  
    DECTRGOF=                   0. / Target offset in DEC in arcsec                 
    RATRACK =                   0. / Differential tracking rate RA                  
    DECTRACK=                   0. / Differential tracking rate Dec                 
    WAVELENG=               16520. / Effective Target Wavelength                    
    TRKFRAME= 'FK5     '           / Tracking co-ordinate                           
    TRKEQUIN=                2000. / Tracking equinox                               
    XOFFSET =       -3.53700546226 / Telescope offset in x in arcsec                
    YOFFSET =       0.699708767922 / Telescope offset in y in arcsec                
    POFFSET =                  -2. / Telescope offset in p in arcsec                
    QOFFSET =                  -3. / Telescope offset in q in arcsec                
    RAOFFSET=                   2. / Telescope offset in RA in arcsec               
    DECOFFSE=                   3. / Telescope offset in DEC in arcsec
    
    # Additional Pointing Data
    HA      = '-00:52:22.05'       / Telescope hour angle                           
    ELEVATIO=     50.1760388888889 / Current Elevation                              
    AZIMUTH =     172.835761111111 / Current Azimuth                                
    AIRMASS =                1.301 / Mean airmass for the observation               
    AMSTART =                1.301 / Airmass at start of exposure                   
    AMEND   =                1.301 / Airmass at end of exposure                     
    PA      =                   0. / Sky Position Angle at start of exposure 
    
    # Telescope Configuration       
    INPORT  =                    1 / Number of ISS port where instrument is located 
    CRPA    =    -49.5685362028393 / Current Cass Rotator Position Angle            
    CRMODE  = 'FOLLOW  '           / Cass Rotator Mode                              
    CGUIDMOD= 'Basic   '           / Carousel Mode                                  
    M2BAFFLE= 'RETRACTED'          / Position of M2 baffle                          
    M2CENBAF= 'OPEN    '           / Position of M2 central hole baffle             
    IAA     =                247.5 / Instrument Alignment Angle                     
    SFRT2   =               -0.373 / Science fold rotation angle (degrees)          
    SFTILT  =                 3.17 / Science fold tilt angle (degrees)              
    SFLINEAR=              -357.15 / Science fold linear position (mm)              
    AOFOLD  = 'park-pos.'          / AO Pick-Off Mirror Position                    
    PWFS1_ST= 'parked  '           / PWFS1 probe state (frozen,guiding,parked)      
    PWFS2_ST= 'guiding '           / PWFS2 probe state (frozen,guiding,parked)      
    OIWFS_ST= 'guiding '           / OIWFS probe state (frozen,guiding,parked)      
    AOWFS_ST= 'parked  '           / AOWFS probe state (frozen,guiding,parked)      
    P2FOCUS =                -0.06 / PWFS2 Focus Offset (mm)                        
    
    # Peripheral Wavefront Sensor pointing data
    OBSEPOCH=                   0. / Epoch at start of exposure                     
    P2AOBJEC= 'GSC0916200265'      / Object Name for PWFS 2, Chop A                 
    P2AFRAME= 'FK5     '           / PWFS2 Target co-ordinate system                
    P2AEQUIN=                2000. / Equinox for PWFS2 guide star coordinates       
    P2AEPOCH=                2000. / Epoch for PWFS2 guide star coordinates         
    P2ARA   =          80.57442917 / RA of PWFS2 guide star                         
    P2ADEC  =         -69.35331111 / Declination of PWFS2 guide star                
    P2APMRA =                   0. / PWFS2 Proper Motion in RA                      
    P2APMDEC=                   0. / PWFS2 Proper Motion in Declination             
    P2ARV   =                   0. / PWFS2 Heliocentric Radial Velocity             
    P2APARAL=                   0. / PWFS2 Parallax of Target                       
    P2AWAVEL=                6500. / PWFS2 Effective Target Wavelength              
    
    # On-Instrument Wavefront Sensor (i.e. the NICI AO System) pointing data
    OIAOBJEC= 'f606w_11.341'       / Object Name for OIWFS, Chop A                  
    OIAFRAME= 'FK5     '           / OIWFS Target co-ordinate system                
    OIAEQUIN=                2000. / Equinox for OIWFS guide star coordinates       
    OIAEPOCH=                2000. / Epoch for OIWFS guide star coordinates         
    OIARA   =          80.48629583 / RA of OIWFS guide star                         
    OIADEC  =         -69.44843889 / Declination of OIWFS guide star                
    OIAPMRA =                   0. / OIWFS Proper Motion in RA                      
    OIAPMDEC=                   0. / OIWFS Proper Motion in Declination             
    OIARV   =                   0. / OIWFS Heliocentric Radial Velocity             
    OIAPARAL=                   0. / OIWFS Parallax of Target                       
    OIAWAVEL=                7000. / OIWFS Effective Target Wavelength              
    
    # Telescope environment
    # Also provided in furlongs per fortnight and other imperial units (not shown) 
    HUMIDITY=                  14. / The relative humidity (fraction, 0..101).      
    TAMBIENT=                 13.1 / The ambient temp (C).                          
    DEWPOINT=                -13.7 / The dew point (C).                             
    PRESSURE=             547.7044 / The atmospheric pressure (mm Hg).              
    WINDSPEE=                  4.5 / The wind speed (m/s).                          
    WINDDIRE=                 349. / The wind direction (degrees).                  
    
    # NICI AO System Configuration
    FOCS    = 'Open    '           / Fiber Optic Calib. Src.                        
    FOCS_OFF=                  -4. / Fiber Optic Calib. Src. Offset                 
    FOCSLASR=                    F / Laser calibration source on                    
    FOCSIR  =                    F / IR calibration source on                       
    TTSM    = '{7105 -8301}'       / TipTilt Position                               
    NDFW    = 'Open    '           / Neutral Density Filter Wheel                   
    
    LPSTATE = 'feedback'           / AO loop state: idle | feedback | pr.imat | ttdm
    PRSERVO = 'pr      '           / AO primary servo state: off | pr               
    TTSERVO = 'off     '           / AO secondary (TT) servo state: off | dm        
    PRGAIN  =                 0.11 / AO pr.gain                                     
    EFD     =             0.565087 / AO extra focal distance                        
    DMFRNTEL=                 0.26 / AO DM Front electrode (UH DM only)             
    CNTLMAT = 'uhdm_20110107_3500BCDavg.inv.' / AO Control Matrix                   
    HVAPS   =                    T / AO DM HVA Power Supply State                   
    APD1PS  =                    T / AO APD1 Power Supply State                     
    APD2PS  =                    T / AO APD2 Power Supply State                     
    HVACHAS =                    T / AO HVA Chassis State                           
    CNTRCHAS=                    T / AO Counter Chassis State                       
    LPOPTON =                    F / AO Loop Optimizer running                      
    AOCHNGD =                    F / AO parameters changed during capture           
    FOCOFFEN=                    F / AO Focus offload to telescope enable           
    TTOFFEN =                    F / AO TT offload to telescope enable              
    TTGSIGN =                  -1. / AO tt.sign                                     
    APDTEMP =                  1.7 / AO APD temperature sensor (deg C)              
    MEMSTK  =                 3501 / AO membrane stroke                             
    LP_SEC  =               197332 / AO Loop Counter status (seconds since boot)    
    TTGAIN  =                   0. / AO tt.gain                                     
    MEMPHA  =                67000 / AO membrane phase                              
    MEMFRQ  =                 1300 / AO membrane frequency                          
    DCFLOOR =               0.0001 / AO DC threshold/floor                          
    PRGSIGN =                  -1. / AO pr.sign                                     
    LPCOADDS=                    1 / AO loop Coadds                                 
    LOOPFRQ =                 1300 / AO Loop Update Rate                            
    LPCOUNT =            256526878 / AO Loop Counter at capture start (cycles since 
    
    # NICI Science Camera Configuration -- elements common to both channels
    FPMW    = 'Clear_G5710'        / Focal Plane Mask Wheel                         
    FPMW_OFF=                 0.02 / Focal Plane Mask Offset (deg)                  
    PMW     = '95_G5731'           / Pupil Mask Wheel                               
    SMR     =                16.01 / Spider Mask Rotator angle (deg)                
    SMRMODE = 'FIXED   '           / Spider Mask Mode                               
    DICHROIC= 'H-50/50_G5701'      / Dichroic Wheel                                 
    
    # Red Channel Configuration (records duplicated in Ext 1 header)
    BIAS_R  = 'mid     '           / Red detector bias                              
    MODE_R  = 'sur     '           / Red exposure mode                              
    SLOWCT_R=                   24 / Red detector slow counts                       
    ITIME_R =                30.02 / Red integration time                           
    NDR_R   =                   80 / Red non-destructive reads                      
    NCOADD_R=                    1 / Red number of co-adds                          
    FILTER_R= 'CH4-H4%L_G0740'     / Red Filter Wheel                               
    PI      = 'Open    '           / Pupil Imager                                   
    
    # Blue Channel Configuration (records duplicated in Ext 2 header)
    BIAS_B  = 'mid     '           / Blue detector bias                             
    MODE_B  = 'sur     '           / Blue exposure mode                             
    SLOWCT_B=                   24 / Blue detector slow counts                      
    ITIME_B =                30.02 / Blue integration time                          
    NDR_B   =                   80 / Blue non-destructive reads                     
    NCOADD_B=                    1 / Blue number of co-adds                         
    FILTER_B= 'CH4-H4%S_G0743'     / Blue Filter Wheel                              
    
    
    Extension 1: Red (holmes) Channel 
    ---------------------------------
    
    # Required FITS keywords                            
    XTENSION= 'IMAGE   '           / IMAGE extension    
    BITPIX  =                  -32 / number of bits per data pixel                  
    NAXIS   =                    2 / number of data axes                            
    NAXIS1  =                 1024 / length of data axis 1                          
    NAXIS2  =                 1024 / length of data axis 2  
    
    # Gemini keywords                        
    FRMNAME = 'dhsPut-nici-data1'  / Name assigned to a frame of data.              
    FRAMEID = '2       '           / Gemini frame identifier                        
    DATATYPE= '        '                                                            
    EXTNAME = 'SCI     '           / Extension Name                                 
    EXTVER  =                   -1 / Number assigned to a FITS extension.           
    PCOUNT  =                    0 / required keyword; must = 0                     
    GCOUNT  =                    1 / required keyword; must = 1                     
    
    # Channel and Detector
    CHANNEL = 'RED     '           / Science Camera Channel                         
    DETNAME = 'SCA-47814'          / Sensor Chip Assembly Number                    
    
    # Red Channel Configuration
    SUBARRAY= ' { 0 0 512 512 } '  / Region of interest                             
    BIAS_R  = 'mid     '           / Red detector bias                              
    MODE_R  = 'sur     '           / Red exposure mode                              
    SLOWCT_R=                   24 / Red detector slow counts                       
    ITIME_R =                30.02 / Red integration time                           
    NDR_R   =                   80 / Red non-destructive reads                      
    NCOADD_R=                    1 / Red number of co-adds                          
    FILTER_R= 'CH4-H4%L_G0740'     / Red Filter Wheel                               
    PI      = 'Open    '           / Pupil Imager                                   
    
    # WCS for Red Channel
    RADECSYS= 'FK5     '           / R.A./DEC. coordinate system reference          
    CTYPE1  = 'RA---TAN'           / R.A. in tangent plane projection               
    CTYPE2  = 'DEC--TAN'           / DEC. in tangent plane projection               
    CRVAL1  =           80.4883844 / RA at Ref pix in decimal degrees               
    CRVAL2  =          -69.4482734 / DEC at Ref pix in decimal degrees              
    CRPIX1  =           413.999522 / Ref pix of axis 1                              
    CRPIX2  =           594.997314 / Ref pix of axis 2                              
    CD1_1   =       5.01646534E-06 / WCS matrix element 1 1                         
    CD1_2   =       8.26096075E-11 / WCS matrix element 1 2                         
    CD2_1   =      -3.29874171E-10 / WCS matrix element 2 1                         
    CD2_2   =      -5.01703714E-06 / WCS matrix element 2 2                         
    
    
    Extension 2: Blue (watson) Channel 
    ----------------------------------
    
    # Required FITS keywords                            
    XTENSION= 'IMAGE   '           / IMAGE extension                                
    BITPIX  =                  -32 / number of bits per data pixel                  
    NAXIS   =                    2 / number of data axes                            
    NAXIS1  =                 1024 / length of data axis 1                          
    NAXIS2  =                 1024 / length of data axis 2                          
    
    # Gemini keywords       
    FRMNAME = 'dhsPut-nici-data2'  / Name assigned to a frame of data.              
    FRAMEID = '3       '           / Gemini frame identifier                        
    DATATYPE= '        '                                                            
    EXTNAME = 'SCI     '           / Extension Name                                 
    EXTVER  =                   -1 / Number assigned to a FITS extension.           
    PCOUNT  =                    0 / required keyword; must = 0                     
    GCOUNT  =                    1 / required keyword; must = 1                     
    
    # Channel and Detector
    CHANNEL = 'BLUE    '           / Science Camera Channel                         
    DETNAME = 'SCA-47815'          / Sensor Chip Assembly Number                    
    
    # Blue Channel Configuration
    SUBARRAY= ' { 0 0 512 512 } '  / Region of interest                             
    BIAS_B  = 'mid     '           / Blue detector bias                             
    MODE_B  = 'sur     '           / Blue exposure mode                             
    SLOWCT_B=                   24 / Blue detector slow counts                      
    ITIME_B =                30.02 / Blue integration time                          
    NDR_B   =                   80 / Blue non-destructive reads                     
    NCOADD_B=                    1 / Blue number of co-adds                         
    FILTER_B= 'CH4-H4%S_G0743'     / Blue Filter Wheel                              
    
    # WCS for Blue Channel
    RADECSYS= 'FK5     '           / R.A./DEC. coordinate system reference          
    CTYPE1  = 'RA---TAN'           / R.A. in tangent plane projection               
    CTYPE2  = 'DEC--TAN'           / DEC. in tangent plane projection               
    CRVAL1  =           80.4883844 / RA at Ref pix in decimal degrees               
    CRVAL2  =          -69.4482734 / DEC at Ref pix in decimal degrees              
    CRPIX1  =           570.000515 / Ref pix of axis 1                              
    CRPIX2  =           650.997321 / Ref pix of axis 2                              
    CD1_1   =       -5.0159887E-06 / WCS matrix element 1 1                         
    CD1_2   =      -6.99793144E-08 / WCS matrix element 1 2                         
    CD2_1   =       7.03997325E-08 / WCS matrix element 2 1                         
    CD2_2   =      -5.01655469E-06 / WCS matrix element 2 2