Commit ee4507e9 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Fixed issue with MINIBACKGROUND and MINIBACK_RMS multi-extension check-images.

Added new measurement parameters:
FLUXRATIO_POINTSOURCE :    Point-source flux-to-total ratio from fitting,
FLUXRATIOERR_POINTSOURCE : Uncertainty on point-source flux-to-total ratio,
FLUXRATIO_SPHEROID :       Spheroid flux-to-total ratio from fitting,
FLUXRATIOERR_SPHEROID :    Uncertainty on spheroid flux-to-total ratio,
FLUXRATIO_DISK :           Disk flux-to-total ratio from fitting, and
FLUXRATIOERR_DISK :        Uncertainty on disk flux-to-total ratio.
Pushed version number to 2.19.0
parent 66380127
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sextractor 2.18.12.
# Generated by GNU Autoconf 2.69 for sextractor 2.19.0.
#
# Report bugs to <bertin@iap.fr>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.18.12'
PACKAGE_STRING='sextractor 2.18.12'
PACKAGE_VERSION='2.19.0'
PACKAGE_STRING='sextractor 2.19.0'
PACKAGE_BUGREPORT='bertin@iap.fr'
PACKAGE_URL=''
......@@ -1345,7 +1345,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.18.12 to adapt to many kinds of systems.
\`configure' configures sextractor 2.19.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1415,7 +1415,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sextractor 2.18.12:";;
short | recursive ) echo "Configuration of sextractor 2.19.0:";;
esac
cat <<\_ACEOF
......@@ -1549,7 +1549,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sextractor configure 2.18.12
sextractor configure 2.19.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1972,7 +1972,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.18.12, which was
It was created by sextractor $as_me 2.19.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2786,7 +2786,7 @@ fi
# Define the identity of the package.
PACKAGE='sextractor'
VERSION='2.18.12'
VERSION='2.19.0'
cat >>confdefs.h <<_ACEOF
......@@ -15714,7 +15714,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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.18.12, which was
This file was extended by sextractor $as_me 2.19.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -15780,7 +15780,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
sextractor config.status 2.18.12
sextractor config.status 2.19.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -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: 06/06/2013
# Last modified: 05/07/2013
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
# This is your standard Bertin source code...
AC_INIT(sextractor, 2.18.12, [bertin@iap.fr])
AC_INIT(sextractor, 2.19.0, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADERS(config.h)
......
.TH SEXTRACTOR "1" "June 2013" "SExtractor 2.18.12" "User Commands"
.TH SEXTRACTOR "1" "July 2013" "SExtractor 2.19.0" "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-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 1993-2013 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: 08/12/2011
* Last modified: 05/07/2013
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -192,13 +192,6 @@ void updateparamflags()
FLAG(obj2.fluxcorerr_prof) |= FLAG(obj2.magcorerr_prof);
FLAG(obj2.fluxcor_prof) |= FLAG(obj2.magcor_prof)
| FLAG(obj2.fluxcorerr_prof);
FLAG(obj2.fluxerr_prof) |= FLAG(obj2.magerr_prof)
| FLAG(obj2.prof_concentrationerr)
| FLAG(obj2.fluxcorerr_prof);
FLAG(obj2.flux_prof) |= FLAG(obj2.mag_prof)
| FLAG(obj2.fluxerr_prof)
| FLAG(obj2.fluxcor_prof);
FLAG(obj2.poserraw_prof) |= FLAG(obj2.poserrbw_prof);
FLAG(obj2.poserrcxxw_prof) |= FLAG(obj2.poserrcyyw_prof)
......@@ -240,21 +233,26 @@ void updateparamflags()
| FLAG(obj2.prof_class_star)
| FLAG(obj2.fluxcor_prof);
FLAG(obj2.prof_dirac_fluxratio) |= FLAG(obj2.prof_dirac_fluxratioerr);
FLAG(obj2.prof_dirac_mag) |= FLAG(obj2.prof_dirac_magerr);
FLAG(obj2.prof_spheroid_fluxratio) |= FLAG(obj2.prof_spheroid_fluxratioerr);
FLAG(obj2.prof_spheroid_mag) |= FLAG(obj2.prof_spheroid_magerr);
FLAG(obj2.prof_spheroid_reff) |= FLAG(obj2.prof_spheroid_refferr);
FLAG(obj2.prof_spheroid_aspect) |= FLAG(obj2.prof_spheroid_aspecterr);
FLAG(obj2.prof_spheroid_theta) |= FLAG(obj2.prof_spheroid_thetaerr);
FLAG(obj2.prof_spheroid_sersicn) |= FLAG(obj2.prof_spheroid_sersicnerr);
FLAG(obj2.prof_disk_fluxratio) |= FLAG(obj2.prof_disk_fluxratioerr);
FLAG(obj2.prof_disk_mag) |= FLAG(obj2.prof_disk_magerr);
FLAG(obj2.prof_disk_scale) |= FLAG(obj2.prof_disk_scaleerr);
FLAG(obj2.prof_disk_aspect) |= FLAG(obj2.prof_disk_aspecterr);
FLAG(obj2.prof_disk_inclination) |= FLAG(obj2.prof_disk_inclinationerr);
FLAG(obj2.prof_disk_theta) |= FLAG(obj2.prof_disk_thetaerr);
FLAG(obj2.prof_bar_fluxratio) |= FLAG(obj2.prof_bar_fluxratioerr);
FLAG(obj2.prof_bar_mag) |= FLAG(obj2.prof_bar_magerr);
FLAG(obj2.prof_bar_length) |= FLAG(obj2.prof_bar_lengtherr);
FLAG(obj2.prof_bar_aspect) |= FLAG(obj2.prof_bar_aspecterr);
FLAG(obj2.prof_bar_theta) |= FLAG(obj2.prof_bar_thetaerr);
FLAG(obj2.prof_arms_fluxratio) |= FLAG(obj2.prof_arms_fluxratioerr);
FLAG(obj2.prof_arms_mag) |= FLAG(obj2.prof_arms_magerr);
FLAG(obj2.prof_e1errw) |= FLAG(obj2.prof_e2errw) | FLAG(obj2.prof_e12corrw);
FLAG(obj2.prof_e1w) |= FLAG(obj2.prof_e2w) | FLAG(obj2.prof_e1errw);
......@@ -379,6 +377,7 @@ void updateparamflags()
FLAG(obj2.prof_arms_flux) |= FLAG(obj2.prof_arms_fluxerr)
| FLAG(obj2.prof_arms_mag)
| FLAG(obj2.prof_arms_fluxratio)
| FLAG(obj2.prof_arms_scalew)
| FLAG(obj2.prof_arms_scale)
| FLAG(obj2.prof_arms_posang)
......@@ -388,6 +387,7 @@ void updateparamflags()
FLAG(obj2.prof_bar_theta) |= FLAG(obj2.prof_bar_lengthw);
FLAG(obj2.prof_bar_flux) |= FLAG(obj2.prof_bar_fluxerr)
| FLAG(obj2.prof_bar_mag)
| FLAG(obj2.prof_bar_fluxratio)
| FLAG(obj2.prof_bar_lengthw)
| FLAG(obj2.prof_bar_length)
| FLAG(obj2.prof_bar_aspect)
......@@ -396,6 +396,7 @@ void updateparamflags()
| FLAG(obj2.prof_arms_flux);
FLAG(obj2.prof_disk_flux) |= FLAG(obj2.prof_disk_fluxerr)
| FLAG(obj2.prof_disk_mag)
| FLAG(obj2.prof_disk_fluxratio)
| FLAG(obj2.prof_disk_scalew)
| FLAG(obj2.prof_disk_scale)
| FLAG(obj2.prof_disk_aspect)
......@@ -405,6 +406,7 @@ void updateparamflags()
| FLAG(obj2.prof_bar_flux);
FLAG(obj2.prof_spheroid_flux) |= FLAG(obj2.prof_spheroid_fluxerr)
| FLAG(obj2.prof_spheroid_mag)
| FLAG(obj2.prof_spheroid_fluxratio)
| FLAG(obj2.prof_spheroid_reffw)
| FLAG(obj2.prof_spheroid_reff)
| FLAG(obj2.prof_spheroid_aspect)
......@@ -412,7 +414,8 @@ void updateparamflags()
| FLAG(obj2.prof_spheroid_sersicn)
| FLAG(obj2.prof_spheroid_peak);
FLAG(obj2.prof_dirac_flux) |= FLAG(obj2.prof_dirac_fluxerr)
| FLAG(obj2.prof_dirac_mag);
| FLAG(obj2.prof_dirac_mag)
| FLAG(obj2.prof_dirac_fluxratio);
FLAG(obj2.prof_offset_flux) |= FLAG(obj2.prof_offset_fluxerr);
FLAG(obj2.fluxerr_dprof) |= FLAG(obj2.magerr_dprof);
FLAG(obj2.flux_dprof) |= FLAG(obj2.mag_dprof)
......@@ -421,6 +424,19 @@ void updateparamflags()
| FLAG(obj2.dprof_flag)
| FLAG(obj2.dprof_niter)
| FLAG(obj2.flux_dprof);
FLAG(obj2.fluxerr_prof) |= FLAG(obj2.magerr_prof)
| FLAG(obj2.prof_concentrationerr)
| FLAG(obj2.fluxcorerr_prof)
| FLAG(obj2.prof_arms_fluxratio)
| FLAG(obj2.prof_bar_fluxratio)
| FLAG(obj2.prof_disk_fluxratio)
| FLAG(obj2.prof_spheroid_fluxratio)
| FLAG(obj2.prof_dirac_fluxratio);
FLAG(obj2.flux_prof) |= FLAG(obj2.mag_prof)
| FLAG(obj2.fluxerr_prof)
| FLAG(obj2.fluxcor_prof);
prefs.prof_flag |= FLAG(obj2.prof_chi2) | FLAG(obj2.prof_niter)
| FLAG(obj2.prof_vector) | FLAG(obj2.prof_errvector)
| FLAG(obj2.prof_errmatrix)
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 1993-2013 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: 26/02/2013
* Last modified: 05/07/2013
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -661,7 +661,7 @@ void reendcheck(picstruct *field, checkstruct *check)
{
case CHECK_MINIBACKGROUND:
case CHECK_MINIBACKRMS:
return;
break;
case CHECK_IDENTICAL:
case CHECK_BACKGROUND:
......@@ -671,7 +671,6 @@ void reendcheck(picstruct *field, checkstruct *check)
free(check->pix);
free(check->line);
check->line = NULL;
pad_tab(cat, check->npix*sizeof(PIXTYPE));
break;
case CHECK_OBJECTS:
......@@ -693,13 +692,11 @@ void reendcheck(picstruct *field, checkstruct *check)
case CHECK_OTHER:
write_body(cat->tab, check->pix, check->npix);
free(check->pix);
pad_tab(cat, check->npix*sizeof(PIXTYPE));
break;
case CHECK_SEGMENTATION:
write_ibody(cat->tab, check->pix, check->npix);
free(check->pix);
pad_tab(cat, check->npix*sizeof(FLAGTYPE));
break;
case CHECK_MASK:
......@@ -711,7 +708,6 @@ void reendcheck(picstruct *field, checkstruct *check)
writecheck(check, &PIX(field, 0, y), field->width);
free(check->line);
check->line = NULL;
pad_tab(cat, check->npix*sizeof(unsigned char));
break;
}
......@@ -724,7 +720,6 @@ void reendcheck(picstruct *field, checkstruct *check)
free(check->pix);
free(check->line);
check->line = NULL;
pad_tab(cat, check->npix*sizeof(PIXTYPE));
break;
}
......@@ -732,6 +727,8 @@ void reendcheck(picstruct *field, checkstruct *check)
error(EXIT_FAILURE, "*Internal Error* in ", "endcheck()!");
}
pad_tab(cat, check->npix*sizeof(PIXTYPE));
return;
}
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 2007-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 2007-2013 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: 08/11/2011
* Last modified: 05/07/2013
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -361,6 +361,12 @@
{"FLUXERR_POINTSOURCE", "RMS error on fitted point source total flux",
&outobj2.prof_dirac_fluxerr, H_FLOAT, T_FLOAT, "%12.7g", "count",
"stat.error;phot.count;stat.fit.param", "ct"},
{"FLUXRATIO_POINTSOURCE", "Point-source flux-to-total ratio from fitting",
&outobj2.prof_dirac_fluxratio, H_FLOAT, T_FLOAT, "%7.5f", "",
"phot.count;stat.fit.param;arith.ratio", ""},
{"FLUXRATIOERR_POINTSOURCE", "RMS error on point-source flux-to-total ratio",
&outobj2.prof_dirac_fluxratioerr, H_FLOAT, T_FLOAT, "%7.5f", "",
"stat.error;phot.count;stat.fit.param;arith.ratio", ""},
{"MAG_POINTSOURCE", "Point source total magnitude from fitting",
&outobj2.prof_dirac_mag, H_FLOAT, T_FLOAT, "%8.4f", "mag",
"phot.mag;stat.fit.param", "mag"},
......@@ -398,6 +404,12 @@
{"MU_MEAN_SPHEROID", "Mean effective spheroid surface brightness above background",
&outobj2.prof_spheroid_mumean, H_FLOAT, T_FLOAT, "%8.4f", "mag * arcsec**(-2)",
"phot.mag.sb;stat.mean;stat.fit.param", "mag.arcsec-2"},
{"FLUXRATIO_SPHEROID", "Spheroid flux-to-total ratio from fitting",
&outobj2.prof_spheroid_fluxratio, H_FLOAT, T_FLOAT, "%7.5f", "",
"phot.count;stat.fit.param;arith.ratio", ""},
{"FLUXRATIOERR_SPHEROID", "RMS error on spheroid flux-to-total ratio",
&outobj2.prof_spheroid_fluxratioerr, H_FLOAT, T_FLOAT, "%7.5f", "",
"stat.error;phot.count;stat.fit.param;arith.ratio", ""},
{"SPHEROID_REFF_IMAGE", "Spheroid effective radius from fitting",
&outobj2.prof_spheroid_reff, H_FLOAT, T_FLOAT, "%10.4f", "pixel",
"src.morph.scLength;stat.fit.param;instr.det", "pix"},
......@@ -480,6 +492,12 @@
{"MU_MEAN_DISK", "Mean effective disk surface brightness above background",
&outobj2.prof_disk_mumean, H_FLOAT, T_FLOAT, "%8.4f", "mag * arcsec**(-2)",
"phot.mag.sb;stat.mean;stat.fit.param", "mag.arcsec-2"},
{"FLUXRATIO_DISK", "Disk flux-to-total ratio from fitting",
&outobj2.prof_disk_fluxratio, H_FLOAT, T_FLOAT, "%7.5f", "",
"phot.count;stat.fit.param;arith.ratio", ""},
{"FLUXRATIOERR_DISK", "RMS error on disk flux-to-total ratio",
&outobj2.prof_disk_fluxratioerr, H_FLOAT, T_FLOAT, "%7.5f", "",
"stat.error;phot.count;stat.fit.param;arith.ratio", ""},
{"DISK_SCALE_IMAGE", "Disk scalelength from fitting",
&outobj2.prof_disk_scale, H_FLOAT, T_FLOAT, "%10.4f", "pixel",
"src.morph.scLength;stat.fit.param;instr.det", "pix"},
......@@ -560,6 +578,12 @@
{"MAGERR_BAR", "RMS error on fitted total bar magnitude",
&outobj2.prof_bar_magerr, H_FLOAT, T_FLOAT, "%8.4f", "mag",
"stat.error;phot.mag;stat.fit.param", "mag"},
{"FLUXRATIO_BAR", "Bar flux-to-total ratio from fitting",
&outobj2.prof_bar_fluxratio, H_FLOAT, T_FLOAT, "%7.5f", "",
"phot.count;stat.fit.param;arith.ratio", ""},
{"FLUXRATIOERR_BAR", "RMS error on bar flux-to-total ratio",
&outobj2.prof_bar_fluxratioerr, H_FLOAT, T_FLOAT, "%7.5f", "",
"stat.error;phot.count;stat.fit.param;arith.ratio", ""},
{"BAR_LENGTH_IMAGE", "Bar length from fitting",
&outobj2.prof_bar_length, H_FLOAT, T_FLOAT, "%10.4f", "pixel",
"src.morph.scLength;stat.fit.param;instr.det", "pix"},
......@@ -623,6 +647,12 @@
{"MAGERR_ARMS", "RMS error on fitted total magnitude in spiral arms",
&outobj2.prof_arms_magerr, H_FLOAT, T_FLOAT, "%8.4f", "mag",
"stat.error;phot.mag;stat.fit.param", "mag"},
{"FLUXRATIO_ARMS", "Arms flux-to-total ratio from fitting",
&outobj2.prof_arms_fluxratio, H_FLOAT, T_FLOAT, "%7.5f", "",
"phot.count;stat.fit.param;arith.ratio", ""},
{"FLUXRATIOERR_ARMS", "RMS error on arms flux-to-total ratio",
&outobj2.prof_arms_fluxratioerr, H_FLOAT, T_FLOAT, "%7.5f", "",
"stat.error;phot.count;stat.fit.param;arith.ratio", ""},
{"ARMS_SCALE_IMAGE", "Spiral arms scale length from fitting",
&outobj2.prof_arms_scale, H_FLOAT, T_FLOAT, "%10.4f", "pixel",
"src.morph.scLength;stat.fit.param;instr.det", "pix"},
......
......@@ -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: 10/06/2013
* Last modified: 05/07/2013
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -168,7 +168,7 @@ OUTPUT Pointer to an allocated fit structure (containing details about the
fit).
NOTES It is a modified version of the lm_minimize() of lmfit.
AUTHOR E. Bertin (IAP)
VERSION 10/06/2013
VERSION 05/07/2013
***/
void profit_fit(profitstruct *profit,
picstruct *field, picstruct *wfield,
......@@ -178,8 +178,9 @@ void profit_fit(profitstruct *profit,
patternstruct *pattern;
psfstruct *psf;
checkstruct *check;
double emx2,emy2,emxy, a , cp,sp, cn, bn, n,
sump,sumq, sumpw2,sumqw2,sumpqw, sump0,sumq0, err;
double emx2,emy2,emxy, a , cp,sp, cn, bn, n, rho,
sum, sump,sumq, sumpw2,sumqw2,sumpqw, sump0,sumq0,
fluxerr, err;
PIXTYPE valp,valq,sig2;
float param0[PARAM_NPARAM], param1[PARAM_NPARAM],
param[PARAM_NPARAM],
......@@ -187,7 +188,7 @@ void profit_fit(profitstruct *profit,
*cov,
psf_fwhm, dchi2, aspect, chi2;
int *index,
i,j,p, nparam, nparam2, ncomp, nprof;
c,i,j,p, nparam, nparam2, ncomp, nprof;
nparam = profit->nparam;
nparam2 = nparam*nparam;
......@@ -494,7 +495,7 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
obj2->flux_prof = profit->flux;
if (FLAG(obj2.fluxerr_prof))
{
err = 0.0;
fluxerr = 0.0;
cov = profit->covar;
index = profit->paramindex;
list = profit->paramlist;
......@@ -504,9 +505,9 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
cov = profit->covar + nparam*index[i];
for (j=0; j<PARAM_NPARAM; j++)
if (flux_flag[j] && list[j])
err += cov[index[j]];
fluxerr += cov[index[j]];
}
obj2->fluxerr_prof = err>0.0? sqrt(err): 0.0;
obj2->fluxerr_prof = fluxerr>0.0? sqrt(fluxerr): 0.0;
}
obj2->prof_chi2 = (profit->nresi > profit->nparam)?
......@@ -603,6 +604,23 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
obj2->prof_dirac_flux = *profit->paramlist[PARAM_DIRAC_FLUX];
obj2->prof_dirac_fluxerr =
profit->paramerr[profit->paramindex[PARAM_DIRAC_FLUX]];
if (FLAG(obj2.prof_dirac_fluxratio))
{
obj2->prof_dirac_fluxratio = (rho = obj2->flux_prof>(1.0/BIG)?
obj2->prof_dirac_flux / obj2->flux_prof
: 0.0);
index = profit->paramindex;
c = index[PARAM_DIRAC_FLUX];
list = profit->paramlist;
cov = profit->covar + c*nparam;
err = 0.0;
for (i=0; i<PARAM_NPARAM; i++)
if (flux_flag[i] && list[i])
err += cov[index[i]];
err = cov[c] + rho*rho*fluxerr - 2.0*rho*err;
obj2->prof_dirac_fluxratioerr = (err>(1.0/BIG) && profit->flux>(1.0/BIG))?
sqrt(err)/profit->flux : 0.0;
}
}
/* Spheroid */
......@@ -655,6 +673,24 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
if (FLAG(obj2.prof_spheroid_fluxmean))
obj2->prof_spheroid_fluxmean = obj2->prof_spheroid_peak * cn;
}
if (FLAG(obj2.prof_spheroid_fluxratio))
{
obj2->prof_spheroid_fluxratio = (rho = obj2->flux_prof>(1.0/BIG)?
obj2->prof_spheroid_flux / obj2->flux_prof
: 0.0);
index = profit->paramindex;
c = index[PARAM_SPHEROID_FLUX];
list = profit->paramlist;
cov = profit->covar + c*nparam;
err = 0.0;
for (i=0; i<PARAM_NPARAM; i++)
if (flux_flag[i] && list[i])
err += cov[index[i]];
err = cov[c] + rho*rho*fluxerr - 2.0*rho*err;
obj2->prof_spheroid_fluxratioerr
= (err>(1.0/BIG) && profit->flux>(1.0/BIG))?
sqrt(err)/profit->flux : 0.0;
}
}
/* Disk */
......@@ -705,6 +741,24 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
obj2->prof_disk_fluxmean = obj2->prof_disk_peak * 0.355007;/* b_n^(-2)*/
}
if (FLAG(obj2.prof_disk_fluxratio))
{
obj2->prof_disk_fluxratio = (rho = obj2->flux_prof>(1.0/BIG)?
obj2->prof_disk_flux / obj2->flux_prof
: 0.0);
index = profit->paramindex;
c = index[PARAM_DISK_FLUX];
list = profit->paramlist;
cov = profit->covar + c*nparam;
err = 0.0;
for (i=0; i<PARAM_NPARAM; i++)
if (flux_flag[i] && list[i])
err += cov[index[i]];
err = cov[c] + rho*rho*fluxerr - 2.0*rho*err;
obj2->prof_disk_fluxratioerr = (err>(1.0/BIG) && profit->flux>(1.0/BIG))?
sqrt(err)/profit->flux : 0.0;
}
/* Disk pattern */
if (prefs.pattern_flag)
{
......@@ -764,6 +818,23 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
+ obj2->prof_disk_theta);
obj2->prof_bar_thetaerr = obj2->prof_bar_posangerr*a/(cp*cp+a*a*sp*sp);
}
if (FLAG(obj2.prof_bar_fluxratio))
{
obj2->prof_bar_fluxratio = (rho = obj2->flux_prof>(1.0/BIG)?
obj2->prof_bar_flux / obj2->flux_prof
: 0.0);
index = profit->paramindex;
c = index[PARAM_BAR_FLUX];
list = profit->paramlist;
cov = profit->covar + c*nparam;
err = 0.0;
for (i=0; i<PARAM_NPARAM; i++)
if (flux_flag[i] && list[i])
err += cov[index[i]];
err = cov[c] + rho*rho*fluxerr - 2.0*rho*err;
obj2->prof_bar_fluxratioerr = (err>(1.0/BIG) && profit->flux>(1.0/BIG))?
sqrt(err)/profit->flux : 0.0;
}
/* Arms */
if (FLAG(obj2.prof_arms_flux))
......@@ -788,6 +859,24 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
fmod_m90_p90(*profit->paramlist[PARAM_ARMS_POSANG]);
obj2->prof_arms_posangerr =
profit->paramerr[profit->paramindex[PARAM_ARMS_POSANG]];
if (FLAG(obj2.prof_arms_fluxratio))
{
obj2->prof_arms_fluxratio = (rho = obj2->flux_prof>(1.0/BIG)?
obj2->prof_arms_flux / obj2->flux_prof
: 0.0);
index = profit->paramindex;
c = index[PARAM_ARMS_FLUX];
list = profit->paramlist;
cov = profit->covar + c*nparam;
err = 0.0;
for (i=0; i<PARAM_NPARAM; i++)
if (flux_flag[i] && list[i])
err += cov[index[i]];
err = cov[c] + rho*rho*fluxerr - 2.0*rho*err;
obj2->prof_arms_fluxratioerr
= (err>(1.0/BIG) && profit->flux>(1.0/BIG))?
sqrt(err)/profit->flux : 0.0;
}
}
}
}
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 1993-2013 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: 08/12/2011
* Last modified: 05/07/2013
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -409,6 +409,8 @@ typedef struct
float prof_offset_fluxerr; /* RMS error */
float prof_dirac_flux; /* Point source total flux */
float prof_dirac_fluxerr; /* RMS error */
float prof_dirac_fluxratio; /* Point source flux ratio */
float prof_dirac_fluxratioerr; /* RMS error */
float prof_dirac_mag; /* Point source "total" mag */
float prof_dirac_magerr; /* RMS error */
float prof_spheroid_flux; /* Spheroid total flux */
......@@ -421,6 +423,8 @@ typedef struct
float prof_spheroid_mumax; /* Spehroid peak surf. brigh.*/
float prof_spheroid_mueff; /* Spheroid effect. surf. bri.*/
float prof_spheroid_mumean; /* Spheroid mean eff. su. bri.*/
float prof_spheroid_fluxratio; /* Spheroid flux ratio */
float prof_spheroid_fluxratioerr; /* RMS error */
float prof_spheroid_reff; /* Spheroid effective radius */
float prof_spheroid_refferr; /* RMS error */
float prof_spheroid_reffw; /* WORLD spheroid eff. radius */
......@@ -448,6 +452,8 @@ typedef struct
float prof_disk_mumax; /* Disk peak surf. brightness */
float prof_disk_mueff; /* Disk effective surf. bri. */
float prof_disk_mumean; /* Disk mean eff. surf. bri. */
float prof_disk_fluxratio; /* Disk flux ratio */
float prof_disk_fluxratioerr; /* RMS error */
float prof_disk_scale; /* Disk scale length */
float prof_disk_scaleerr; /* RMS error */
float prof_disk_scalew; /* WORLD disk scale length */
......@@ -473,6 +479,8 @@ typedef struct
float prof_bar_fluxerr; /* RMS error */
float prof_bar_mag; /* Bar "total" magnitude */
float prof_bar_magerr; /* RMS error */
float prof_bar_fluxratio; /* Bar flux ratio */
float prof_bar_fluxratioerr; /* RMS error */
float prof_bar_length; /* Bar length */
float prof_bar_lengtherr; /* RMS error */
float prof_bar_lengthw; /* WORLD bar length */
......@@ -494,6 +502,8 @@ typedef struct
float prof_arms_fluxerr; /* RMS error */
float prof_arms_mag; /* Arms "total" magnitude */
float prof_arms_magerr; /* RMS error */
float prof_arms_fluxratio; /* Arms flux ratio */
float prof_arms_fluxratioerr; /* RMS error */
float prof_arms_scale; /* Arms scalelength */
float prof_arms_scaleerr; /* RMS error */
float prof_arms_scalew; /* WORLD arms scalelength */
......
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