Skip to content

Commit

Permalink
use pkg_resources package to read our calibration config files from t…
Browse files Browse the repository at this point in the history
…his package, not from the survey_dir/calib/se-config directory
  • Loading branch information
dstndstn committed Jul 5, 2017
1 parent 86c6b24 commit e967d07
Show file tree
Hide file tree
Showing 14 changed files with 682 additions and 2 deletions.
5 changes: 5 additions & 0 deletions py/legacypipe/config/90prime.conv
@@ -0,0 +1,5 @@
CONV NORM
# 3x3 ``all-ground'' convolution mask with FWHM = 2 pixels.
1 2 1
2 4 2
1 2 1
45 changes: 45 additions & 0 deletions py/legacypipe/config/90prime.param
@@ -0,0 +1,45 @@
NUMBER

VIGNET(31,31)

X_IMAGE
Y_IMAGE

ALPHA_J2000
DELTA_J2000

FLAGS

FLUX_RADIUS
FLUX_APER(8)
FLUXERR_APER(8)

SNR_WIN

ELONGATION

FLUX_AUTO
FLUXERR_AUTO

FWHM_WORLD
ELLIPTICITY
POLAR_WORLD
CLASS_STAR

X2_WORLD
Y2_WORLD
XY_WORLD

A_WORLD
B_WORLD
THETA_WORLD

ERRX2_WORLD
ERRY2_WORLD
ERRXY_WORLD

ERRA_WORLD
ERRB_WORLD
ERRTHETA_WORLD

IMAFLAGS_ISO
61 changes: 61 additions & 0 deletions py/legacypipe/config/90prime.psfex
@@ -0,0 +1,61 @@
# Default configuration file for PSFEx 3.17.1
# EB 2015-03-22
#

#-------------------------------- PSF model ----------------------------------

BASIS_TYPE PIXEL_AUTO # NONE, PIXEL, GAUSS-LAGUERRE or FILE
BASIS_NUMBER 20 # Basis number or parameter
PSF_SAMPLING 1.0 # Sampling step in pixel units (0.0 = auto)
PSF_ACCURACY 0.01 # Accuracy to expect from PSF "pixel" values
PSF_SIZE 31,31 # Image size of the PSF model

#------------------------- Point source measurements -------------------------

CENTER_KEYS X_IMAGE,Y_IMAGE # Catalogue parameters for source pre-centering
PHOTFLUX_KEY FLUX_APER(4) # Catalogue parameter for photometric norm.
PHOTFLUXERR_KEY FLUXERR_APER(4) # Catalogue parameter for photometric error

#----------------------------- PSF variability -------------------------------

PSFVAR_KEYS X_IMAGE,Y_IMAGE # Catalogue or FITS (preceded by :) params
PSFVAR_GROUPS 1,1 # Group tag for each context key
PSFVAR_DEGREES 2 # Polynom degree for each group

#----------------------------- Sample selection ------------------------------

SAMPLE_AUTOSELECT Y # Automatically select the FWHM (Y/N) ?
SAMPLEVAR_TYPE SEEING # File-to-file PSF variability: NONE or SEEING
SAMPLE_FWHMRANGE 2.0,10.0 # Allowed FWHM range
SAMPLE_VARIABILITY 0.2 # Allowed FWHM variability (1.0 = 100%)
SAMPLE_MINSN 20 # Minimum S/N for a source to be used
SAMPLE_MAXELLIP 0.3 # Maximum (A-B)/(A+B) for a source to be used

#------------------------------- Check-plots ----------------------------------

CHECKPLOT_DEV PNG # NULL, XWIN, TK, PS, PSC, XFIG, PNG,
# JPEG, AQT, PDF or SVG
#CHECKPLOT_TYPE FWHM,ELLIPTICITY,COUNTS, COUNT_FRACTION, CHI2, RESIDUALS
CHECKPLOT_TYPE NONE
# or NONE
CHECKPLOT_NAME fwhm, ellipticity, counts, countfrac, chi2, resi

#------------------------------ Check-Images ---------------------------------

#CHECKIMAGE_TYPE CHI,PROTOTYPES,SAMPLES,RESIDUALS,SNAPSHOTS
CHECKIMAGE_TYPE NONE
# or MOFFAT,-MOFFAT,-SYMMETRICAL
CHECKIMAGE_NAME chi.fits,proto.fits,samp.fits,resi.fits,snap.fits
# Check-image filenames

#----------------------------- Miscellaneous ---------------------------------

PSF_DIR # Where to write PSFs (empty=same as input)
PSF_SUFFIX .fits # Filename extension for output PSF filename
VERBOSE_TYPE FULL # can be QUIET,NORMAL,LOG or FULL
WRITE_XML N # Write XML file (Y/N)?
XML_NAME psfex.xml # Filename for XML output
NTHREADS 1 # Number of simultaneous threads for
# the SMP version of PSFEx
# 0 = automatic

