/* prefs.h *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% * * Part of: SWarp * * Author: E.BERTIN (IAP) * * Contents: Include for prefs.c. * * Last modify: 05/03/2001 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ #ifndef _FIELD_H_ #include "field.h" #endif #ifndef _COADD_H_ #include "coadd.h" #endif #ifndef _INTERPOLATE_H_ #include "interpolate.h" #endif #ifndef _WEIGHT_H_ #include "weight.h" #endif #ifndef _PREFS_H_ #define _PREFS_H_ /*--------------------------------- typedefs --------------------------------*/ /*------------------------------- preferences -------------------------------*/ typedef struct { char *(infield_name[MAXINFIELD]);/* Filename(s) of input images */ int ninfield; /* Number of input images */ char *(inwfield_name[MAXINFIELD]);/* Filename(s) of input weights */ int ninwfield; /* Number of input weight-maps */ char head_suffix[MAXCHAR]; /* Generic suffix for FITS headers */ char weight_suffix[MAXCHAR]; /* Generic suffix for input weights */ char outfield_name[MAXCHAR]; /* Output image filename */ char outwfield_name[MAXCHAR];/* Output weight-map filename */ weightenum weight_type[MAXINFIELD];/* Weight type */ int nweight_type; /* nb of params */ double weight_thresh[MAXINFIELD];/* Weight threshold */ int nweight_thresh; /* nb of params */ int interp_flag[MAXINFIELD];/* Interpolation flag */ int ninterp_flag; /* nb of params */ int subback_flag[MAXINFIELD];/* Background-subtraction flag */ int nsubback_flag; /* nb of params */ int dyncomp_flag[MAXINFIELD];/* Dynamic compression flag */ int ndyncomp_flag; /* nb of params */ int oversamp[INTERP_MAXDIM];/* Oversampling (per pixel/ per dim) */ int noversamp; /* nb of params */ backenum back_type[MAXINFIELD]; /* Background subtraction type */ int nback_type; /* nb of params */ int back_size[MAXINFIELD]; /* Background mesh size */ int nback_size; /* nb of params */ int back_fsize[MAXINFIELD]; /* Background filter size */ int nback_fsize; /* nb of params */ double back_default[MAXINFIELD];/* Default background in MANUAL */ int nback_default; /* nb of params */ double back_fthresh; /* Background filter threshold */ char gain_keyword[MAXCHAR]; /* FITS keyword for gain */ double gain_default[MAXINFIELD];/* Default gain (e-/ADU) */ int ngain_default; /* nb of params */ char fscale_keyword[MAXCHAR];/* FITS keyword for flux scale */ double fscale_default[MAXINFIELD];/* Default flux scale */ int nfscale_default; /* nb of params */ enum {FSCALASTRO_NONE, FSCALASTRO_FIXED} fscalastro_type; /* Astrometric flux-scaling type */ interpenum resamp_type[INTERP_MAXDIM];/* Image resampling method */ int nresamp_type; /* nb of params */ coaddenum coadd_type; /* Coaddition type */ /* Output image coordinates */ char projection_name[MAXCHAR];/* Projection WCS code */ enum {CELSYS_NATIVE, CELSYS_EQUATORIAL, CELSYS_ECLIPTIC} celsys_type ;/* Celestial system type */ enum {CENTER_MANUAL, CENTER_ALL, CENTER_MOST} center_type[INTERP_MAXDIM];/* Centering type */ int ncenter_type; /* nb of params */ char *(image_center[INTERP_MAXDIM]);/* Center coordinates */ int nimage_center; /* nb of params */ enum {PIXSCALE_MANUAL,PIXSCALE_MIN,PIXSCALE_MAX,PIXSCALE_MEDIAN,PIXSCALE_FIT} pixscale_type[INTERP_MAXDIM];/* Pixel scale type */ int npixscale_type; /* nb of params */ double pixscale[INTERP_MAXDIM];/* Pixel scales */ int npixscale; /* nb of params */ int image_size[INTERP_MAXDIM];/* Pixel scales */ int nimage_size; /* nb of params */ /* Temporary files */ int removetmp_flag; /* Remove temporary FITS files ? */ /* Virtual memory handling */ int mem_max; /* Max amount of allocatable RAM */ int vmem_max; /* Max amount of allocatable VMEM */ char swapdir_name[MAXCHAR]; /* Name of virtual mem directory */ int writefileinfo_flag; /* Write info for each input file ? */ enum {QUIET, NORM, WARN, FULL} verbose_type; /* display type */ } prefstruct; prefstruct prefs; /*----------------------------- Internal constants --------------------------*/ #define MAXLIST 32 /* max. nb of list members */ /*-------------------------------- protos -----------------------------------*/ extern void readprefs(char *filename,char **argkey,char **argval,int narg), useprefs(void); #endif