
# these are examples of camera definition variables:
# skyprobe
NCELL       S32    1
NCHIP       S32    1
#                  FILENAME    EXTNAME  REGION      CHIP      BIASSEC     
CELL.00     STR    %f00.%x     PHU      [0,0:0,0]   CHIP.00   [0,0:0,0] 
                   
# megacam-raw      
NCELL       S32    72
NCHIP       S32    36
#                  FILENAME    EXTNAME  DATASEC     CHIP      BIASSEC     
CELL.00     STR    %f.%x       AMP00    [0,0:0,0]   CHIP.00   BIASSEC
CELL.01     STR    %f.%x       AMP01    [0,0:0,0]   CHIP.00   [2100,2110:0,4096]   
CELL.02     STR    %f.%x       AMP02    [0,0:0,0]   CHIP.01   [0,0:0,0]   
CELL.03     STR    %f.%x       AMP03    [0,0:0,0]   CHIP.01   [0,0:0,0]   

# megacam-splice
NCELL       S32    72
NCHIP       S32    36

TYPE        CELL   FILENAME:STR  EXTNAME  REGION          BIASSEC   TRIMSEC  CHIP      
CELL.00     CELL   %f.%x         CCD00    HEADER:ASEC-00  BSEC-00   DSEC-00  CHIP.00   
CELL.01     CELL   %f.%x         CCD00    HEADER:ASEC-01  BSEC-01   DSEC-01  CHIP.00   
CELL.02     CELL   %f.%x         CCD01    HEADER:ASEC-00  BSEC-00   DSEC-00  CHIP.01   
CELL.03     CELL   %f.%x         CCD01    HEADER:ASEC-01  BSEC-01   DSEC-01  "chip  foo"
CELL.03     CELL   DEFAULT=CELL.00 FILENAME=%f.%x

FPA:
 CHIP.00     
  CELL.00     CELL   %f.%x         CCD00    ASEC-00     BSEC-00   DSEC-00  CHIP.00   
  CELL.01     CELL   %f.%x         CCD00    ASEC-01     BSEC-01   DSEC-01  CHIP.00   
 CHIP.01
  CELL.02     CELL   %f.%x         CCD01    ASEC-00     BSEC-00   DSEC-00  CHIP.01   
  CELL.03     CELL   %f.%x         CCD01    ASEC-01     BSEC-01   DSEC-01  "chip  foo"


# gpc
NCELL       S32    4
NCHIP       S32    2
#                  FILENAME    EXTNAME  DATASEC      CHIP      BIASSEC     
CHIP.00.CELL.00     STR    %f/%f00.%x  CELL00   "[0,0:0,0]"  CHIP.00   RECIPE:[0,0:0,0]   
CHIP.00.CELL.01     STR    %f/%f00.%x  CELL01   "DATASEC"    CHIP.00   RECIPE:[0,0:0,0]   
#

TYPE     CHIP    NCELL 
TYPE     CELL    FILENAME:STR  EXTNAME  REGION          BIASSEC   TRIMSEC  CHIP      

CHIP.01  CHIP    2
# TYPE                CELL   FILENAME:STR  EXTNAME  REGION          BIASSEC   TRIMSEC  CHIP      
  CHIP.01.CELL.00     CELL   %f/%f01.%x    CELL02   RECIPE:[0,0:0,0] CHIP.01   [0,0:0,0]   
  CHIP.01.CELL.01     CELL   %f/%f01.%x    CELL03   RECIPE:[0,0:0,0] CHIP.01   [0,0:0,0]   

CHIP.00     CHIP   



f12345
CHIP37



# cfh12k-split
NCELL       S32    12
NCHIP       S32    12
#                  FILENAME    EXTNAME  REGION      CHIP      BIASSEC     
CELL.00     STR    %f/%f00.%x  PHU      [0,0:0,0]   CHIP.00   [0,0:0,0]   
CELL.01     STR    %f/%f01.%x  PHU      [0,0:0,0]   CHIP.01   [0,0:0,0]   
CELL.02     STR    %f/%f02.%x  PHU      [0,0:0,0]   CHIP.02   [0,0:0,0]   

# cfh12k-mef
NCELL       S32    12
NCHIP       S32    12
#                  FILENAME    EXTNAME  REGION      CHIP      BIASSEC     
CELL.00     STR    %f.%x       CHIP00   [0,0:0,0]   CHIP.00   [0,0:0,0]   
CELL.01     STR    %f.%x       CHIP01   [0,0:0,0]   CHIP.01   [0,0:0,0]   
CELL.02     STR    %f.%x       CHIP02   [0,0:0,0]   CHIP.02   [0,0:0,0]   

- REGION can be defined by a header keyword in IRAF format or by a explicit IRAF format 
- what is default for NAXIS1,2 for IRAF format?
- Nreadout is always NAXIS3?

# recipe file:
# this makes the assumption that, for a given camera, all chips &
# cells have the same recipe.  this is probably a good start, but may
# not cut it in general. eg, it is already clear that for 

# recipe file must be a function of time and camera.
# 

# BIAS:
BIAS.IMAGE                 STR    NONE
BIAS.IMAGE  		   STR    FILE:bias.fits
BIAS.IMAGE  		   STR    DB:BEST
BIAS.IMAGE  		   STR    DB:CLOSE

BIAS.OVERSCAN 		   STR    HEADER:BIASSEC
BIAS.OVERSCAN 		   STR    RECIPE:[0,0:0,0]
BIAS.OVERSCAN 		   STR    NONE

BIAS.OVERSCAN.STATS 	   STR    MEDIAN
BIAS.OVERSCAN.STATS 	   STR    MEAN

BIAS.OVERSCAN.FIT          STR    SPLINE
BIAS.OVERSCAN.FIT.NPTS     S32    5

BIAS.OVERSCAN.FIT          STR    POLYNOMIAL
BIAS.OVERSCAN.FIT.ORDER    S32    3
BIAS.OVERSCAN.FIT.NBIN     S32    5

bias image: 
     none
     filename
     database: best
     database: acceptable match

overscan:
     from header: BIASSEC
     use region ['x0,x1:y0:y1']
     statistics: median
     direction PM_OVERSCAN_COLUMNS
     fit: POLYNOMIAL
     order: 3

bias
dark
non-linearity
flat
mask
trim
fringe (no large-scale structure?)

detect objects
astrometrize objects
