preflist.h 13.7 KB
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1
2
3
4
5
6
7
8
9
10
11
 /*
 				preflist.h

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
*	Part of:	SExtractor
*
*	Author:		E.BERTIN (IAP)
*
*	Contents:	Keywords for the configuration file.
*
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12
*	Last modify:	24/09/2009
Emmanuel Bertin's avatar
Emmanuel Bertin committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/


#include "key.h"

#ifndef _XML_H_
#include "xml.h"
#endif

#ifdef  USE_THREADS
#define THREADS_PREFMAX THREADS_NMAX
#else
#define THREADS_PREFMAX 65535
#endif

/*-------------------------------- initialization ---------------------------*/
 int	idummy;

 pkeystruct key[] =
 {
  {"ANALYSIS_THRESH", P_FLOATLIST, prefs.thresh, 0,0, -BIG, BIG,
    {""}, 1, 2, &prefs.nthresh},
  {"ASSOC_DATA", P_INTLIST, prefs.assoc_data, 0, 1000000,0.0,0.0,
    {""}, 1,MAXLIST, &prefs.nassoc_data},
  {"ASSOC_NAME", P_STRING, prefs.assoc_name},
  {"ASSOC_PARAMS", P_INTLIST, prefs.assoc_param, 1, 1000000,0.0,0.0,
    {""}, 2,3, &prefs.nassoc_param},
  {"ASSOC_RADIUS", P_FLOAT, &prefs.assoc_radius, 0,0, 1e-10,1e+10},
  {"ASSOC_TYPE", P_KEY, &prefs.assoc_type, 0,0, 0.0,0.0,
   {"FIRST", "NEAREST", "MEAN", "MAG_MEAN", "SUM", "MAG_SUM",
   "MIN", "MAX", ""}},
  {"ASSOCSELEC_TYPE", P_KEY, &prefs.assocselec_type, 0,0, 0.0,0.0,
   {"ALL","MATCHED","-MATCHED",""}},
  {"BACK_FILTERSIZE", P_INTLIST, prefs.backfsize, 1,11, 0.0,0.0,
    {""}, 1,2, &prefs.nbackfsize},
  {"BACK_FILTTHRESH", P_FLOAT, &prefs.backfthresh, 0,0, 0.0,BIG},
  {"BACKPHOTO_THICK", P_INT, &prefs.pback_size, 1, 256},
  {"BACKPHOTO_TYPE", P_KEY, &prefs.pback_type, 0,0, 0.0,0.0,
   {"GLOBAL","LOCAL",""}},
  {"BACK_SIZE", P_INTLIST, prefs.backsize, 1,2000000000, 0.0,0.0,
    {""}, 1,2, &prefs.nbacksize},
  {"BACK_TYPE", P_KEYLIST, prefs.back_type, 0,0, 0.0,0.0,
   {"AUTO","MANUAL",""},
    1, 2, &prefs.nback_type},
  {"BACK_VALUE", P_FLOATLIST, prefs.back_val, 0,0, -BIG,BIG,
   {""}, 1, 2, &prefs.nback_val},
  {"CATALOG_NAME", P_STRING, prefs.cat_name},
  {"CATALOG_TYPE", P_KEY, &prefs.cat_type, 0,0, 0.0,0.0,
   {"NONE", "ASCII","ASCII_HEAD", "ASCII_SKYCAT", "ASCII_VOTABLE",
	"FITS_LDAC", "FITS_TPX", "FITS_1.0",""}},
  {"CHECKIMAGE_NAME", P_STRINGLIST, prefs.check_name, 0,0,0.0,0.0,
    {""}, 0, MAXCHECK, &prefs.ncheck_name},
  {"CHECKIMAGE_TYPE", P_KEYLIST, prefs.check_type, 0,0, 0.0,0.0,
   {"NONE", "IDENTICAL",
   "BACKGROUND", "BACKGROUND_RMS", "MINIBACKGROUND",
   "MINIBACK_RMS", "-BACKGROUND",
   "FILTERED", "OBJECTS", "APERTURES", "SEGMENTATION", "ASSOC",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
72
73
74
   "-OBJECTS", "-PSFS", "PSFS",
   "-PC_CONVPROTOS", "PC_CONVPROTOS", "PC_PROTOS", 
   "MAP_SOM", "-MODELS", "MODELS", "PATTERNS", ""},
Emmanuel Bertin's avatar
Emmanuel Bertin committed
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
   0, 17, &prefs.ncheck_type},
  {"CLEAN", P_BOOL, &prefs.clean_flag},
  {"CLEAN_PARAM", P_FLOAT, &prefs.clean_param, 0,0, 0.1,10.0},
  {"DEBLEND_MINCONT", P_FLOAT, &prefs.deblend_mincont, 0,0, 0.0,1.0},
  {"DEBLEND_NTHRESH", P_INT, &prefs.deblend_nthresh, 1,64},
  {"DETECT_MINAREA", P_INT, &prefs.ext_minarea, 1,1000000},
  {"DETECT_THRESH", P_FLOATLIST, prefs.dthresh, 0,0, -BIG, BIG,
   {""}, 1, 2, &prefs.ndthresh},
  {"DETECT_TYPE", P_KEY, &prefs.detect_type, 0,0, 0.0,0.0,
   {"CCD","PHOTO",""}},
  {"FILTER", P_BOOL, &prefs.filter_flag},
  {"FILTER_NAME", P_STRING, prefs.filter_name},
  {"FILTER_THRESH", P_FLOATLIST, prefs.filter_thresh, 0,0,-BIG,BIG,
   {""}, 0, 2, &prefs.nfilter_thresh},
  {"FITS_UNSIGNED", P_BOOL, &prefs.fitsunsigned_flag},
  {"FLAG_IMAGE", P_STRINGLIST, prefs.fimage_name, 0,0,0.0,0.0,
    {""}, 0, MAXFLAG, &prefs.nfimage_name},
  {"FLAG_TYPE",  P_KEYLIST, prefs.flag_type, 0,0, 0.0,0.0,
   {"OR","AND","MIN", "MAX", "MOST",""}, 0, MAXFLAG, &idummy},
  {"GAIN", P_FLOAT, &prefs.gain, 0,0, 0.0, 1e+30},
Emmanuel Bertin's avatar
Emmanuel Bertin committed
95
  {"GAIN_KEY", P_STRING, prefs.gain_key},
Emmanuel Bertin's avatar
Emmanuel Bertin committed
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
  {"INTERP_MAXXLAG", P_INTLIST, prefs.interp_xtimeout, 1,1000000, 0.0,0.0,
   {""}, 1, 2, &prefs.ninterp_xtimeout},
  {"INTERP_MAXYLAG", P_INTLIST, prefs.interp_ytimeout, 1,1000000, 0.0,0.0,
   {""}, 1, 2, &prefs.ninterp_ytimeout},
  {"INTERP_TYPE", P_KEYLIST, prefs.interp_type, 0,0, 0.0,0.0,
   {"NONE","VAR_ONLY","ALL",""}, 1, 2, &prefs.ninterp_type},
  {"MAG_GAMMA", P_FLOAT, &prefs.mag_gamma, 0,0, 1e-10,1e+30},
  {"MAG_ZEROPOINT", P_FLOAT, &prefs.mag_zeropoint, 0,0, -100.0, 100.0},
  {"MASK_TYPE", P_KEY, &prefs.mask_type, 0,0, 0.0,0.0,
   {"NONE","BLANK","CORRECT",""}},
  {"MEMORY_BUFSIZE", P_INT, &prefs.mem_bufsize, 8, 65534},
  {"MEMORY_OBJSTACK", P_INT, &prefs.clean_stacksize, 16,65536},
  {"MEMORY_PIXSTACK", P_INT, &prefs.mem_pixstack, 1000, 10000000},
  {"NTHREADS", P_INT, &prefs.nthreads, 0, THREADS_PREFMAX},
  {"PARAMETERS_NAME", P_STRING, prefs.param_name},
Emmanuel Bertin's avatar
Emmanuel Bertin committed
111
112
113
  {"PATTERN_TYPE", P_KEY, &prefs.pattern_type, 0,0, 0.0,0.0,
   {"RINGS-QUADPOLE", "RINGS-OCTOPOLE", "RINGS-HARMONIC", "GAUSS-LAGUERRE",
   ""}},
Emmanuel Bertin's avatar
Emmanuel Bertin committed
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
  {"PHOT_APERTURES", P_FLOATLIST, prefs.apert, 0,0, 0.0,2*MAXPICSIZE,
   {""}, 1, MAXNAPER, &prefs.naper},
  {"PHOT_AUTOPARAMS", P_FLOATLIST, prefs.autoparam, 0,0, 0.0,10.0,
   {""}, 2,2, &prefs.nautoparam},
  {"PHOT_AUTOAPERS", P_FLOATLIST, prefs.autoaper, 0,0, 0.0,1e6,
   {""}, 2,2, &prefs.nautoaper},
  {"PHOT_FLUXFRAC", P_FLOATLIST, prefs.flux_frac, 0,0, 1e-6, 1.0,
   {""}, 1, MAXNAPER, &prefs.nflux_frac},
  {"PHOT_PETROPARAMS", P_FLOATLIST, prefs.petroparam, 0,0, 0.0,10.0,
   {""}, 2,2, &prefs.npetroparam},
  {"PIXEL_SCALE", P_FLOAT, &prefs.pixel_scale, 0,0, 0.0, 1e+10},
  {"PSF_NAME", P_STRINGLIST, prefs.psf_name, 0,0, 0.0,0.0,
   {""}, 1, 2, &prefs.npsf_name},	/*?*/
  {"PSF_NMAX", P_INT, &prefs.psf_npsfmax, 1, PSF_NPSFMAX},
  {"PSFDISPLAY_TYPE", P_KEY, &prefs.psfdisplay_type, 0,0, 0.0,0.0,
   {"SPLIT","VECTOR",""}},
Emmanuel Bertin's avatar
Emmanuel Bertin committed
130
  {"SATUR_KEY", P_STRING, prefs.satur_key},
Emmanuel Bertin's avatar
Emmanuel Bertin committed
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
  {"SATUR_LEVEL", P_FLOAT, &prefs.satur_level, 0,0, -1e+30, 1e+30},
  {"SEEING_FWHM", P_FLOAT, &prefs.seeing_fwhm, 0,0, 1e-10, 1e+10},
  {"SOM_NAME", P_STRING, prefs.som_name},
  {"STARNNW_NAME", P_STRING, prefs.nnw_name},
  {"THRESH_TYPE", P_KEYLIST, prefs.thresh_type, 0,0, 0.0,0.0,
   {"RELATIVE","ABSOLUTE"},
    1, 2, &prefs.nthresh_type},
  {"VERBOSE_TYPE", P_KEY, &prefs.verbose_type, 0,0, 0.0,0.0,
   {"QUIET","NORMAL", "EXTRA_WARNINGS", "FULL",""}},
  {"WEIGHT_GAIN", P_BOOL, &prefs.weightgain_flag},
  {"WEIGHT_IMAGE", P_STRINGLIST, prefs.wimage_name, 0,0,0.0,0.0,
    {""}, 0, MAXIMAGE, &prefs.nwimage_name},
  {"WEIGHT_THRESH", P_FLOATLIST, prefs.weight_thresh, 0,0, 0.0, BIG,
   {""}, 0, 2, &prefs.nweight_thresh},
  {"WEIGHT_TYPE", P_KEYLIST, prefs.weight_type, 0,0, 0.0,0.0,
   {"NONE","BACKGROUND", "MAP_RMS", "MAP_VAR","MAP_WEIGHT", ""},
   0, MAXIMAGE, &prefs.nweight_type},
  {"WRITE_XML", P_BOOL, &prefs.xml_flag},
  {"XML_NAME", P_STRING, prefs.xml_name},
  {"XSL_URL", P_STRING, prefs.xsl_name},
  {""}
 };

