API documentation of the sewpy module

sewpy: Source Extractor Wrapper for Python

Recent improvements (latest on top):

  • new loglevel option to adjust sewpy’s overall “verbosity” on instantiation.
  • better verbosity about masked output of ASSOC procedure
  • ASSOC helper implemented
  • run() now returns a dict containing several objects, such as the output astropy table, catfilepath, workdir, and logfilepath.
  • now also works with vector parameters such as MAG_APER(4)
  • possibility to “nice” SExtractor
  • a log file is written for every run() if not told otherwise
  • filenames change according to FITS image file name where required
  • but you can also pass an “imgname” argument to run, and this will be used instead.
  • params and config files are written only once, as discussed
  • appropriate warnings and behaviour when a workdir already exists, or when you rerun on the same file
  • possibility to use existing param / config / conv / nnw files
  • run() returns either the catalog, or the filepath to the catalog

To do:

  • move “config” to run ?
  • check that all masked columns of ASSOC do indeed share the same mask.
  • implement _check_config()
  • better detection of SExtractor failures
  • implement raising Exceptions when SExtractor fails
  • implement CHECK IMAGE “helper” ?
  • give access to several conv and nnw settings (if needed)
class sewpy.sewpy.SEW(workdir=None, sexpath='sex', params=None, config=None, configfilepath=None, nice=None, loglevel=None)[source]

Holds together all the settings to run SExtractor executable on one or several images.

__init__(workdir=None, sexpath='sex', params=None, config=None, configfilepath=None, nice=None, loglevel=None)[source]

All arguments have default values and are optional.

Parameters:
  • workdir – where I’ll write my files. Specify this (e.g., “test”) if you care about the output files. If None, I create a unique temporary directory myself, usually in /tmp.
  • sexpath – path to the sextractor executable (e.g., “sex” or “sextractor”, if in your PATH)
  • params (list of strings) – the parameters you want SExtractor to measure (i.e., what you would write in the “default.param” file)
  • config (dict) – config settings that will supersede the default config (e.g., what you would change in the “default.sex” file)
  • configfilepath – specify this if you want me to use an existing SExtractor config file as “default” (instead of the sextractor -d one)
  • nice (int) – niceness with which I should run SExtractor. Use e.g. 19 for set lowest priority.
  • loglevel (string or int or logging.level...) – verbosity, e.g. the python-level logging threshold for the sewpy module logger. For example, set this to “WARNING” and sewpy will no longer log simple INFOs. Choices are “DEBUG”, “INFO”, “WARNING”, “ERROR”, “CRITICAL”. To disable logging, set loglevel="CRITICAL"

To use an existing SExtractor param-, conv-, or nnw-file, simply specify these in the config dict, using the appropriate SExtractor keys (PARAMETERS_NAME, FILTER_NAME, ...)

Warning

When using vector-type params resulting in multiple columns (such as “FLUX_RADIUS(3)” in the example above), do not put these in the last position of the params list, otherwise astropy fails reading the catalog! This is probably due to the fact that the SExtractor header doesn’t give a hint that multiple columns are expected when a vector-type param comes last. A workaround would be way too complicated.

get_version()[source]

To find the SExtractor version, we call it without arguments and parse the stdout.

Returns:a string (e.g. ‘2.4.4’)
__str__()[source]

A string summary representing the instance

_check_params()[source]

Compares the params to a list of known params, and spits out a useful warning if something seems fishy.

_check_config()[source]

Not yet implemented

_set_instance_config()[source]

Sets config parameters that remain fixed for this instance. Called by __init__(). If needed, you could still mess with this config after __init__() has run.

_get_params_filepath()[source]

Stays the same for a given instance.

_get_config_filepath()[source]

Idem, stays the same for a given instance. Might return the non-default configfilepath, if set.

_get_conv_filepath()[source]

Stays the same for a given instance.

_get_psf_filepath()[source]

Stays the same for a given instance.

_get_cat_filepath(imgname)[source]

This changes from image to image

_get_assoc_filepath(imgname)[source]

Changes from image to image

_get_log_filepath(imgname)[source]

Changes from image to image

_write_params(force=False)[source]

Writes the parameters to the file, if needed.

Parameters:force – if True, I overwrite any existing file.
_write_default_config(force=False)[source]

Writes the default config file, if needed. I don’t write this file if a specific config file is set.

Parameters:force – if True, I overwrite any existing file.
_write_default_conv()[source]

Writes the default convolution matrix, if needed.

_write_default_psf()[source]

Writes the default psf file, if needed.

_clean_workdir()[source]

Removes the config/param files related to this instance, to allow for a fresh restart. Files related to specific images are not removed.

_write_assoc(cat, xname, yname, imgname)[source]

Writes a plain text file which can be used as sextractor input for the ASSOC identification. And “index” for each source is generated, it gets used to identify galaxies.

__module__ = 'sewpy.sewpy'
_add_prefix(table, prefix)[source]

Modifies the column names of a table by prepending the prefix in place. Skips the VECTOR_ASSOC stuff !

__call__(imgfilepath, imgname=None, assoc_cat=None, assoc_xname='x', assoc_yname='y', returncat=True, prefix='', writelog=True)[source]

Runs SExtractor on a given image.

Parameters:
  • imgfilepath – Path to the input FITS image I should run on
  • assoc_cat – optional input catalog (astropy table), if you want to use the ASSOC helper
  • assoc_xname – x coordinate name I should use in the ASSOC helper
  • assoc_yname – idem
  • returncat – by default I read the SExtractor output catalog and return it as an astropy table. If set to False, I do not attempt to read it.
  • prefix (string) – will be prepended to the column names of the astropy table that I return
  • writelog – if True I save the sextractor command line input and output into a dedicated log file in the workdir.
