
# astrometry matching parameters

# nominal plate scale (microns / pixel)
PSASTRO.PIXEL.SCALE    F32  1.0

# pmAstromGridAngle
# max grid offset in FP units (microns)
# use plate-scale to make this in pixels?
PSASTRO.GRID.OFFSET    F32    1000.
PSASTRO.GRID.SCALE     F32      50
PSASTRO.GRID.NSTAR.MAX S32     800 # max stars accepted for fitting

PSASTRO.MAX.NRAW      S32       200   # max stars accepted for fitting (0 for all)
PSASTRO.MAX.NREF      S32      5000   # max stars accepted for fitting (0 for all)

# extra field for ref stars:
PSASTRO.FIELD.PADDING  F32     0.3   # pad by this fraction of the full mosaic (may need to be larger for single chips)

# 
PSASTRO.MIN.INST.MAG.RAW       F32     -17.0   # min instrumental magnitude for stars accepted for fitting
PSASTRO.MAX.INST.MAG.RAW       F32     -10.0   # max instrumental magnitude for stars accepted for fitting

#
PSASTRO.GRID.MIN.ANGLE F32 -1.0 # start angle (degrees)
PSASTRO.GRID.MAX.ANGLE F32 +1.0
PSASTRO.GRID.DEL.ANGLE F32  0.5

#
PSASTRO.GRID.MIN.SCALE F32  1.00
PSASTRO.GRID.MAX.SCALE F32  1.00
# PSASTRO.GRID.MIN.SCALE F32  0.98
# PSASTRO.GRID.MAX.SCALE F32  1.021
PSASTRO.GRID.DEL.SCALE F32  0.01

# single-chip radius match in pixels
PSASTRO.MATCH.RADIUS.N0 F32    90
PSASTRO.MATCH.RADIUS.N1 F32    60
PSASTRO.MATCH.RADIUS.N2 F32    30
PSASTRO.MATCH.RADIUS.N3 F32    20
PSASTRO.MATCH.RADIUS.N4 F32    20
PSASTRO.MATCH.RADIUS.N5 F32    20
PSASTRO.MATCH.RADIUS.N6 F32    10
PSASTRO.MATCH.RADIUS.N7 F32    10
PSASTRO.MATCH.FIT.NITER S32     8

# XXX Test for taurus
PSASTRO.GRID.MIN.SIGMA  F32  1.0
PSASTRO.IGNORE          STR  SATURATED,CRLIMIT,DEFECT,BLEND,FAIL

# these tweak are in FP units (pixels, currently)
PSASTRO.TWEAK.SCALE     F32      1
PSASTRO.TWEAK.RANGE     F32    150
PSASTRO.TWEAK.SMOOTH    F32      2
PSASTRO.TWEAK.NSIGMA    F32      3

PSASTRO.USE.MODEL             BOOL     TRUE

# PSASTRO.FIX.CHIPS             BOOL     TRUE
PSASTRO.PIXEL.TOLERANCE       F32      20.0
PSASTRO.ANGLE.TOLERANCE       F32      1.0

# Mosaic Astrometry options
PSASTRO.MOSAIC.MODE         BOOL   FALSE
# PSASTRO.MOSAIC.MAX.ERROR.N0 F32    1.80 # max allow error for valid solution (arcsec)
# PSASTRO.MOSAIC.MAX.ERROR.N1 F32    1.20 # max allow error for valid solution (arcsec)
# PSASTRO.MOSAIC.MAX.ERROR.N2 F32    0.80 # max allow error for valid solution (arcsec)
# PSASTRO.MOSAIC.MAX.ERROR.N3 F32    0.50 # max allow error for valid solution (arcsec)

PSASTRO.MOSAIC.MAX.ERROR.N0 F32    5.00 # max allow error for valid solution (arcsec)
PSASTRO.MOSAIC.MAX.ERROR.N1 F32    5.00 # max allow error for valid solution (arcsec)
PSASTRO.MOSAIC.MAX.ERROR.N2 F32    5.00 # max allow error for valid solution (arcsec)
PSASTRO.MOSAIC.MAX.ERROR.N3 F32    5.00 # max allow error for valid solution (arcsec)

# mosaic radius match in pixels
PSASTRO.MOSAIC.RADIUS.N0    F32    10
PSASTRO.MOSAIC.RADIUS.N1    F32    5
PSASTRO.MOSAIC.RADIUS.N2    F32    3

PSASTRO.MOSAIC.CHIP.ORDER     S32      1  # limit chip-fit order to 1
PSASTRO.MOSAIC.CHIP.ORDER.N0  S32      0 # fit order (-1 means use default)
PSASTRO.MOSAIC.CHIP.ORDER.N1  S32      0 # fit order (-1 means use default)
PSASTRO.MOSAIC.CHIP.ORDER.N2  S32      1 # fit order (-1 means use default)
PSASTRO.MOSAIC.CHIP.ORDER.N3  S32      1 # fit order (-1 means use default)

# we need to allow a loose fit if we are fitting to 2mass (50mas internal error -> 100mas limit?)
# if we are fitting against quality digital data, we can require tighter constraints

PSASTRO.MODEL.REF.CHIP        STR      XY33

PSASTRO.CATDIR              STR      2MASS
DVO.GETSTAR.PHOTCODE        STR      2MASS_J
DVO.GETSTAR.MAG.MAX         F32      21.0