char		keylist[sizeof(key)/sizeof(pkeystruct)][32];
const char	notokstr[] = {" \t=,;\n\r\""};

char *default_prefs[] =
 {
"# Default configuration file for " BANNER " " MYVERSION,
"# EB " DATE,
"#",
" ",
"#-------------------------------- Catalog ------------------------------------",
" ",
"CATALOG_NAME     test.cat       # name of the output catalog",
"CATALOG_TYPE     ASCII_HEAD     # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,",
"                                # ASCII_VOTABLE, FITS_1.0 or FITS_LDAC",
"PARAMETERS_NAME  default.param  # name of the file containing catalog contents",
" ",
"#------------------------------- Extraction ----------------------------------",
" ",
"DETECT_TYPE      CCD            # CCD (linear) or PHOTO (with gamma correction)",
"DETECT_MINAREA   5              # minimum number of pixels above threshold",
"*THRESH_TYPE      RELATIVE       # threshold type: RELATIVE (in sigmas)",
"*                                # or ABSOLUTE (in ADUs)",
"DETECT_THRESH    1.5            # <sigmas> or <threshold>,<ZP> in mag.arcsec-2",
"ANALYSIS_THRESH  1.5            # <sigmas> or <threshold>,<ZP> in mag.arcsec-2",
" ",
"FILTER           Y              # apply filter for detection (Y or N)?",
"FILTER_NAME      default.conv   # name of the file containing the filter",
"*FILTER_THRESH                   # Threshold[s] for retina filtering",

" ",
"DEBLEND_NTHRESH  32             # Number of deblending sub-thresholds",
"DEBLEND_MINCONT  0.005          # Minimum contrast parameter for deblending",
" ",
"CLEAN            Y              # Clean spurious detections? (Y or N)?",
"CLEAN_PARAM      1.0            # Cleaning efficiency",
" ",
"MASK_TYPE        CORRECT        # type of detection MASKing: can be one of",
"                                # NONE, BLANK or CORRECT",
" ",
"*#-------------------------------- WEIGHTing ----------------------------------",
"*",
"*WEIGHT_TYPE      NONE           # type of WEIGHTing: NONE, BACKGROUND,",
"*                                # MAP_RMS, MAP_VAR or MAP_WEIGHT",
"*WEIGHT_IMAGE     weight.fits    # weight-map filename",
"*WEIGHT_GAIN      Y              # modulate gain (E/ADU) with weights? (Y/N)",
"*WEIGHT_THRESH                   # weight threshold[s] for bad pixels",
"*",
"*#-------------------------------- FLAGging -----------------------------------",
"*",
"*FLAG_IMAGE       flag.fits      # filename for an input FLAG-image",
"*FLAG_TYPE        OR             # flag pixel combination: OR, AND, MIN, MAX",
"*                                # or MOST",
"*",
"#------------------------------ Photometry -----------------------------------",
" ",
"PHOT_APERTURES   5              # MAG_APER aperture diameter(s) in pixels",
"PHOT_AUTOPARAMS  2.5, 3.5       # MAG_AUTO parameters: <Kron_fact>,<min_radius>",
"PHOT_PETROPARAMS 2.0, 3.5       # MAG_PETRO parameters: <Petrosian_fact>,",
"                                # <min_radius>",
"*PHOT_AUTOAPERS   0.0,0.0        # <estimation>,<measurement> minimum apertures",
"*                                # for MAG_AUTO and MAG_PETRO",
"*PHOT_FLUXFRAC    0.5            # flux fraction[s] used for FLUX_RADIUS",
" ",
"SATUR_LEVEL      50000.0        # level (in ADUs) at which arises saturation",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
218
"SATUR_KEY        SATURATE       # keyword for saturation level (in ADUs)",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
219
220
221
222
" ",
"MAG_ZEROPOINT    0.0            # magnitude zero-point",
"MAG_GAMMA        4.0            # gamma of emulsion (for photographic scans)",
"GAIN             0.0            # detector gain in e-/ADU",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
223
"GAIN_KEY         GAIN           # keyword for detector gain in e-/ADU",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
"PIXEL_SCALE      1.0            # size of pixel in arcsec (0=use FITS WCS info)",
" ",
"#------------------------- Star/Galaxy Separation ----------------------------",
" ",
"SEEING_FWHM      1.2            # stellar FWHM in arcsec",
"STARNNW_NAME     default.nnw    # Neural-Network_Weight table filename",
" ",
"#------------------------------ Background -----------------------------------",
" ",
"*BACK_TYPE        AUTO           # AUTO or MANUAL",
"*BACK_VALUE       0.0            # Default background value in MANUAL mode",
"BACK_SIZE        64             # Background mesh: <size> or <width>,<height>",
"BACK_FILTERSIZE  3              # Background filter: <size> or <width>,<height>",
" ",
"BACKPHOTO_TYPE   GLOBAL         # can be GLOBAL or LOCAL",
"*BACKPHOTO_THICK  24             # thickness of the background LOCAL annulus",
"*BACK_FILTTHRESH  0.0            # Threshold above which the background-",
"*                                # map filter operates",
" ",
"#------------------------------ Check Image ----------------------------------",
" ",
"CHECKIMAGE_TYPE  NONE           # can be NONE, BACKGROUND, BACKGROUND_RMS,",
"                                # MINIBACKGROUND, MINIBACK_RMS, -BACKGROUND,",
"                                # FILTERED, OBJECTS, -OBJECTS, SEGMENTATION,",
"                                # or APERTURES",
"CHECKIMAGE_NAME  check.fits     # Filename for the check-image",
" ",
"#--------------------- Memory (change with caution!) -------------------------",
" ",
"MEMORY_OBJSTACK  3000           # number of objects in stack",
"MEMORY_PIXSTACK  300000         # number of pixels in stack",
"MEMORY_BUFSIZE   1024           # number of lines in buffer",
" ",
"*#------------------------------- ASSOCiation ---------------------------------",
"*",
"*ASSOC_NAME       sky.list       # name of the ASCII file to ASSOCiate",
"*ASSOC_DATA       2,3,4          # columns of the data to replicate (0=all)",
"*ASSOC_PARAMS     2,3,4          # columns of xpos,ypos[,mag]",
"*ASSOC_RADIUS     2.0            # cross-matching radius (pixels)",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
263
"*ASSOC_TYPE       NEAREST        # ASSOCiation method: FIRST, NEAREST, MEAN,",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
264
265
266
267
268
269
270
271
272
273
274
"*                                # MAG_MEAN, SUM, MAG_SUM, MIN or MAX",
"*ASSOCSELEC_TYPE  MATCHED        # ASSOC selection type: ALL, MATCHED or -MATCHED",
"*",
"#----------------------------- Miscellaneous ---------------------------------",
" ",
"VERBOSE_TYPE     NORMAL         # can be QUIET, NORMAL or FULL",
"WRITE_XML        N              # Write XML file (Y/N)?",
"XML_NAME         sex.xml        # Filename for XML output",
"*XSL_URL          " XSL_URL,
"*                                # Filename for XSL style-sheet",
#ifdef USE_THREADS
Emmanuel Bertin's avatar
Emmanuel Bertin committed
275
"NTHREADS          0              # Number of simultaneous threads for",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
276
277
278
279
280
281
282
283
284
285
286
287
288
289
"*                                # the SMP version of " BANNER,
"*                                # 0 = automatic",
#else
"*NTHREADS         1              # 1 single thread",
#endif
"*",
"*FITS_UNSIGNED    N              # Treat FITS integer values as unsigned (Y/N)?",
"*INTERP_MAXXLAG   16             # Max. lag along X for 0-weight interpolation",
"*INTERP_MAXYLAG   16             # Max. lag along Y for 0-weight interpolation",
"*INTERP_TYPE      ALL            # Interpolation type: NONE, VAR_ONLY or ALL",
"*",
"*#--------------------------- Experimental Stuff -----------------------------",
"*",
"*PSF_NAME         default.psf    # File containing the PSF model",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
290
"*PSF_NMAX         2              # Max.number of PSFs fitted simultaneously",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
291
"*PSFDISPLAY_TYPE  SPLIT          # Catalog type for PSF-fitting: SPLIT or VECTOR",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
292
293
"*PATTERN_TYPE     RINGS-HARMONIC # can RINGS-QUADPOLE, RINGS-OCTOPOLE,",
"*                                # RINGS-HARMONICS or GAUSS-LAGUERRE",
Emmanuel Bertin's avatar
Emmanuel Bertin committed
294
295
296
"*SOM_NAME         default.som    # File containing Self-Organizing Map weights",
""
 };