Commit 9a5020d1 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Fixed regression involving SPREAD_MODEL and SPREADERR_MODEL (Thanks Shantanu for reporting).

Added Rescale_Weights PARAM in XML output.
Pushed version number to 2.14.1
parent 54bca520
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for sextractor 2.13.6.
# Generated by GNU Autoconf 2.63 for sextractor 2.14.1.
#
# Report bugs to <bertin@iap.fr>.
#
......@@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.13.6'
PACKAGE_STRING='sextractor 2.13.6'
PACKAGE_VERSION='2.14.1'
PACKAGE_STRING='sextractor 2.14.1'
PACKAGE_BUGREPORT='bertin@iap.fr'
 
ac_unique_file="src/makeit.c"
......@@ -1508,7 +1508,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sextractor 2.13.6 to adapt to many kinds of systems.
\`configure' configures sextractor 2.14.1 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1578,7 +1578,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sextractor 2.13.6:";;
short | recursive ) echo "Configuration of sextractor 2.14.1:";;
esac
cat <<\_ACEOF
 
......@@ -1711,7 +1711,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sextractor configure 2.13.6
sextractor configure 2.14.1
generated by GNU Autoconf 2.63
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
......@@ -1725,7 +1725,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by sextractor $as_me 2.13.6, which was
It was created by sextractor $as_me 2.14.1, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
$ $0 $@
......@@ -2428,7 +2428,7 @@ fi
 
# Define the identity of the package.
PACKAGE='sextractor'
VERSION='2.13.6'
VERSION='2.14.1'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -28593,7 +28593,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sextractor $as_me 2.13.6, which was
This file was extended by sextractor $as_me 2.14.1, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -28656,7 +28656,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sextractor config.status 2.13.6
sextractor config.status 2.14.1
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
......
......@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
#
# Last modified: 03/05/2011
# Last modified: 31/05/2011
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
# This is your standard Bertin source code...
AC_INIT(sextractor, 2.13.6, [bertin@iap.fr])
AC_INIT(sextractor, 2.14.1, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf)
AM_CONFIG_HEADER(config.h)
......
.TH SEXTRACTOR "1" "May 2011" "SExtractor 2.13.6" "User Commands"
.TH SEXTRACTOR "1" "May 2011" "SExtractor 2.14.1" "User Commands"
.SH NAME
sex \- extract a source catalogue from an astronomical FITS image
.SH SYNOPSIS
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 1993-2010 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
*
* License: GNU General Public License
*
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 14/10/2010
* Last modified: 19/05/2011
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -514,7 +514,8 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
|| FLAG(obj2.poserrmx2w_psf)
|| FLAG(obj2.poserrmx2w_prof)
|| FLAG(obj2.prof_flagw)
|| ((!prefs.pixel_scale) && FLAG(obj2.area_flagw)))
|| ((!prefs.pixel_scale) && FLAG(obj2.area_flagw))
|| ((!prefs.pixel_scale) && FLAG(obj2.fwhmw_psf)))
{
rawpos[0] = obj2->posx;
rawpos[1] = obj2->posy;
......@@ -606,14 +607,22 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
check->overlay, obj->flag&OBJ_CROWDED);
}
/* ---- Star/Galaxy classification */
/* ---------------------- Star/Galaxy classification -----------------------*/
if (FLAG(obj2.fwhm_psf) || (FLAG(obj2.sprob) && prefs.seeing_fwhm==0.0))
{
obj2->fwhm_psf = (prefs.seeing_fwhm==0.0)?
psf_fwhm(thepsf)*field->pixscale
: prefs.seeing_fwhm;
if (FLAG(obj2.fwhmw_psf))
obj2->fwhmw_psf = obj2->fwhm_psf * (prefs.pixel_scale?
field->pixscale/3600.0 : sqrt(obj2->pixscale2));
}
if (FLAG(obj2.sprob))
{
double fac2, input[10], output, fwhm;
fwhm = (prefs.seeing_fwhm==0.0)? psf_fwhm(thepsf)*field->pixscale
: prefs.seeing_fwhm;
fwhm = (prefs.seeing_fwhm==0.0)? obj2->fwhm_psf : prefs.seeing_fwhm;
fac2 = fwhm/field->pixscale;
fac2 *= fac2;
......
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 12/04/2011
* Last modified: 19/05/2011
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -588,6 +588,7 @@ void updateparamflags()
VECFLAG(obj.imaflag) |= VECFLAG(obj.imanflag);
/*------------------------------ PSF-fitting --------------------------------*/
FLAG(obj2.fwhm_psf) |= FLAG(obj2.fwhmw_psf);
FLAG(obj2.poserraw_psf) |= FLAG(obj2.poserrbw_psf);
FLAG(obj2.poserrcxxw_psf) |= FLAG(obj2.poserrcyyw_psf)
| FLAG(obj2.poserrcxyw_psf);
......
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 03/05/2011
* Last modified: 19/05/2011
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -752,6 +752,13 @@ keystruct objkey[] = {
&outobj2.flux_radius, H_FLOAT, T_FLOAT, "%10.3f", "pixel",
"phys.size.radius;instr.det", "pix", 1, &prefs.flux_radiussize},
{"FWHMPSF_IMAGE", "FWHM of the local PSF model",
&outobj2.fwhm_psf, H_FLOAT, T_FLOAT, "%8.3f", "pixel",
"phys.size.diameter;instr.det.psf", "pix"},
{"FWHMPSF_WORLD", "FWHM of the local PSF model (world units)",
&outobj2.fwhmw, H_FLOAT, T_FLOAT, "%12.7g", "deg",
"phys.angSize;instr.det.psf", "deg"},
{"XPSF_IMAGE", "X coordinate from PSF-fitting",
&outobj2.x_psf, H_FLOAT, T_DOUBLE, "%11.4f", "pixel",
"pos.cartesian.x;stat.fit.param;instr.det", "pix"},
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 1993-2010 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
*
* License: GNU General Public License
*
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 09/03/2011
* Last modified: 19/05/2011
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -490,7 +490,8 @@ void useprefs()
|| FLAG(obj2.mx2w) || FLAG(obj2.win_mx2w)
|| FLAG(obj2.xw_prof) || FLAG(obj2.poserrmx2w_prof)
|| FLAG(obj2.poserr_mx2w) || FLAG(obj2.winposerr_mx2w)
|| FLAG(obj2.area_flagw) || FLAG(obj2.prof_flagw);
|| FLAG(obj2.area_flagw) || FLAG(obj2.prof_flagw)
|| FLAG(obj2.fwhmw_psf);
/* Default astrometric settings */
strcpy(prefs.coosys, "ICRS");
......@@ -618,8 +619,8 @@ void useprefs()
if (prefs.prof_flag)
prefs.psf_flag = 1;
/*--------------------------- Adaptive class-star ---------------------------*/
if (prefs.seeing_fwhm == 0 && FLAG(obj2.sprob))
/*-------------------------- Tracking the PSF FWHM --------------------------*/
if (prefs.seeing_fwhm == 0 && FLAG(obj2.sprob) || FLAG(obj2.fwhm_psf))
prefs.psf_flag = 1;
/*-------------------------- Pattern-fitting -------------------------------*/
......
This diff is collapsed.
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 22/04/2011
* Last modified: 20/05/2011
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -44,11 +44,19 @@
#define MODEL_TABULATED 0x0200
#define MODEL_NMAX 11
/*-------------------------------- flags ------------------------------------*/
/*--------------------------- fitting flags ---------------------------------*/
#define PROFLAG_MODSUB 0x0001
#define PROFLAG_OBJSUB 0x0002
#define PROFLAG_NOTCONST 0x0004
#define PROFLAG_MINLIM 0x0008
#define PROFLAG_MAXLIM 0x0010
/*------------------------- parameter type flags ----------------------------*/
#define PROFPARAM_UNBOUNDED 1
#define PROFPARAM_LINBOUNDED 2
#define PROFPARAM_LOGBOUNDED 3
/*-------------------------------- macros -----------------------------------*/
......@@ -96,6 +104,9 @@ typedef enum {PARAM_BACK,
PARAM_OUTRING_FLUX, PARAM_OUTRING_START, PARAM_OUTRING_WIDTH,
PARAM_NPARAM} paramenum;
typedef enum {PARFIT_FIXED, PARFIT_UNBOUND, PARFIT_LINBOUND,
PARFIT_LOGBOUND} parfitenum;
/*--------------------------- structure definitions -------------------------*/
typedef struct
......@@ -142,12 +153,13 @@ typedef struct
float *paramlist[PARAM_NPARAM]; /* flat parameter list */
int paramindex[PARAM_NPARAM];/* Vector of parameter indices */
int paramrevindex[PARAM_NPARAM];/* Vector of reversed indices */
int freeparam_flag[PARAM_NPARAM]; /* Free parameter flag */
int nfreeparam; /* Number of free parameters */
parfitenum parfittype[PARAM_NPARAM];/* Parameter fitting: fixed,bounded,.*/
float param[PARAM_NPARAM]; /* Vector of parameters to be fitted */
float paraminit[PARAM_NPARAM];/* Parameter initial guesses */
float parammin[PARAM_NPARAM]; /* Parameter lower limits */
float parammax[PARAM_NPARAM]; /* Parameter upper limits */
int nlimmin; /* # of parameters that hit the min limit */
int nlimmax; /* # of parameters that hit the max limit */
float paramerr[PARAM_NPARAM]; /* Std deviations of parameters */
float *covar; /* Covariance matrix */
int iter; /* Iteration counter */
......@@ -178,6 +190,9 @@ typedef struct
float sigma; /* Standard deviation of the pixel values */
float flux; /* Total flux in final convolved model */
float spirindex; /* Spiral index (>0 for CCW) */
float guessradius; /* Best guess for source half-light radius */
float guessflux; /* Best guess for typical source flux (>0) */
float guessfluxmax; /* Best guess for source flux upper limit (>0)*/
/* Buffers */
double dparam[PARAM_NPARAM];
} profitstruct;
......@@ -200,28 +215,31 @@ float *profit_compresi(profitstruct *profit, float dynparam,
profit_noisearea(profitstruct *profit),
profit_spiralindex(profitstruct *profit);
int profit_copyobjpix(profitstruct *profit, picstruct *field,
int profit_boundtounbound(profitstruct *profit,
float *param, double *dparam, int index),
profit_copyobjpix(profitstruct *profit, picstruct *field,
picstruct *wfield),
profit_covarunboundtobound(profitstruct *profit,
double *dparam, float *param),
profit_minimize(profitstruct *profit, int niter),
prof_moments(profitstruct *profit, profstruct *prof,
double *jac),
profit_resample(profitstruct *profit, float *inpix,
PIXTYPE *outpix, float factor),
profit_setparam(profitstruct *profit, paramenum paramtype,
float param, float parammin, float parammax);
float param, float parammin, float parammax,
parfitenum parfittype),
profit_unboundtobound(profitstruct *profit,
double *dparam, float *param, int index);
void prof_end(profstruct *prof),
profit_addparam(profitstruct *profit, paramenum paramindex,
float **param),
profit_boundtounbound(profitstruct *profit,
float *param, double *dparam, int index),
profit_fit(profitstruct *profit,
picstruct *field, picstruct *wfield,
objstruct *obj, obj2struct *obj2),
profit_convmoments(profitstruct *profit, obj2struct *obj2),
profit_convolve(profitstruct *profit, float *modpix),
profit_covarunboundtobound(profitstruct *profit,
double *dparam, float *param),
profit_end(profitstruct *profit),
profit_evaluate(double *par, double *fvec, int m, int n,
void *adata),
......@@ -234,8 +252,6 @@ void prof_end(profstruct *prof),
profit_psf(profitstruct *profit),
profit_resetparam(profitstruct *profit, paramenum paramtype),
profit_resetparams(profitstruct *profit),
profit_surface(profitstruct *profit, obj2struct *obj2),
profit_unboundtobound(profitstruct *profit,
double *dparam, float *param, int index);
profit_surface(profitstruct *profit, obj2struct *obj2);
#endif
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 03/05/2011
* Last modified: 19/05/2011
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -278,6 +278,8 @@ typedef struct
float *flux_radius; /* f-light-radii */
float hl_radius; /* Scalar half-light radius */
/* ---- PSF-fitting */
float fwhm_psf; /* PSF FWHM */
float fwhmw_psf; /* WORLD PSF FWHM */
float flux_psf; /* Flux from PSF-fitting */
float fluxerr_psf; /* RMS error on PSF flux */
float mag_psf; /* Mag from PSF-fitting */
......
......@@ -231,7 +231,7 @@ INPUT Pointer to the output file (or stream),
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 24/01/2011
VERSION 31/05/2011
***/
int write_xml_meta(FILE *file, char *error)
{
......@@ -566,6 +566,15 @@ int write_xml_meta(FILE *file, char *error)
FIND_STRICT)].keylist[prefs.weight_type[1]]);
fprintf(file, "\"/>\n");
fprintf(file,
" <PARAM name=\"Rescale_Weights\" datatype=\"boolean\""
" arraysize=\"%d\" ucd=\"meta.code;obs.param\" value=\"%c",
prefs.nwscale_flag, prefs.wscale_flag[0]? 'T':'F');
if (prefs.nwscale_flag>1)
fprintf(file, " %c", prefs.wscale_flag[1]? 'T':'F');
fprintf(file, "\"/>\n");
fprintf(file, " <PARAM name=\"Weight_Thresh\" datatype=\"float\""
" arraysize=\"%d\" ucd=\"instr.sensitivity;obs.param\" value=\"%g",
prefs.nweight_thresh, prefs.weight_thresh[0]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment