=
=  Default Parameter File for DoPHOT.
=
=  THIS IS THE MASTER DoPHOT DEFAULT PARAMETER FILE AND IT SHOULD NOT BE 
=  DELETED OR MODIFIED!
=
=  DoPHOT Parameter files are pseudo-FITS headers.  Each line must have an
=  equals sign and at least one blank space immediately before and after it.
=  Comments may be placed after the parameter value on any line and the equal
=  sign may be located anywhere on a line.  A maximum of 80 characters is
=  allowed per line.  Character variables MUST be enclosed in single quotes.
=  All keyword names must start in the first column.  Normal Fortran naming
=  conventions are used to identify integer and real variables:  keywords
=  starting with letters between I and N (inclusive) represent integer
=  variables, all others are reals except for variables in quotes which are
=  assumed to be character variables.  No restrictions apply to character
=  variable keyword names except that all keyword names must be kept to under
=  20 characters.  Null character variables are represented as a blank space
=  between single quotes.  To avoid confusion, avoid using two consecutive
=  single quotes.
=
=  In this master file, the parameters are grouped according to the typical
=  frequency with which they are modified.  Short descriptions for each
=  parameter are provided following the default value.   These defaults are
=  designed to work for a `typical' TI CCD image.
=
=
=  FREQUENTLY UPDATED PARAMETERS.  These parameters mostly depend on the
=  typical size of stellar objects on a given frame and on the mean sky value
=  for the image.  These parameters tend to be different for every frame.
=  Also included are the bookkeeping parameters that specify file names.
=
SKY = 0.0              Approximate mean sky value in data numbers.
FWHM = 2.0             Approx FWHM of objects (pixels) along major axis.
SIGSKY = 0.1           Approx 1 sigma sky variation in data numbers.
AXIS_RATIO = 1.0       For star objects.  AR=b/a; b=minor axis.
TILT = 0.0             Angle of major axis in degrees; +x=0; +y=90.
EPERDN = 1.9           Electrons per data number.
RDNOISE = 6.7          Readout noise in electrons.
TOP = 18000.0          Maximum allowed data value in data numbers.
TEXPOSED = 1.0         Total exposition time in seconds.
=
AUTOSCALE = 'YES'      Auto-scaling of fitting and masking radii by FWHM.
AUTOSCALEAP = 'YES'    Auto-scaling of star and sky aperture radii by FWHM.
AUTOTHRESH = 'YES'     Auto-scaling of thresholds and bottom.
AUTOBLIT = 'YES'       Auto-scaling of obliteration parameters.
AUTOMEDSCALE = 'YES'   Auto-scaling for median filter box size.
= If autoscale=no take these parameters.
FITRADIUS = 3.0        Radius of the fitting circle.
MASKRADIUS = 3         Radius of the masking circle.
= If autoscaleap=no take these parameters.
APRADIUS = 10.0         Radius of the aperture photometry circle.
APSKYMIN = 12.0         Inner radius of sky aperture.
APSKYMAX = 15.0        Outer radius of sky aperture.
= If autothresh=no take these parameters.
BOTTOM = -50.0         Lowest allowed data value in data numbers.
THRESHMAX = 18000.0    Value of maximum threshold.
THRESHMIN = 20.0       Value of lowest threshold.
=
FIXPOS = 'NO'          Fix star positions if warmstart is used.
FIXSHAPE = 'NO'        Fix star shapes if warmstart is used.
VARIABLE_PSF = 'NO'    Use a variable PSF.
APERTURE_PHOT = 'NO'   Perform just aperture photometry.
MASK_SATURATED = 'YES' Mask/oblitarate saturated stars
=
PARAMS_DEFAULT = 'paramdefault'      Default parameters file name.
PARAMS_OUT = 'param_out'             Output parameters file name.
IMAGE_IN = 'image_in'                Input image name.
IMAGE_OUT = ' '                      Output image name.
OBJECTS_IN = ' '                     Input object list file name.
OBJECTS_OUT = 'objects_out'          Output object list file name.
SHADOWFILE_IN = ' '                  Input shadow file name.
SHADOWFILE_OUT = ' '                 Output shadow file name.
AUTOMATCH_FILE = ' '                 Template file for automatching.
APCORRFILE = ' '                     Aperture correction file name.
LOGVPSF = ' '                        File with log of variable PSF coeffs.
LOGFILE = 'TERM'                     Log file name.  TERM for screen.
FINISHFILE = 'finish'                File with finishing info.
LOGVERBOSITY = 1                     Verbosity of log file; (0-4).
=
=
=  OCCASIONALLY UPDATED PARAMETERS.  These parameters tend to not change for a
=  set of images obtained during a single observing run or for frames of a
=  single field.
=
RESIDNOISE = 0.3       Fraction of noise to ADD to noise file.
FOOTPRINT_NOISE = 1.3  Expand stars in noise file by this amount.
THRESHDEC = 1.2        Threshold decrement in powers-of-2.
FSUB = 1.0             Limiting distance, in surf. bright., for subtractions.
FOBL = 1.0             Limiting distance, in surf. bright., for obliterations.
ICRIT = 10             Obliterate if # of pixels > TOP exceeds this.
CENTINTMAX = 35000.0   Obliterate if central intensity exceeds this.
TOPSAT = 10000.0       Use higher pixels to find volcano in saturated stars.
STARGALKNOB = 1.4      Star/galaxy discriminator.
STARCOSKNOB = 1.0      Object/cosmic-ray discriminator.
SNLIM7 = 50.0          Minimum S/N for 7-parameter fit.
SNLIM = 0.0            Minimum S/N for a pixel to be in fit subraster.
SNLIMMASK = 5.0        Minimum S/N through mask to identify an object.
SNLIMCOS  = 3.0        Minimum S/N to be called a cosmic ray.
NBADLEFT = 1           Ignore pixels closer to the left edge than this.
NBADRIGHT = 1          Ignore pixels closer to the right edge than this.
NBADTOP = 1            Ignore pixels closer to the top edge than this.
NBADBOT = 1            Ignore pixels closer to the bottom edge than this.
NCMIN = 2              Threshold defining cmin (not faint if center > cmin.)
=
PSFTYPE = 'PGAUSS'     PSF type: (PGAUSS)
SKYTYPE = 'MEDIAN'     SKY type: (PLANE, HUBBLE, MEDIAN)
=
OBJTYPE_IN = 'INTERNAL'     Input format: (COMPLETE, INTERNAL, BINARY)
OBJTYPE_OUT = 'DAOPHOT'     Output format: (COMPLETE, INTERNAL,INCOMPLETE, BINARY,DAOPHOT)
AUTOMATCH_TYPE = 'DAOPHOT'  Automatch format: (COMPLETE, INTERNAL, BINARY, DAOPHOT)
=
=
=  RARELY UPDATED PARAMETERS.  These are specialized parameters that rarely
=  need changing even when measuring images of very different sorts of fields
=  and/or from different telescope/detector combinations.
=
NSMAX = 1500000         Maximum number of stars identified.
NFITITER = 10          Maximum number of iterations.
NPARAM = 7             Maximum number of PSF fit function parameters.
NFITMAG = 2            No. of PSF parameters to get magnitudes.
NFITPOS = 4            No. of PSF parameters to get positions and mags.
NFITSHAPE = 7          No. of PSF parameters to get shape, pos, and mags.
NSRMSMIN = 5           Minimum number of stars needed for param rms.
CHI2MINBIG = 16        Critical CHI-squared for a large object.
XTRA = 25              We need more S/N if some pixels are missing.
SIGMA1 = 0.10          Max. frac. scatter in sigma_x for stars.
SIGMA2 = 0.10          Max. scatter in xy cross term for stars.
SIGMA3 = 0.10          Max. frac. scatter in sigma_y for stars.
ENUFF4 = 0.50          Fraction of pixels needed for 4-param fit.
ENUFF7 = 0.65          Fraction of pixels needed for 7-param fit.
COSOBLSIZE = 0.9       Size of obliteration box for a cosmic ray.
PIXTHRESH = 1.0        Trigger on pixels higher than noise*PIXTHRESH.
BETA4 = 1.0            R**4 coefficient modifier.
BETA6 = 0.4            R**6 coefficient modifier.
=
=  AUTO SCALING PARAMETERS.  These parameters are used only if the auto-scaling
=  flags are turned on.  Radius sizes, and threshold levels can be scaled
=  according to the FWHM of objects and the sky and readout noise values.
=
=   If autoscale=yes determine parameters using
SCALEFITRADIUS = 2.0   Size of fitting radius in units of FWHM.
FITRADIUSMIN = 3.0     Smallest allowed fitting radius size.
SCALEMASKRADIUS = 1.0  Size of masking radius in units of FWHM.
MASKRADIUSMIN = 3      Smallest allowed masking radius size.
=   If autoscaleap=yes determine parameters using
SCALEAPRADIUS = 3.0    Size of aperture phot radius in units of FWHM.
APRADIUSMIN = 10.0      Smallest allowed aperture phot radius size.
APSKYDIST = 2.0        Distance between the aperture circle and sky annulus.
SCALEAPSKYANNUL = 1.0  Size of sky annulus in units of FWHM.
APSKYANNULUSMIN = 3.0  Smallest allowed width for the sky annulus.
=   If autothresh=yes determine parameters using
SIGMABOTTOM = 15.0     Level of BOTTOM below sky in units of noise.
SIGMATHRESHMIN = 5.0   Level of THRESHMIN above sky in units of noise.
=   If autoblit=yes determine parameters using
ICRITMIN = 1000        Minimum value for ICRIT.
SCALEICRIT = 1.5       Scale of FWHM/2 to determine CENTINTMAX.
SCALECENT = 1.0        Value of CENTINTMAX in units of TOP.
SCALETOPSAT = 100.0    Value of TOPSAT in units of TOP.
=   If automedscale=yes determine parameters using
SCALEMEDSTEP = 3.5     Size of median filter step in units of FWHM.
=
=  SKY FUNCTIONS PARAMETERS. These variables control the parameters of
=  the functions used to describe the sky.
=
NPSKYP = 3             No. of PLANE sky function parameters.
NPSKYH = 7             No. of HUBBLE sky function parameters.
NSSKYPMIN = 25         Minimum number of stars needed for PLANE sky fit.
NSSKYHMIN = 100        Minimum number of stars needed for HUBBLE sky fit.
ITSKYP = 100           No. of iterations to find best PLANE sky parameters.
ITSKYH = 100           No. of iterations to find best HUBBLE sky parameters.
MEDSTEP = 7            Step size for filter for MEDIAN sky.
=
=  VARIABLE PSF PARAMETERS.  These parameters control the variable psf option.
=
NPSFORDER = 1           Order of fit for variable PSF estimation.
NPSFMIN = 100           Minimum number of stars needed for variable PSF.
=
=  APERTURE CORRECTION PARAMETERS.  These parameters are used only if the
=  aperture correction flags are turned on.  They control the aperture
=  photometry calculations in the stars used for the aperture correction.
=
NAPCMIN = 100          Minimum number of stars to apply aperture corr.
NAPERTURES = 10        Number of concentric apertures.
APERRMAX = 0.02        Maximum formal error of stars to use for ap. corr.
MAPPARMAG = 0          Order of the apcorr poly fit to the magnitude
MAPPARXY = 2           Order of the apcorr poly fit to the xy axes
NAPSURFFIT = 7         Concentric aperture to use for polynomial fit
APFAINTMAG = 99.9      Fainter magnitude to use for polynomial fit
APMAG_MAXERR = 0.1     Max anticipated error for aperture phot report.
=
=  PARAMETER LIMITS.  These variables limit the legal ranges of the PSF and
=  sky parameters.  Be sure to understand their function well before changing
=  any of these values.  Positive values refer to fractional changes; negative
=  values to absolute changes; zero ABSLIM's turn the corresponding tests off.
=
RELACC1 = 0.01         Convergence criterion for sky.
RELACC2 = 0.01         Convergence criterion for for central intensity.
RELACC3 = -0.03        Convergence criterion for x-position.
RELACC4 = -0.03        Convergence criterion for y-position.
RELACC5 = 0.03         Convergence criterion for sigma-x.
RELACC6 = 0.1          Convergence criterion for sigma-xy.
RELACC7 = 0.03         Convergence criterion for sigma-y.
ABSLIM1 = -1.0e8       Allowed range for sky value.
ABSLIM2 = -1.0e8       Allowed range for central intensity.
ABSLIM3 = -1.0e5       Allowed range for x-position.
ABSLIM4 = -1.0e5       Allowed range for y-position.
ABSLIM5 = -1.0e3       Allowed range for sigma-x.
ABSLIM6 = -1.0e3       Allowed range for sigma-xy.
ABSLIM7 = -1.0e3       Allowed range for sigma-y.
=
=  Parameter limits for the functions describing the sky.
=
RELACCSKYPLANE1 = 0.003
RELACCSKYPLANE2 = 0.003
RELACCSKYPLANE3 = 0.003
ABSLIMSKYPLANE1 = 0.0
ABSLIMSKYPLANE2 = 0.0
ABSLIMSKYPLANE3 = 0.0
=
RELACCSKYHUB1 = 0.01
RELACCSKYHUB2 = 0.1
RELACCSKYHUB3 = -0.1
RELACCSKYHUB4 = -0.1
RELACCSKYHUB5 = 0.1
RELACCSKYHUB6 = 0.1
RELACCSKYHUB7 = 0.1
ABSLIMSKYHUB1 = -1.0e5
ABSLIMSKYHUB2 = -1.0e5
ABSLIMSKYHUB3 = -1.0e5
ABSLIMSKYHUB4 = -1.0e5
ABSLIMSKYHUB5 = -1.0e6
ABSLIMSKYHUB6 = -1.0e6
ABSLIMSKYHUB7 = -1.0e6
=
END