# Camera configuration file for MegaCam: describes the camera

# File formats that we know about
FORMATS         METADATA
        MEF 	STR     megacam/format_mef.config
        RAW     STR     megacam/format_raw.config
        MEF_03 	STR     megacam/format_pre_03Am04_mef.config
        RAW_03  STR     megacam/format_pre_03Am04_raw.config
        SPLIT   STR     megacam/format_split.config
END

# Description of camera --- all the chips and the cells that comprise them
FPA     METADATA
        ccd00   STR     LeftAmp RightAmp
        ccd01   STR     LeftAmp RightAmp
        ccd02   STR     LeftAmp RightAmp
        ccd03   STR     LeftAmp RightAmp
        ccd04   STR     LeftAmp RightAmp
        ccd05   STR     LeftAmp RightAmp
        ccd06   STR     LeftAmp RightAmp
        ccd07   STR     LeftAmp RightAmp
        ccd08   STR     LeftAmp RightAmp
        ccd09   STR     LeftAmp RightAmp
        ccd10   STR     LeftAmp RightAmp
        ccd11   STR     LeftAmp RightAmp
        ccd12   STR     LeftAmp RightAmp
        ccd13   STR     LeftAmp RightAmp
        ccd14   STR     LeftAmp RightAmp
        ccd15   STR     LeftAmp RightAmp
        ccd16   STR     LeftAmp RightAmp
        ccd17   STR     LeftAmp RightAmp
        ccd18   STR     LeftAmp RightAmp
        ccd19   STR     LeftAmp RightAmp
        ccd20   STR     LeftAmp RightAmp
        ccd21   STR     LeftAmp RightAmp
        ccd22   STR     LeftAmp RightAmp
        ccd23   STR     LeftAmp RightAmp
        ccd24   STR     LeftAmp RightAmp
        ccd25   STR     LeftAmp RightAmp
        ccd26   STR     LeftAmp RightAmp
        ccd27   STR     LeftAmp RightAmp
        ccd28   STR     LeftAmp RightAmp
        ccd29   STR     LeftAmp RightAmp
        ccd30   STR     LeftAmp RightAmp
        ccd31   STR     LeftAmp RightAmp
        ccd32   STR     LeftAmp RightAmp
        ccd33   STR     LeftAmp RightAmp
        ccd34   STR     LeftAmp RightAmp
        ccd35   STR     LeftAmp RightAmp
END

# move this elsewhere?  we need a lookup table to go from filter ID to abstract name
FILTER.ID       METADATA
   u        STR   u.MP9301     
   g        STR   g.MP9401     
   r        STR   r.MP9601     
   i        STR   i.MP9701     
   z        MULTI
   z        STR   z.MP9801     
   z        STR   Zp           
   z        STR   Zprime       

   Ha       MULTI
   Ha       STR   Ha.MP7605    
   Ha       STR   Halpha       
   Ha       STR   Haalpha.on   
   HaOff    STR   HaOFF.MP7604 
   	              		
   CN       MULTI
   CN       STR   CN.MP780     
   CN       STR   cn.MP7803    
   CN       STR   CN.MP7803    
   	              		
   TiO      MULTI
   TiO      STR   TiO.MP77     
   TiO      STR   tio.MP7701   
   TiO      STR   TiO.MP7701   
   NB920    STR   NB920        
   	              		
   B2F      STR   B2F          
   Bj       STR   Bj           
   Vj       STR   Vj           
   Rj       STR   Rj           
   Ij       STR   Ij           
   Hb       STR   Hb           
   HbOff    STR   HbOff        
END

# Table of strings to use for the class identifier (see ippdb) according to the file level.
CLASSID         METADATA
        FPA     STR     fpa
        CHIP    STR     {CHIP.NAME}
        CELL    STR     {CHIP.NAME}:{CELL.NAME}
        fpa     STR     fpa
        chip    STR     {CHIP.NAME}
        cell    STR     {CHIP.NAME}:{CELL.NAME}
END

DVO.CAMERADIR	STR	megacam		# Camera directory for DVO

# convert supplied FPA.OBSTYPE values to abstract exptype names
OBSTYPE.TABLE METADATA
  bias     STR BIAS
  zero     STR BIAS
  dark     STR DARK
  flat     STR SKYFLAT
  skyflat  STR SKYFLAT
  domeflat STR DOMEFLAT
  object   STR OBJECT
  science  STR OBJECT
END

# Recipe options
RECIPES         METADATA
        # Other recipes
        PSPHOT          STR     megacam/psphot.config           # psphot details
        PSASTRO         STR     megacam/psastro.config          # psastro details
	PSWARP		STR	megacam/pswarp.config		# pswarp details
        PPIMAGE         STR     megacam/ppImage.config          # ppImage recipe
	REJECTIONS      STR     megacam/rejections.config       # rejection recipe
	PPMERGE		STR	megacam/ppMerge.config		# ppMerge recipe
END

# reduction classes (recipes which are grouped together)
REDUCTION	STR	recipes/reductionClasses.mdc

FITSTYPES       STR     recipes/fitstypes.mdc

FILERULES	STR	recipes/filerules-mef.mdc		# File rules appropriate for MEF format

EXTNAME.RULES METADATA
  CMF.HEAD   STR {CHIP.NAME}.hdr
  CMF.DATA   STR {CHIP.NAME}.psf # use .PSF and .EXT?
  CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT?
  CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT?

  PSF.HEAD   STR {CHIP.NAME}.hdr
  PSF.TABLE  STR {CHIP.NAME}.psf_model
  PSF.RESID  STR {CHIP.NAME}.psf_resid

  REF.ASTROM STR {CHIP.NAME}.ref_astrom
END

BLANK.HEADERS	METADATA
	FPA.TIME	STR	MJD-OBS
	FPA.EXPOSURE	STR	EXPTIME
	FPA.AIRMASS	STR	AIRMASS
	FPA.OBS		STR	EXPNUM
END
