Commit 779e15bc authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Activated support for priors in model fitting (currently only spheroid aspect ratio).

Restricted model rasters to 512 pixels.
Updated MKL autoconf M4 file.
Updated WCS library.
Pushed version number to 2.23.2.
Fixed dependency issue between PSFs and	some magnitude measurements (thanks to R.Gavazzi).
parent 39cde73a
......@@ -7,7 +7,7 @@ dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl
dnl This file part of: AstrOmatic software
dnl
dnl Copyright: (C) 2003-2013 Emmanuel Bertin -- IAP/CNRS/UPMC
dnl Copyright: (C) 2003-2016 IAP/CNRS/UPMC
dnl
dnl License: GNU General Public License
dnl
......@@ -23,7 +23,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with AstrOmatic software.
dnl If not, see <http://www.gnu.org/licenses/>.
dnl
dnl Last modified: 17/04/2013
dnl Last modified: 16/03/2016
dnl
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl
......@@ -97,7 +97,7 @@ dnl MacOSX
dnl INTEL compiler uses Intel64 architecture
if test x$2 = xyes; then
dnl 64 bit pointers
AC_SUBST(MKL_CFLAGS, "-openmp -DMKL_ILP64 -I$mklroot/include")
AC_SUBST(MKL_CFLAGS, "-qopenmp -DMKL_ILP64 -I$mklroot/include")
if test x$3 = xyes; then
dnl Static linking
AC_SUBST(MKL_LIBS, ["$mklroot/lib/libmkl_intel_ilp64.a \
......@@ -110,7 +110,7 @@ dnl Dynamic linking
fi
else
dnl 32 bit pointers
AC_SUBST(MKL_CFLAGS, "-openmp -I$mklroot/include")
AC_SUBST(MKL_CFLAGS, "-qopenmp -I$mklroot/include")
if test x$3 = xyes; then
dnl Static linking
AC_SUBST(MKL_LIBS, ["$mklroot/lib/libmkl_intel_lp64.a \
......@@ -124,7 +124,7 @@ dnl Dynamic linking
fi
else
dnl INTEL compiler uses IA32 architecture
AC_SUBST(MKL_CFLAGS, "-openmp -I$mklroot/include")
AC_SUBST(MKL_CFLAGS, "-qopenmp -I$mklroot/include")
if test x$3 = xyes; then
dnl Static linking
AC_SUBST(MKL_LIBS, ["$mklroot/lib/libmkl_intel.a \
......@@ -142,7 +142,7 @@ dnl Linux
dnl INTEL compiler uses Intel64 architecture
if test x$2 = xyes; then
dnl 64 bit pointers
AC_SUBST(MKL_CFLAGS, "-openmp -DMKL_ILP64 -I$mklroot/include")
AC_SUBST(MKL_CFLAGS, "-qopenmp -DMKL_ILP64 -I$mklroot/include")
if test x$3 = xyes; then
dnl Static linking
AC_SUBST(MKL_LIBS,
......@@ -156,7 +156,7 @@ dnl Dynamic linking
fi
else
dnl 32 bit pointers
AC_SUBST(MKL_CFLAGS, "-openmp -I$mklroot/include")
AC_SUBST(MKL_CFLAGS, "-qopenmp -I$mklroot/include")
if test x$3 = xyes; then
dnl Static linking
AC_SUBST(MKL_LIBS,
......@@ -171,7 +171,7 @@ dnl Dynamic linking
fi
else
dnl INTEL compiler uses IA32 architecture
AC_SUBST(MKL_CFLAGS, "-openmp -I$mklroot/include")
AC_SUBST(MKL_CFLAGS, "-qopenmp -I$mklroot/include")
if test x$3 = xyes; then
dnl Static linking
AC_SUBST(MKL_LIBS, ["$startgroup,$mklroot/lib/ia32/libmkl_intel.a,\
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sextractor 2.23.1.
# Generated by GNU Autoconf 2.69 for sextractor 2.23.2.
#
# Report bugs to <bertin@iap.fr>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.23.1'
PACKAGE_STRING='sextractor 2.23.1'
PACKAGE_VERSION='2.23.2'
PACKAGE_STRING='sextractor 2.23.2'
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.23.1 to adapt to many kinds of systems.
\`configure' configures sextractor 2.23.2 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.23.1:";;
short | recursive ) echo "Configuration of sextractor 2.23.2:";;
esac
cat <<\_ACEOF
......@@ -1548,7 +1548,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sextractor configure 2.23.1
sextractor configure 2.23.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1971,7 +1971,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.23.1, which was
It was created by sextractor $as_me 2.23.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2785,7 +2785,7 @@ fi
# Define the identity of the package.
PACKAGE='sextractor'
VERSION='2.23.1'
VERSION='2.23.2'
cat >>confdefs.h <<_ACEOF
......@@ -13390,7 +13390,7 @@ fi
if test x$flagosx = xyes; then
if test x$flag64 = xyes; then
if test x = xyes; then
MKL_CFLAGS="-openmp -DMKL_ILP64 -I$mklroot/include"
MKL_CFLAGS="-qopenmp -DMKL_ILP64 -I$mklroot/include"
if test x$enable_best_link = xyes; then
MKL_LIBS="$mklroot/lib/libmkl_intel_ilp64.a \
......@@ -13403,7 +13403,7 @@ if test x$flagosx = xyes; then
fi
else
MKL_CFLAGS="-openmp -I$mklroot/include"
MKL_CFLAGS="-qopenmp -I$mklroot/include"
if test x$enable_best_link = xyes; then
MKL_LIBS="$mklroot/lib/libmkl_intel_lp64.a \
......@@ -13417,7 +13417,7 @@ if test x$flagosx = xyes; then
fi
fi
else
MKL_CFLAGS="-openmp -I$mklroot/include"
MKL_CFLAGS="-qopenmp -I$mklroot/include"
if test x$enable_best_link = xyes; then
MKL_LIBS="$mklroot/lib/libmkl_intel.a \
......@@ -13433,7 +13433,7 @@ if test x$flagosx = xyes; then
else
if test x$flag64 = xyes; then
if test x = xyes; then
MKL_CFLAGS="-openmp -DMKL_ILP64 -I$mklroot/include"
MKL_CFLAGS="-qopenmp -DMKL_ILP64 -I$mklroot/include"
if test x$enable_best_link = xyes; then
MKL_LIBS="$startgroup,$mklroot/lib/intel64/libmkl_intel_ilp64.a,\
......@@ -13446,7 +13446,7 @@ $mklroot/lib/intel64/libmkl_core.a,-end-group -lpthread -lm"
fi
else
MKL_CFLAGS="-openmp -I$mklroot/include"
MKL_CFLAGS="-qopenmp -I$mklroot/include"
if test x$enable_best_link = xyes; then
MKL_LIBS="$startgroup,$mklroot/lib/intel64/libmkl_intel_lp64.a,\
......@@ -13460,7 +13460,7 @@ $mklroot/lib/intel64/libmkl_core.a,--end-group -lpthread -lm"
fi
fi
else
MKL_CFLAGS="-openmp -I$mklroot/include"
MKL_CFLAGS="-qopenmp -I$mklroot/include"
if test x$enable_best_link = xyes; then
MKL_LIBS="$startgroup,$mklroot/lib/ia32/libmkl_intel.a,\
......@@ -15218,7 +15218,7 @@ fi
# "Best" linking option
if test x$enable_best_link = xyes; then
if test x$enable_icc = xyes; then
AM_LDFLAGS="-static-intel -openmp-link static -shared-libgcc \
AM_LDFLAGS="-static-intel -qopenmp-link static -shared-libgcc \
-static-libtool-libs -no-intel-extensions -avoid-version $AM_LDFLAGS"
else
AM_LDFLAGS="-shared-libgcc -static-libtool-libs -avoid-version $AM_LDFLAGS"
......@@ -15697,7 +15697,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.23.1, which was
This file was extended by sextractor $as_me 2.23.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -15763,7 +15763,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.23.1
sextractor config.status 2.23.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -7,7 +7,7 @@
#
# This file part of: SExtractor
#
# Copyright: (C) 2002-2016 Emmanuel Bertin -- IAP/CNRS/UPMC
# Copyright: (C) 2002-2016 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/03/2016
# Last modified: 16/03/2016
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
# This is your standard Bertin source code...
AC_INIT(sextractor, 2.23.1, [bertin@iap.fr])
AC_INIT(sextractor, 2.23.2, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADERS(config.h)
......@@ -267,7 +267,7 @@ fi
# "Best" linking option
if test x$enable_best_link = xyes; then
if test x$enable_icc = xyes; then
AM_LDFLAGS="-static-intel -openmp-link static -shared-libgcc \
AM_LDFLAGS="-static-intel -qopenmp-link static -shared-libgcc \
-static-libtool-libs -no-intel-extensions -avoid-version $AM_LDFLAGS"
else
AM_LDFLAGS="-shared-libgcc -static-libtool-libs -avoid-version $AM_LDFLAGS"
......
.TH SEXTRACTOR "1" "March 2016" "SExtractor 2.23.1" "User Commands"
.TH SEXTRACTOR "1" "July 2016" "SExtractor 2.23.2" "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-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 1993-2016 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: 02/12/2015
* Last modified: 16/11/2016
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -728,7 +728,7 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
}
/*----- Pre-compute mags in case they are needed for PSF dependency */
if ((prefs.psffit_flag || prefs.prof_flag) && thepsf->mag_flag)
if (prefs.psffit_flag || prefs.prof_flag)
computemags(field, obj);
/*------------------------------- PSF fitting ------------------------------*/
......
......@@ -2163,6 +2163,27 @@ double fmod_m90_p90(double angle)
}
/********************************* fmod_0_pmod *******************************/
/*
Fold input angle in the [0,+mod[ domain.
*/
double fmod_0_pmod(double angle, double mod)
{
return angle>0.0? fmod(angle,mod) : fmod(angle,mod)+mod;
}
/******************************* fmod_mmod_pmod ******************************/
/*
Fold input angle in the [-mod,+mod[ domain.
*/
double fmod_mmod_pmod(double angle, double mod)
{
return angle>0.0? fmod(angle+mod,2.0*mod)-mod : fmod(angle-mod,2.0*mod)+mod;
}
/********************************* fcmp_0_p360 *******************************/
/*
Compare angles in the [0,+360[ domain: return 1 if anglep>anglem, 0 otherwise.
......
......@@ -119,7 +119,9 @@ extern wcsstruct *create_wcs(char **ctype, double *crval, double *crpix,
*read_wcs(tabstruct *tab);
extern double fmod_0_p360(double angle),
fmod_0_pmod(double angle, double mod),
fmod_m90_p90(double angle),
fmod_mmod_pmod(double angle, double mod),
sextodegal(char *hms),
sextodegde(char *dms),
wcs_dist(wcsstruct *wcs,
......
......@@ -235,7 +235,7 @@ typedef struct
int prof_flag; /* Profile-fitting */
int dprof_flag; /* Det. Prof.-fitting */
int pattern_flag; /* Pattern-fitting */
/*----- Profile-fitting */
/*----- Model-fitting */
int prof_vectorsize; /* nb of params */
int prof_errvectorsize; /* nb of params */
int prof_errmatrixsize[2]; /* nb of params */
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 2006-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 2006-2016 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: 25/09/2015
* Last modified: 16/03/2016
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -1980,12 +1980,11 @@ float *profit_compresi(profitstruct *profit, float dynparam, float *resi)
/****** profit_resample ******************************************************
PROTO int prof_resample(profitstruct *profit, float *inpix,
PROTO int profit_resample(profitstruct *profit, float *inpix,
PIXTYPE *outpix, float factor)
PURPOSE Resample the current full resolution model to image resolution.
INPUT Profile-fitting structure,
pointer to input raster,
pointer to differential geometry raster (or NULL if absent),
pointer to output raster,
multiplicating factor.
OUTPUT RETURN_ERROR if the rasters don't overlap, RETURN_OK otherwise.
......@@ -3187,7 +3186,7 @@ INPUT Pointer to the profit structure,
OUTPUT .
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 25/09/2015
VERSION 16/03/2016
***/
void profit_resetparam(profitstruct *profit, paramenum paramtype)
{
......@@ -3249,7 +3248,7 @@ void profit_resetparam(profitstruct *profit, paramenum paramtype)
parammin = FLAG(obj2.prof_disk_flux)? 0.5 : 0.01;
parammax = FLAG(obj2.prof_disk_flux)? 2.0 : 100.0;
priorcen = 0.0;
priorsig = 1.0 /*0.4*/;
priorsig = 1.0;
break;
case PARAM_SPHEROID_POSANG:
fittype = PARFIT_UNBOUND;
......@@ -3262,8 +3261,6 @@ void profit_resetparam(profitstruct *profit, paramenum paramtype)
param = 4.0;
parammin = FLAG(obj2.prof_disk_flux)? 1.0 : 0.3;
parammax = 10.0;
priorcen = 1.0;
priorsig = 0.0 /*2.0*/;
break;
case PARAM_DISK_FLUX:
fittype = PARFIT_LOGBOUND;
......@@ -3423,16 +3420,23 @@ INPUT Pointer to the profit structure.
OUTPUT -.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 18/09/2008
VERSION 18/03/2014
***/
void profit_resetparams(profitstruct *profit)
{
int p;
int p, npresi;
for (p=0; p<PARAM_NPARAM; p++)
profit_resetparam(profit, (paramenum)p);
npresi = 0;
for (p=0; p<profit->nparam; p++)
if (profit->dparampsig[p]>0.0)
npresi++;
profit->npresi = npresi;
return;
}
......@@ -3472,7 +3476,9 @@ int profit_setparam(profitstruct *profit, paramenum paramtype,
profit->parammin[index] = parammin;
profit->parammax[index] = parammax;
profit->parfittype[index] = parfittype;
profit_boundtounbound(profit, &priorcen, &profit->dparampcen[index], index);
// Does not make much sense to express Gaussian prior center in model space
// profit_boundtounbound(profit, &priorcen, &profit->dparampcen[index], index);
profit->dparampcen[index] = priorcen;
profit->dparampsig[index] = priorsig;
return RETURN_OK;
}
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 2006-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 2006-2016 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: 17/02/2015
* Last modified: 16/03/2016
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -73,9 +73,9 @@
#define PROFIT_MAXR2MAX 1e6 /* Maximum r2_max for truncating profiles */
#define PROFIT_DYNPARAM 10.0 /* Dynamic compression param. in sigma units */
#define PROFIT_SMOOTHR 4.0 /* Profile smoothing radius (pixels) */
#define PROFIT_MAXMODSIZE 8192 /* Maximum size allowed for the model raster */
#define PROFIT_MAXMODSIZE 512 /* Maximum size allowed for the model raster */
#define PROFIT_MAXSMODSIZE 64 /* Number of model planes */
#define PROFIT_MAXOBJSIZE 8192 /* Maximum size allowed for the object raster */
#define PROFIT_MAXOBJSIZE 512 /* Maximum size allowed for the object raster */
#define PROFIT_BARXFADE 0.1 /* Fract. of bar length crossfaded with arms */
#define PROFIT_MAXEXTRA 2 /* Max. nb of extra free params of profiles */
#define INTERP_MAXKERNELWIDTH 8 /* Max. range of kernel (pixels) */
......
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