Returns:

a dict containing the keys:

  • catfilepath: the path to the sextractor output catalog file
  • table: the astropy table of the output catalog (if returncat was not set to False)
  • workdir: the path to the workdir (all my internal files are there)
  • logfilepath: the path to the SExtractor log file (in the workdir)

Everything related to this particular image stays within this method, the SExtractor instance (in particular config) is not modified !

fullparamtxt = "\n#NUMBER Running object number \n#EXT_NUMBER FITS extension number \n#FLUX_ISO Isophotal flux [count]\n#FLUXERR_ISO RMS error for isophotal flux [count]\n#MAG_ISO Isophotal magnitude [mag]\n#MAGERR_ISO RMS error for isophotal magnitude [mag]\n#FLUX_ISOCOR Corrected isophotal flux [count]\n#FLUXERR_ISOCOR RMS error for corrected isophotal flux [count]\n#MAG_ISOCOR Corrected isophotal magnitude [mag]\n#MAGERR_ISOCOR RMS error for corrected isophotal magnitude [mag]\n#FLUX_APER Flux vector within fixed circular aperture(s) [count]\n#FLUXERR_APER RMS error vector for aperture flux(es) [count]\n#MAG_APER Fixed aperture magnitude vector [mag]\n#MAGERR_APER RMS error vector for fixed aperture mag. [mag]\n#FLUX_AUTO Flux within a Kron-like elliptical aperture [count]\n#FLUXERR_AUTO RMS error for AUTO flux [count]\n#MAG_AUTO Kron-like elliptical aperture magnitude [mag]\n#MAGERR_AUTO RMS error for AUTO magnitude [mag]\n#FLUX_PETRO Flux within a Petrosian-like elliptical aperture [count]\n#FLUXERR_PETRO RMS error for PETROsian flux [count]\n#MAG_PETRO Petrosian-like elliptical aperture magnitude [mag]\n#MAGERR_PETRO RMS error for PETROsian magnitude [mag]\n#FLUX_BEST Best of FLUX_AUTO and FLUX_ISOCOR [count]\n#FLUXERR_BEST RMS error for BEST flux [count]\n#MAG_BEST Best of MAG_AUTO and MAG_ISOCOR [mag]\n#MAGERR_BEST RMS error for MAG_BEST [mag]\n#FLUX_WIN Gaussian-weighted flux [count]\n#FLUXERR_WIN RMS error for WIN flux [count]\n#MAG_WIN Gaussian-weighted magnitude [mag]\n#MAGERR_WIN RMS error for MAG_WIN [mag]\n#FLUX_SOMFIT Flux derived from SOM fit [count]\n#FLUXERR_SOMFIT RMS error for SOMFIT flux [count]\n#MAG_SOMFIT Magnitude derived from SOM fit [mag]\n#MAGERR_SOMFIT Magnitude error derived from SOM fit [mag]\n#ERROR_SOMFIT Reduced Chi-square error of the SOM fit \n#VECTOR_SOMFIT Position vector of the winning SOM node \n#KRON_RADIUS Kron apertures in units of A or B \n#PETRO_RADIUS Petrosian apertures in units of A or B \n#BACKGROUND Background at centroid position [count]\n#THRESHOLD Detection threshold above background [count]\n#FLUX_MAX Peak flux above background [count]\n#ISOAREA_IMAGE Isophotal area above Analysis threshold [pixel**2]\n#ISOAREAF_IMAGE Isophotal area (filtered) above Detection threshold [pixel**2]\n#XMIN_IMAGE Minimum x-coordinate among detected pixels [pixel]\n#YMIN_IMAGE Minimum y-coordinate among detected pixels [pixel]\n#XMAX_IMAGE Maximum x-coordinate among detected pixels [pixel]\n#YMAX_IMAGE Maximum y-coordinate among detected pixels [pixel]\n#XPEAK_IMAGE x-coordinate of the brightest pixel [pixel]\n#YPEAK_IMAGE y-coordinate of the brightest pixel [pixel]\n#XPEAK_WORLD World-x coordinate of the brightest pixel [deg]\n#YPEAK_WORLD World-y coordinate of the brightest pixel [deg]\n#ALPHAPEAK_SKY Right ascension of brightest pix (native) [deg]\n#DELTAPEAK_SKY Declination of brightest pix (native) [deg]\n#ALPHAPEAK_J2000 Right ascension of brightest pix (J2000) [deg]\n#DELTAPEAK_J2000 Declination of brightest pix (J2000) [deg]\n#ALPHAPEAK_B1950 Right ascension of brightest pix (B1950) [deg]\n#DELTAPEAK_B1950 Declination of brightest pix (B1950) [deg]\n#X_IMAGE Object position along x [pixel]\n#Y_IMAGE Object position along y [pixel]\n#X_IMAGE_DBL Object position along x (double precision) [pixel]\n#Y_IMAGE_DBL Object position along y (double precision) [pixel]\n#X_WORLD Barycenter position along world x axis [deg]\n#Y_WORLD Barycenter position along world y axis [deg]\n#X_MAMA Barycenter position along MAMA x axis [m**(-6)]\n#Y_MAMA Barycenter position along MAMA y axis [m**(-6)]\n#ALPHA_SKY Right ascension of barycenter (native) [deg]\n#DELTA_SKY Declination of barycenter (native) [deg]\n#ALPHA_J2000 Right ascension of barycenter (J2000) [deg]\n#DELTA_J2000 Declination of barycenter (J2000) [deg]\n#ALPHA_B1950 Right ascension of barycenter (B1950) [deg]\n#DELTA_B1950 Declination of barycenter (B1950) [deg]\n#X2_IMAGE Variance along x [pixel**2]\n#Y2_IMAGE Variance along y [pixel**2]\n#XY_IMAGE Covariance between x and y [pixel**2]\n#X2_WORLD Variance along X-WORLD (alpha) [deg**2]\n#Y2_WORLD Variance along Y-WORLD (delta) [deg**2]\n#XY_WORLD Covariance between X-WORLD and Y-WORLD [deg**2]\n#CXX_IMAGE Cxx object ellipse parameter [pixel**(-2)]\n#CYY_IMAGE Cyy object ellipse parameter [pixel**(-2)]\n#CXY_IMAGE Cxy object ellipse parameter [pixel**(-2)]\n#CXX_WORLD Cxx object ellipse parameter (WORLD units) [deg**(-2)]\n#CYY_WORLD Cyy object ellipse parameter (WORLD units) [deg**(-2)]\n#CXY_WORLD Cxy object ellipse parameter (WORLD units) [deg**(-2)]\n#A_IMAGE Profile RMS along major axis [pixel]\n#B_IMAGE Profile RMS along minor axis [pixel]\n#THETA_IMAGE Position angle (CCW/x) [deg]\n#A_WORLD Profile RMS along major axis (world units) [deg]\n#B_WORLD Profile RMS along minor axis (world units) [deg]\n#THETA_WORLD Position angle (CCW/world-x) [deg]\n#THETA_SKY Position angle (east of north) (native) [deg]\n#THETA_J2000 Position angle (east of north) (J2000) [deg]\n#THETA_B1950 Position angle (east of north) (B1950) [deg]\n#ERRX2_IMAGE Variance of position along x [pixel**2]\n#ERRY2_IMAGE Variance of position along y [pixel**2]\n#ERRXY_IMAGE Covariance of position between x and y [pixel**2]\n#ERRX2_WORLD Variance of position along X-WORLD (alpha) [deg**2]\n#ERRY2_WORLD Variance of position along Y-WORLD (delta) [deg**2]\n#ERRXY_WORLD Covariance of position X-WORLD/Y-WORLD [deg**2]\n#ERRCXX_IMAGE Cxx error ellipse parameter [pixel**(-2)]\n#ERRCYY_IMAGE Cyy error ellipse parameter [pixel**(-2)]\n#ERRCXY_IMAGE Cxy error ellipse parameter [pixel**(-2)]\n#ERRCXX_WORLD Cxx error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCYY_WORLD Cyy error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCXY_WORLD Cxy error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRA_IMAGE RMS position error along major axis [pixel]\n#ERRB_IMAGE RMS position error along minor axis [pixel]\n#ERRTHETA_IMAGE Error ellipse position angle (CCW/x) [deg]\n#ERRA_WORLD World RMS position error along major axis [deg]\n#ERRB_WORLD World RMS position error along minor axis [deg]\n#ERRTHETA_WORLD Error ellipse pos. angle (CCW/world-x) [deg]\n#ERRTHETA_SKY Native error ellipse pos. angle (east of north) [deg]\n#ERRTHETA_J2000 J2000 error ellipse pos. angle (east of north) [deg]\n#ERRTHETA_B1950 B1950 error ellipse pos. angle (east of north) [deg]\n#XWIN_IMAGE Windowed position estimate along x [pixel]\n#YWIN_IMAGE Windowed position estimate along y [pixel]\n#XWIN_WORLD Windowed position along world x axis [deg]\n#YWIN_WORLD Windowed position along world y axis [deg]\n#ALPHAWIN_SKY Windowed right ascension (native) [deg]\n#DELTAWIN_SKY Windowed declination (native) [deg]\n#ALPHAWIN_J2000 Windowed right ascension (J2000) [deg]\n#DELTAWIN_J2000 windowed declination (J2000) [deg]\n#ALPHAWIN_B1950 Windowed right ascension (B1950) [deg]\n#DELTAWIN_B1950 Windowed declination (B1950) [deg]\n#X2WIN_IMAGE Windowed variance along x [pixel**2]\n#Y2WIN_IMAGE Windowed variance along y [pixel**2]\n#XYWIN_IMAGE Windowed covariance between x and y [pixel**2]\n#X2WIN_WORLD Windowed variance along X-WORLD (alpha) [deg**2]\n#Y2WIN_WORLD Windowed variance along Y-WORLD (delta) [deg**2]\n#XYWIN_WORLD Windowed covariance between X-WORLD and Y-WORLD [deg**2]\n#CXXWIN_IMAGE Windowed Cxx object ellipse parameter [pixel**(-2)]\n#CYYWIN_IMAGE Windowed Cyy object ellipse parameter [pixel**(-2)]\n#CXYWIN_IMAGE Windowed Cxy object ellipse parameter [pixel**(-2)]\n#CXXWIN_WORLD Windowed Cxx object ellipse parameter (WORLD units) [deg**(-2)]\n#CYYWIN_WORLD Windowed Cyy object ellipse parameter (WORLD units) [deg**(-2)]\n#CXYWIN_WORLD Windowed Cxy object ellipse parameter (WORLD units) [deg**(-2)]\n#AWIN_IMAGE Windowed profile RMS along major axis [pixel]\n#BWIN_IMAGE Windowed profile RMS along minor axis [pixel]\n#THETAWIN_IMAGE Windowed position angle (CCW/x) [deg]\n#AWIN_WORLD Windowed profile RMS along major axis (world units) [deg]\n#BWIN_WORLD Windowed profile RMS along minor axis (world units) [deg]\n#THETAWIN_WORLD Windowed position angle (CCW/world-x) [deg]\n#THETAWIN_SKY Windowed position angle (east of north) (native) [deg]\n#THETAWIN_J2000 Windowed position angle (east of north) (J2000) [deg]\n#THETAWIN_B1950 Windowed position angle (east of north) (B1950) [deg]\n#ERRX2WIN_IMAGE Variance of windowed pos along x [pixel**2]\n#ERRY2WIN_IMAGE Variance of windowed pos along y [pixel**2]\n#ERRXYWIN_IMAGE Covariance of windowed pos between x and y [pixel**2]\n#ERRX2WIN_WORLD Variance of windowed pos along X-WORLD (alpha) [deg**2]\n#ERRY2WIN_WORLD Variance of windowed pos along Y-WORLD (delta) [deg**2]\n#ERRXYWIN_WORLD Covariance of windowed pos X-WORLD/Y-WORLD [deg**2]\n#ERRCXXWIN_IMAGE Cxx windowed error ellipse parameter [pixel**(-2)]\n#ERRCYYWIN_IMAGE Cyy windowed error ellipse parameter [pixel**(-2)]\n#ERRCXYWIN_IMAGE Cxy windowed error ellipse parameter [pixel**(-2)]\n#ERRCXXWIN_WORLD Cxx windowed error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCYYWIN_WORLD Cyy windowed error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCXYWIN_WORLD Cxy windowed error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRAWIN_IMAGE RMS windowed pos error along major axis [pixel]\n#ERRBWIN_IMAGE RMS windowed pos error along minor axis [pixel]\n#ERRTHETAWIN_IMAGE Windowed error ellipse pos angle (CCW/x) [deg]\n#ERRAWIN_WORLD World RMS windowed pos error along major axis [deg]\n#ERRBWIN_WORLD World RMS windowed pos error along minor axis [deg]\n#ERRTHETAWIN_WORLD Windowed error ellipse pos. angle (CCW/world-x) [deg]\n#ERRTHETAWIN_SKY Native windowed error ellipse pos. angle (east of north) [deg]\n#ERRTHETAWIN_J2000 J2000 windowed error ellipse pos. angle (east of north) [deg]\n#ERRTHETAWIN_B1950 B1950 windowed error ellipse pos. angle (east of north) [deg]\n#NITER_WIN Number of iterations for WIN centering \n#MU_THRESHOLD Detection threshold above background [mag * arcsec**(-2)]\n#MU_MAX Peak surface brightness above background [mag * arcsec**(-2)]\n#ISOAREA_WORLD Isophotal area above Analysis threshold [deg**2]\n#ISOAREAF_WORLD Isophotal area (filtered) above Detection threshold [deg**2]\n#ISO0 Isophotal area at level 0 [pixel**2]\n#ISO1 Isophotal area at level 1 [pixel**2]\n#ISO2 Isophotal area at level 2 [pixel**2]\n#ISO3 Isophotal area at level 3 [pixel**2]\n#ISO4 Isophotal area at level 4 [pixel**2]\n#ISO5 Isophotal area at level 5 [pixel**2]\n#ISO6 Isophotal area at level 6 [pixel**2]\n#ISO7 Isophotal area at level 7 [pixel**2]\n#FLAGS Extraction flags \n#FLAGS_WEIGHT Weighted extraction flags \n#FLAGS_WIN Flags for WINdowed parameters \n#IMAFLAGS_ISO FLAG-image flags OR'ed over the iso. profile \n#NIMAFLAGS_ISO Number of flagged pixels entering IMAFLAGS_ISO \n#FWHM_IMAGE FWHM assuming a gaussian core [pixel]\n#FWHM_WORLD FWHM assuming a gaussian core [deg]\n#ELONGATION A_IMAGE/B_IMAGE \n#ELLIPTICITY 1 - B_IMAGE/A_IMAGE \n#POLAR_IMAGE (A_IMAGE^2 - B_IMAGE^2)/(A_IMAGE^2 + B_IMAGE^2) \n#POLAR_WORLD (A_WORLD^2 - B_WORLD^2)/(A_WORLD^2 + B_WORLD^2) \n#POLARWIN_IMAGE (AWIN^2 - BWIN^2)/(AWIN^2 + BWIN^2) \n#POLARWIN_WORLD (AWIN^2 - BWIN^2)/(AWIN^2 + BWIN^2) \n#CLASS_STAR S/G classifier output \n#VIGNET Pixel data around detection [count]\n#VIGNET_SHIFT Pixel data around detection, corrected for shift [count]\n#VECTOR_ASSOC ASSOCiated parameter vector \n#NUMBER_ASSOC Number of ASSOCiated IDs \n#THRESHOLDMAX Maximum threshold possible for detection [count]\n#FLUX_GROWTH Cumulated growth-curve [count]\n#FLUX_GROWTHSTEP Step for growth-curves [pixel]\n#MAG_GROWTH Cumulated magnitude growth-curve [mag]\n#MAG_GROWTHSTEP Step for growth-curves [pixel]\n#FLUX_RADIUS Fraction-of-light radii [pixel]\n#XPSF_IMAGE X coordinate from PSF-fitting [pixel]\n#YPSF_IMAGE Y coordinate from PSF-fitting [pixel]\n#XPSF_WORLD PSF position along world x axis [deg]\n#YPSF_WORLD PSF position along world y axis [deg]\n#ALPHAPSF_SKY Right ascension of the fitted PSF (native) [deg]\n#DELTAPSF_SKY Declination of the fitted PSF (native) [deg]\n#ALPHAPSF_J2000 Right ascension of the fitted PSF (J2000) [deg]\n#DELTAPSF_J2000 Declination of the fitted PSF (J2000) [deg]\n#ALPHAPSF_B1950 Right ascension of the fitted PSF (B1950) [deg]\n#DELTAPSF_B1950 Declination of the fitted PSF (B1950) [deg]\n#FLUX_PSF Flux from PSF-fitting [count]\n#FLUXERR_PSF RMS flux error for PSF-fitting [count]\n#MAG_PSF Magnitude from PSF-fitting [mag]\n#MAGERR_PSF RMS magnitude error from PSF-fitting [mag]\n#NITER_PSF Number of iterations for PSF-fitting \n#CHI2_PSF Reduced chi2 from PSF-fitting \n#ERRX2PSF_IMAGE Variance of PSF position along x [pixel**2]\n#ERRY2PSF_IMAGE Variance of PSF position along y [pixel**2]\n#ERRXYPSF_IMAGE Covariance of PSF position between x and y [pixel**2]\n#ERRX2PSF_WORLD Variance of PSF position along X-WORLD (alpha) [deg**2]\n#ERRY2PSF_WORLD Variance of PSF position along Y-WORLD (delta) [deg**2]\n#ERRXYPSF_WORLD Covariance of PSF position X-WORLD/Y-WORLD [deg**2]\n#ERRCXXPSF_IMAGE Cxx PSF error ellipse parameter [pixel**(-2)]\n#ERRCYYPSF_IMAGE Cyy PSF error ellipse parameter [pixel**(-2)]\n#ERRCXYPSF_IMAGE Cxy PSF error ellipse parameter [pixel**(-2)]\n#ERRCXXPSF_WORLD Cxx PSF error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCYYPSF_WORLD Cyy PSF error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCXYPSF_WORLD Cxy PSF error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRAPSF_IMAGE PSF RMS position error along major axis [pixel]\n#ERRBPSF_IMAGE PSF RMS position error along minor axis [pixel]\n#ERRTHTPSF_IMAGE PSF error ellipse position angle (CCW/x) [deg]\n#ERRAPSF_WORLD World PSF RMS position error along major axis [pixel]\n#ERRBPSF_WORLD World PSF RMS position error along minor axis [pixel]\n#ERRTHTPSF_WORLD PSF error ellipse pos. angle (CCW/world-x) [deg]\n#ERRTHTPSF_SKY Native PSF error ellipse pos. angle (east of north) [deg]\n#ERRTHTPSF_J2000 J2000 PSF error ellipse pos. angle (east of north) [deg]\n#ERRTHTPSF_B1950 B1950 PSF error ellipse pos. angle (east of north) [deg]\n#VECTOR_MODEL Model-fitting coefficients \n#VECTOR_MODELERR Model-fitting coefficient uncertainties \n#CHI2_MODEL Reduced Chi2 of the fit \n#FLAGS_MODEL Model-fitting flags \n#NITER_MODEL Number of iterations for model-fitting \n#FLUX_MODEL Flux from model-fitting [count]\n#FLUXERR_MODEL RMS error on model-fitting flux [count]\n#MAG_MODEL Magnitude from model-fitting [mag]\n#MAGERR_MODEL RMS error on model-fitting magnitude [mag]\n#XMODEL_IMAGE X coordinate from model-fitting [pixel]\n#YMODEL_IMAGE Y coordinate from model-fitting [pixel]\n#XMODEL_WORLD Fitted position along world x axis [deg]\n#YMODEL_WORLD Fitted position along world y axis [deg]\n#ALPHAMODEL_SKY Fitted position along right ascension (native) [deg]\n#DELTAMODEL_SKY Fitted position along declination (native) [deg]\n#ALPHAMODEL_J2000 Fitted position along right ascension (J2000) [deg]\n#DELTAMODEL_J2000 Fitted position along declination (J2000) [deg]\n#ALPHAMODEL_B1950 Fitted position along right ascension (B1950) [deg]\n#DELTAMODEL_B1950 Fitted position along declination (B1950) [deg]\n#ERRX2MODEL_IMAGE Variance of fitted position along x [pixel**2]\n#ERRY2MODEL_IMAGE Variance of fitted position along y [pixel**2]\n#ERRXYMODEL_IMAGE Covariance of fitted position between x and y [pixel**2]\n#ERRX2MODEL_WORLD Variance of fitted position along X-WORLD (alpha) [deg**2]\n#ERRY2MODEL_WORLD Variance of fitted position along Y-WORLD (delta) [deg**2]\n#ERRXYMODEL_WORLD Covariance of fitted position X-WORLD/Y-WORLD [deg**2]\n#ERRCXXMODEL_IMAGE Cxx error ellipse parameter of fitted position [pixel**(-2)]\n#ERRCYYMODEL_IMAGE Cyy error ellipse parameter of fitted position [pixel**(-2)]\n#ERRCXYMODEL_IMAGE Cxy error ellipse parameter of fitted position [pixel**(-2)]\n#ERRCXXMODEL_WORLD Cxx fitted error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCYYMODEL_WORLD Cyy fitted error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRCXYMODEL_WORLD Cxy fitted error ellipse parameter (WORLD units) [deg**(-2)]\n#ERRAMODEL_IMAGE RMS error of fitted position along major axis [pixel]\n#ERRBMODEL_IMAGE RMS error of fitted position along minor axis [pixel]\n#ERRTHETAMODEL_IMAGE Error ellipse pos.angle of fitted position (CCW/x) [deg]\n#ERRAMODEL_WORLD World RMS error of fitted position along major axis [deg]\n#ERRBMODEL_WORLD World RMS error of fitted position along minor axis [deg]\n#ERRTHETAMODEL_WORLD Error ellipse pos.angle of fitted position (CCW/world-x) [deg]\n#ERRTHETAMODEL_SKY Native fitted error ellipse pos. angle (east of north) [deg]\n#ERRTHETAMODEL_J2000 J2000 fitted error ellipse pos. angle (east of north) [deg]\n#ERRTHETAMODEL_B1950 B1950 fitted error ellipse pos. angle (east of north) [deg]\n#X2MODEL_IMAGE Variance along x from model-fitting [pixel**2]\n#Y2MODEL_IMAGE Variance along y from model-fitting [pixel**2]\n#XYMODEL_IMAGE Covariance between x and y from model-fitting [pixel**2]\n#E1MODEL_IMAGE Ellipticity component from model-fitting \n#E2MODEL_IMAGE Ellipticity component from model-fitting \n#EPS1MODEL_IMAGE Ellipticity component (quadratic) from model-fitting \n#EPS2MODEL_IMAGE Ellipticity component (quadratic) from model-fitting \n#CONCENTRATION_MODEL Concentration parameter from model-fitting \n#CLASS_STAR_MODEL S/G classifier from model-fitting \n#FLUX_BACKOFFSET Background offset from fitting [count]\n#FLUXERR_BACKOFFSET RMS error on fitted background offset [count]\n#FLUX_SPHEROID Spheroid total flux from fitting [count]\n#FLUXERR_SPHEROID RMS error on fitted spheroid total flux [count]\n#MAG_SPHEROID Spheroid total magnitude from fitting [mag]\n#MAGERR_SPHEROID RMS error on fitted spheroid total magnitude [mag]\n#SPHEROID_REFF_IMAGE Spheroid effective radius from fitting [pixel]\n#SPHEROID_REFFERR_IMAGE RMS error on fitted spheroid effective radius [pixel]\n#SPHEROID_REFF_WORLD Spheroid effective radius from fitting [deg]\n#SPHEROID_REFFERR_WORLD RMS error on fitted spheroid effective radius [deg]\n#SPHEROID_ASPECT_IMAGE Spheroid aspect ratio from fitting \n#SPHEROID_ASPECTERR_IMA RMS error on fitted spheroid aspect ratio \n#SPHEROID_ASPECT_WORLD Spheroid aspect ratio from fitting \n#SPHEROID_ASPECTERR_WOR RMS error on fitted spheroid aspect ratio \n#SPHEROID_THETA_IMAGE Spheroid position angle (CCW/x) from fitting [deg]\n#SPHEROID_THETAERR_IMAG RMS error on spheroid position angle [deg]\n#SPHEROID_THETA_WORLD Spheroid position angle (CCW/world-x) [deg]\n#SPHEROID_THETAERR_WORL RMS error on spheroid position angle [deg]\n#SPHEROID_THETA_SKY Spheroid position angle (east of north, native) [deg]\n#SPHEROID_THETA_J2000 Spheroid position angle (east of north, J2000) [deg]\n#SPHEROID_THETA_B1950 Spheroid position angle (east of north, B1950) [deg]\n#SPHEROID_SERSICN Spheroid Sersic index from fitting \n#SPHEROID_SERSICNERR RMS error on fitted spheroid Sersic index \n#FLUX_DISK Disk total flux from fitting [count]\n#FLUXERR_DISK RMS error on fitted disk total flux [count]\n#MAG_DISK Disk total magnitude from fitting [mag]\n#MAGERR_DISK RMS error on fitted disk total magnitude [mag]\n#DISK_SCALE_IMAGE Disk scalelength from fitting [pixel]\n#DISK_SCALEERR_IMAGE RMS error on fitted disk scalelength [pixel]\n#DISK_SCALE_WORLD Disk scalelength from fitting (world coords) [deg]\n#DISK_SCALEERR_WORLD RMS error on fitted disk scalelength (world coords) [deg]\n#DISK_ASPECT_IMAGE Disk aspect ratio from fitting \n#DISK_ASPECTERR_IMAGE RMS error on fitted disk aspect ratio \n#DISK_ASPECT_WORLD Disk aspect ratio from fitting \n#DISK_ASPECTERR_WORLD RMS error on disk aspect ratio \n#DISK_INCLINATION Disk inclination from fitting [deg]\n#DISK_INCLINATIONERR RMS error on disk inclination from fitting [deg]\n#DISK_THETA_IMAGE Disk position angle (CCW/x) from fitting [deg]\n#DISK_THETAERR_IMAGE RMS error on fitted disk position angle [deg]\n#DISK_THETA_WORLD Disk position angle (CCW/world-x) [deg]\n#DISK_THETAERR_WORLD RMS error on disk position angle [deg]\n#DISK_THETA_SKY Disk position angle (east of north, native) [deg]\n#DISK_THETA_J2000 Disk position angle (east of north, J2000) [deg]\n#DISK_THETA_B1950 Disk position angle (east of north, B1950) [deg]\n#DISK_PATTERN_VECTOR Disk pattern fitted coefficients \n#DISK_PATTERNMOD_VECTOR Disk pattern fitted moduli \n#DISK_PATTERNARG_VECTOR Disk pattern fitted arguments [deg]\n#DISK_PATTERN_SPIRAL Disk pattern spiral index \n"
fullparamlist = ['NUMBER', 'EXT_NUMBER', 'FLUX_ISO', 'FLUXERR_ISO', 'MAG_ISO', 'MAGERR_ISO', 'FLUX_ISOCOR', 'FLUXERR_ISOCOR', 'MAG_ISOCOR', 'MAGERR_ISOCOR', 'FLUX_APER', 'FLUXERR_APER', 'MAG_APER', 'MAGERR_APER', 'FLUX_AUTO', 'FLUXERR_AUTO', 'MAG_AUTO', 'MAGERR_AUTO', 'FLUX_PETRO', 'FLUXERR_PETRO', 'MAG_PETRO', 'MAGERR_PETRO', 'FLUX_BEST', 'FLUXERR_BEST', 'MAG_BEST', 'MAGERR_BEST', 'FLUX_WIN', 'FLUXERR_WIN', 'MAG_WIN', 'MAGERR_WIN', 'FLUX_SOMFIT', 'FLUXERR_SOMFIT', 'MAG_SOMFIT', 'MAGERR_SOMFIT', 'ERROR_SOMFIT', 'VECTOR_SOMFIT', 'KRON_RADIUS', 'PETRO_RADIUS', 'BACKGROUND', 'THRESHOLD', 'FLUX_MAX', 'ISOAREA_IMAGE', 'ISOAREAF_IMAGE', 'XMIN_IMAGE', 'YMIN_IMAGE', 'XMAX_IMAGE', 'YMAX_IMAGE', 'XPEAK_IMAGE', 'YPEAK_IMAGE', 'XPEAK_WORLD', 'YPEAK_WORLD', 'ALPHAPEAK_SKY', 'DELTAPEAK_SKY', 'ALPHAPEAK_J2000', 'DELTAPEAK_J2000', 'ALPHAPEAK_B1950', 'DELTAPEAK_B1950', 'X_IMAGE', 'Y_IMAGE', 'X_IMAGE_DBL', 'Y_IMAGE_DBL', 'X_WORLD', 'Y_WORLD', 'X_MAMA', 'Y_MAMA', 'ALPHA_SKY', 'DELTA_SKY', 'ALPHA_J2000', 'DELTA_J2000', 'ALPHA_B1950', 'DELTA_B1950', 'X2_IMAGE', 'Y2_IMAGE', 'XY_IMAGE', 'X2_WORLD', 'Y2_WORLD', 'XY_WORLD', 'CXX_IMAGE', 'CYY_IMAGE', 'CXY_IMAGE', 'CXX_WORLD', 'CYY_WORLD', 'CXY_WORLD', 'A_IMAGE', 'B_IMAGE', 'THETA_IMAGE', 'A_WORLD', 'B_WORLD', 'THETA_WORLD', 'THETA_SKY', 'THETA_J2000', 'THETA_B1950', 'ERRX2_IMAGE', 'ERRY2_IMAGE', 'ERRXY_IMAGE', 'ERRX2_WORLD', 'ERRY2_WORLD', 'ERRXY_WORLD', 'ERRCXX_IMAGE', 'ERRCYY_IMAGE', 'ERRCXY_IMAGE', 'ERRCXX_WORLD', 'ERRCYY_WORLD', 'ERRCXY_WORLD', 'ERRA_IMAGE', 'ERRB_IMAGE', 'ERRTHETA_IMAGE', 'ERRA_WORLD', 'ERRB_WORLD', 'ERRTHETA_WORLD', 'ERRTHETA_SKY', 'ERRTHETA_J2000', 'ERRTHETA_B1950', 'XWIN_IMAGE', 'YWIN_IMAGE', 'XWIN_WORLD', 'YWIN_WORLD', 'ALPHAWIN_SKY', 'DELTAWIN_SKY', 'ALPHAWIN_J2000', 'DELTAWIN_J2000', 'ALPHAWIN_B1950', 'DELTAWIN_B1950', 'X2WIN_IMAGE', 'Y2WIN_IMAGE', 'XYWIN_IMAGE', 'X2WIN_WORLD', 'Y2WIN_WORLD', 'XYWIN_WORLD', 'CXXWIN_IMAGE', 'CYYWIN_IMAGE', 'CXYWIN_IMAGE', 'CXXWIN_WORLD', 'CYYWIN_WORLD', 'CXYWIN_WORLD', 'AWIN_IMAGE', 'BWIN_IMAGE', 'THETAWIN_IMAGE', 'AWIN_WORLD', 'BWIN_WORLD', 'THETAWIN_WORLD', 'THETAWIN_SKY', 'THETAWIN_J2000', 'THETAWIN_B1950', 'ERRX2WIN_IMAGE', 'ERRY2WIN_IMAGE', 'ERRXYWIN_IMAGE', 'ERRX2WIN_WORLD', 'ERRY2WIN_WORLD', 'ERRXYWIN_WORLD', 'ERRCXXWIN_IMAGE', 'ERRCYYWIN_IMAGE', 'ERRCXYWIN_IMAGE', 'ERRCXXWIN_WORLD', 'ERRCYYWIN_WORLD', 'ERRCXYWIN_WORLD', 'ERRAWIN_IMAGE', 'ERRBWIN_IMAGE', 'ERRTHETAWIN_IMAGE', 'ERRAWIN_WORLD', 'ERRBWIN_WORLD', 'ERRTHETAWIN_WORLD', 'ERRTHETAWIN_SKY', 'ERRTHETAWIN_J2000', 'ERRTHETAWIN_B1950', 'NITER_WIN', 'MU_THRESHOLD', 'MU_MAX', 'ISOAREA_WORLD', 'ISOAREAF_WORLD', 'ISO0', 'ISO1', 'ISO2', 'ISO3', 'ISO4', 'ISO5', 'ISO6', 'ISO7', 'FLAGS', 'FLAGS_WEIGHT', 'FLAGS_WIN', 'IMAFLAGS_ISO', 'NIMAFLAGS_ISO', 'FWHM_IMAGE', 'FWHM_WORLD', 'ELONGATION', 'ELLIPTICITY', 'POLAR_IMAGE', 'POLAR_WORLD', 'POLARWIN_IMAGE', 'POLARWIN_WORLD', 'CLASS_STAR', 'VIGNET', 'VIGNET_SHIFT', 'VECTOR_ASSOC', 'NUMBER_ASSOC', 'THRESHOLDMAX', 'FLUX_GROWTH', 'FLUX_GROWTHSTEP', 'MAG_GROWTH', 'MAG_GROWTHSTEP', 'FLUX_RADIUS', 'XPSF_IMAGE', 'YPSF_IMAGE', 'XPSF_WORLD', 'YPSF_WORLD', 'ALPHAPSF_SKY', 'DELTAPSF_SKY', 'ALPHAPSF_J2000', 'DELTAPSF_J2000', 'ALPHAPSF_B1950', 'DELTAPSF_B1950', 'FLUX_PSF', 'FLUXERR_PSF', 'MAG_PSF', 'MAGERR_PSF', 'NITER_PSF', 'CHI2_PSF', 'ERRX2PSF_IMAGE', 'ERRY2PSF_IMAGE', 'ERRXYPSF_IMAGE', 'ERRX2PSF_WORLD', 'ERRY2PSF_WORLD', 'ERRXYPSF_WORLD', 'ERRCXXPSF_IMAGE', 'ERRCYYPSF_IMAGE', 'ERRCXYPSF_IMAGE', 'ERRCXXPSF_WORLD', 'ERRCYYPSF_WORLD', 'ERRCXYPSF_WORLD', 'ERRAPSF_IMAGE', 'ERRBPSF_IMAGE', 'ERRTHTPSF_IMAGE', 'ERRAPSF_WORLD', 'ERRBPSF_WORLD', 'ERRTHTPSF_WORLD', 'ERRTHTPSF_SKY', 'ERRTHTPSF_J2000', 'ERRTHTPSF_B1950', 'VECTOR_MODEL', 'VECTOR_MODELERR', 'CHI2_MODEL', 'FLAGS_MODEL', 'NITER_MODEL', 'FLUX_MODEL', 'FLUXERR_MODEL', 'MAG_MODEL', 'MAGERR_MODEL', 'XMODEL_IMAGE', 'YMODEL_IMAGE', 'XMODEL_WORLD', 'YMODEL_WORLD', 'ALPHAMODEL_SKY', 'DELTAMODEL_SKY', 'ALPHAMODEL_J2000', 'DELTAMODEL_J2000', 'ALPHAMODEL_B1950', 'DELTAMODEL_B1950', 'ERRX2MODEL_IMAGE', 'ERRY2MODEL_IMAGE', 'ERRXYMODEL_IMAGE', 'ERRX2MODEL_WORLD', 'ERRY2MODEL_WORLD', 'ERRXYMODEL_WORLD', 'ERRCXXMODEL_IMAGE', 'ERRCYYMODEL_IMAGE', 'ERRCXYMODEL_IMAGE', 'ERRCXXMODEL_WORLD', 'ERRCYYMODEL_WORLD', 'ERRCXYMODEL_WORLD', 'ERRAMODEL_IMAGE', 'ERRBMODEL_IMAGE', 'ERRTHETAMODEL_IMAGE', 'ERRAMODEL_WORLD', 'ERRBMODEL_WORLD', 'ERRTHETAMODEL_WORLD', 'ERRTHETAMODEL_SKY', 'ERRTHETAMODEL_J2000', 'ERRTHETAMODEL_B1950', 'X2MODEL_IMAGE', 'Y2MODEL_IMAGE', 'XYMODEL_IMAGE', 'E1MODEL_IMAGE', 'E2MODEL_IMAGE', 'EPS1MODEL_IMAGE', 'EPS2MODEL_IMAGE', 'CONCENTRATION_MODEL', 'CLASS_STAR_MODEL', 'FLUX_BACKOFFSET', 'FLUXERR_BACKOFFSET', 'FLUX_SPHEROID', 'FLUXERR_SPHEROID', 'MAG_SPHEROID', 'MAGERR_SPHEROID', 'SPHEROID_REFF_IMAGE', 'SPHEROID_REFFERR_IMAGE', 'SPHEROID_REFF_WORLD', 'SPHEROID_REFFERR_WORLD', 'SPHEROID_ASPECT_IMAGE', 'SPHEROID_ASPECTERR_IMA', 'SPHEROID_ASPECT_WORLD', 'SPHEROID_ASPECTERR_WOR', 'SPHEROID_THETA_IMAGE', 'SPHEROID_THETAERR_IMAG', 'SPHEROID_THETA_WORLD', 'SPHEROID_THETAERR_WORL', 'SPHEROID_THETA_SKY', 'SPHEROID_THETA_J2000', 'SPHEROID_THETA_B1950', 'SPHEROID_SERSICN', 'SPHEROID_SERSICNERR', 'FLUX_DISK', 'FLUXERR_DISK', 'MAG_DISK', 'MAGERR_DISK', 'DISK_SCALE_IMAGE', 'DISK_SCALEERR_IMAGE', 'DISK_SCALE_WORLD', 'DISK_SCALEERR_WORLD', 'DISK_ASPECT_IMAGE', 'DISK_ASPECTERR_IMAGE', 'DISK_ASPECT_WORLD', 'DISK_ASPECTERR_WORLD', 'DISK_INCLINATION', 'DISK_INCLINATIONERR', 'DISK_THETA_IMAGE', 'DISK_THETAERR_IMAGE', 'DISK_THETA_WORLD', 'DISK_THETAERR_WORLD', 'DISK_THETA_SKY', 'DISK_THETA_J2000', 'DISK_THETA_B1950', 'DISK_PATTERN_VECTOR', 'DISK_PATTERNMOD_VECTOR', 'DISK_PATTERNARG_VECTOR', 'DISK_PATTERN_SPIRAL']