81 changes: 81 additions & 0 deletions py/legacypipe/config/90prime.se
@@ -0,0 +1,81 @@
# Default configuration file for SExtractor 2.19.5
# EB 2015-03-22
#

#-------------------------------- Catalog ------------------------------------

CATALOG_NAME test.fits # name of the output catalog
#CATALOG_TYPE FITS_1.0 # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,
CATALOG_TYPE FITS_LDAC # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,
# ASCII_VOTABLE, FITS_1.0 or FITS_LDAC
PARAMETERS_NAME 90prime.param # name of the file containing catalog contents

#------------------------------- Extraction ----------------------------------

DETECT_TYPE CCD # CCD (linear) or PHOTO (with gamma correction)
DETECT_MINAREA 15 # min. # of pixels above threshold
DETECT_THRESH 5.0 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
ANALYSIS_THRESH 5.0 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2

FILTER Y # apply filter for detection (Y or N)?
FILTER_NAME config/default.conv # name of the file containing the filter

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

#------------------------------ Photometry -----------------------------------

# corresponding to diameters of [1.5,3,5,7,9,11,13,15] arcsec
PHOT_APERTURES 3.19148936,6.38297872,10.63829787,14.89361702,19.14893617,23.40425532,27.65957447,31.91489362
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>

SATUR_LEVEL 75000.0 # level (in ADUs) at which arises saturation
SATUR_KEY SATUR # keyword for saturation level (in ADUs)

MAG_ZEROPOINT 25.0 # magnitude zero-point
MAG_GAMMA 4.0 # gamma of emulsion (for photographic scans)
GAIN 1.3 # detector gain in e-/ADU
GAIN_KEY GAIN # keyword for detector gain in e-/ADU
PIXEL_SCALE 0.470 # size of pixel in arcsec (0=use FITS WCS info)

#------------------------- Star/Galaxy Separation ----------------------------

SEEING_FWHM 1.3 # stellar FWHM in arcsec
STARNNW_NAME config/default.nnw # Neural-Network_Weight table filename

#------------------------------ Background -----------------------------------

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

#------------------------------ 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

#----------------------------- Miscellaneous ---------------------------------

#VERBOSE_TYPE QUIET # can be QUIET, NORMAL or FULL
VERBOSE_TYPE NORMAL # can be QUIET, NORMAL or FULL
HEADER_SUFFIX .ahead # Filename extension for additional headers
WRITE_XML N # Write XML file (Y/N)?
XML_NAME sex.xml # Filename for XML output
45 changes: 45 additions & 0 deletions py/legacypipe/config/DECaLS.param
@@ -0,0 +1,45 @@
NUMBER

VIGNET(63,63)

X_IMAGE
Y_IMAGE

ALPHA_J2000
DELTA_J2000

FLAGS

FLUX_RADIUS
FLUX_APER(8)
FLUXERR_APER(8)

SNR_WIN

ELONGATION

FLUX_AUTO
FLUXERR_AUTO

FWHM_WORLD
ELLIPTICITY
POLAR_WORLD
CLASS_STAR

X2_WORLD
Y2_WORLD
XY_WORLD

A_WORLD
B_WORLD
THETA_WORLD

ERRX2_WORLD
ERRY2_WORLD
ERRXY_WORLD

ERRA_WORLD
ERRB_WORLD
ERRTHETA_WORLD

IMAFLAGS_ISO
93 changes: 93 additions & 0 deletions py/legacypipe/config/DECaLS.psfex
@@ -0,0 +1,93 @@
# Default configuration file for PSFEx 3.15.0
# EB 2013-05-01
#

#-------------------------------- PSF model ----------------------------------

BASIS_TYPE PIXEL_AUTO # NONE, PIXEL, GAUSS-LAGUERRE or FILE
BASIS_NUMBER 20 # Basis number or parameter
BASIS_NAME basis.fits # Basis filename (FITS data-cube)
BASIS_SCALE 1.0 # Gauss-Laguerre beta parameter
NEWBASIS_TYPE NONE # Create new basis: NONE, PCA_INDEPENDENT
# or PCA_COMMON
NEWBASIS_NUMBER 8 # Number of new basis vectors
PSF_SAMPLING 1.0 # Sampling step in pixel units (0.0 = auto)
PSF_PIXELSIZE 1.0 # Effective pixel size in pixel step units
PSF_ACCURACY 0.01 # Accuracy to expect from PSF "pixel" values
PSF_SIZE 63,63 # Image size of the PSF model
PSF_RECENTER N # Allow recentering of PSF-candidates Y/N ?
MEF_TYPE INDEPENDENT # INDEPENDENT or COMMON

#------------------------- Point source measurements -------------------------

CENTER_KEYS X_IMAGE,Y_IMAGE # Catalogue parameters for source pre-centering
PHOTFLUX_KEY FLUX_APER(4) # Catalogue parameter for photometric norm.
PHOTFLUXERR_KEY FLUXERR_APER(4) # Catalogue parameter for photometric error

#----------------------------- PSF variability -------------------------------

PSFVAR_KEYS X_IMAGE,Y_IMAGE # Catalogue or FITS (preceded by :) params
PSFVAR_GROUPS 1,1 # Group tag for each context key
PSFVAR_DEGREES 2 # Polynom degree for each group
PSFVAR_NSNAP 9 # Number of PSF snapshots per axis
HIDDENMEF_TYPE COMMON # INDEPENDENT or COMMON
STABILITY_TYPE EXPOSURE # EXPOSURE or SEQUENCE

#----------------------------- Sample selection ------------------------------

SAMPLE_AUTOSELECT Y # Automatically select the FWHM (Y/N) ?
SAMPLEVAR_TYPE SEEING # File-to-file PSF variability: NONE or SEEING
SAMPLE_FWHMRANGE 2.0,30.0 # Allowed FWHM range
SAMPLE_VARIABILITY 0.20 # Allowed FWHM variability (1.0 = 100%)
SAMPLE_MINSN 20 # Minimum S/N for a source to be used
SAMPLE_MAXELLIP 0.3 # Maximum (A-B)/(A+B) for a source to be used
SAMPLE_FLAGMASK 0x00fe # Rejection mask on SExtractor FLAGS
SAMPLE_WFLAGMASK 0x0000 # Rejection mask on SExtractor FLAGS_WEIGHT
SAMPLE_IMAFLAGMASK 0x0 # Rejection mask on SExtractor IMAFLAGS_ISO
BADPIXEL_FILTER N # Filter bad-pixels in samples (Y/N) ?
BADPIXEL_NMAX 0 # Maximum number of bad pixels allowed

#----------------------- PSF homogeneisation kernel --------------------------

HOMOBASIS_TYPE NONE # NONE or GAUSS-LAGUERRE
HOMOBASIS_NUMBER 10 # Kernel basis number or parameter
HOMOBASIS_SCALE 1.0 # GAUSS-LAGUERRE beta parameter
HOMOPSF_PARAMS 2.0, 3.0 # Moffat parameters of the idealised PSF
HOMOKERNEL_DIR # Where to write kernels (empty=same as input)
HOMOKERNEL_SUFFIX .homo.fits # Filename extension for homogenisation kernels

#------------------------------- Check-plots ----------------------------------

CHECKPLOT_DEV NULL # NULL, XWIN, TK, PS, PSC, XFIG, PNG,
# JPEG, AQT, PDF or SVG
CHECKPLOT_RES 0 # Check-plot resolution (0 = default)
CHECKPLOT_ANTIALIAS Y # Anti-aliasing using convert (Y/N) ?

#CHECKPLOT_TYPE FWHM,ELLIPTICITY,COUNTS, COUNT_FRACTION, CHI2, RESIDUALS
# or NONE
#CHECKPLOT_NAME fwhm, ellipticity, counts, countfrac, chi2, resi

CHECKPLOT_TYPE NONE

CHECKIMAGE_TYPE NONE

#------------------------------ Check-Images ---------------------------------
#
#CHECKIMAGE_TYPE SAMPLES,SNAPSHOTS_IMRES # CHI,PROTOTYPES,SAMPLES,RESIDUALS,SNAPSHOTS
# # or MOFFAT,-MOFFAT,-SYMMETRICAL
#CHECKIMAGE_NAME samp.fits,snap_imres.fits #chi.fits,proto.fits,samp.fits,resi.fits,snap.fits
# # Check-image filenames
#CHECKIMAGE_CUBE Y # Save check-images as datacubes (Y/N) ?
#
#----------------------------- Miscellaneous ---------------------------------

PSF_DIR # Where to write PSFs (empty=same as input)
PSF_SUFFIX .fits # Filename extension for output PSF filename
VERBOSE_TYPE FULL # can be QUIET,NORMAL,LOG or FULL
WRITE_XML N # Write XML file (Y/N)?
XML_NAME psfex.xml # Filename for XML output
XSL_URL file:///share/apps/usr/share/psfex/psfex.xsl
# Filename for XSL style-sheet
NTHREADS 1 # Number of simultaneous threads for
# the SMP version of PSFEx
# 0 = automatic

0 comments on commit e967d07

Please sign in to comment.