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

Fixed PCi_j WCS keyword parsing issue (thanks to O.Fors for reporting this issue).

Fixed issue with magnitudes when used as PSF model parameters (thanks to A.Donnarumma for reporting this issue).
Added ID_PARENT catalog parameter to identify the common parent of deblended sources (thanks to R.McMahon for the suggestion).
Introduced regularization of Sersic model ellipticities based on AMALGAm prescriptions for the Great3 challenge (see Mandelbaum et al. 2015).
Fixed error in ecliptic coordinate computations (thanks to H.Bouy for reporting this issue).
Added support for differential geometry maps, with new DGEO_TYPE and DGEO_IMAGE configuration keywords and new DGEOX/Y_IMAGE and DGEOX/YWIN_IMAGE measurement parameters.
Added differential geometry map correction to model-fitting.
Added VIGNET_DGEOX and VIGNET_DGEOY differential geometry map cutouts in catalogs (for use in PSFEx).
Added support for PSF model dependencies in ASSOC vectors.
Fixed issue with single-line background meshes.
Fixed positional offsets of large galaxy models on MODELS and -MODELS check-images.
Pushed version number to 2.23.1.
parent eedbf805
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sextractor 2.19.5. # Generated by GNU Autoconf 2.69 for sextractor 2.23.1.
# #
# Report bugs to <bertin@iap.fr>. # Report bugs to <bertin@iap.fr>.
# #
...@@ -590,8 +590,8 @@ MAKEFLAGS= ...@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='sextractor' PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor' PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.19.5' PACKAGE_VERSION='2.23.1'
PACKAGE_STRING='sextractor 2.19.5' PACKAGE_STRING='sextractor 2.23.1'
PACKAGE_BUGREPORT='bertin@iap.fr' PACKAGE_BUGREPORT='bertin@iap.fr'
PACKAGE_URL='' PACKAGE_URL=''
...@@ -1345,7 +1345,7 @@ if test "$ac_init_help" = "long"; then ...@@ -1345,7 +1345,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures sextractor 2.19.5 to adapt to many kinds of systems. \`configure' configures sextractor 2.23.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1415,7 +1415,7 @@ fi ...@@ -1415,7 +1415,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of sextractor 2.19.5:";; short | recursive ) echo "Configuration of sextractor 2.23.1:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1548,7 +1548,7 @@ fi ...@@ -1548,7 +1548,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
sextractor configure 2.19.5 sextractor configure 2.23.1
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
...@@ -1971,7 +1971,7 @@ cat >config.log <<_ACEOF ...@@ -1971,7 +1971,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by sextractor $as_me 2.19.5, which was It was created by sextractor $as_me 2.23.1, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -2785,7 +2785,7 @@ fi ...@@ -2785,7 +2785,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='sextractor' PACKAGE='sextractor'
VERSION='2.19.5' VERSION='2.23.1'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -15697,7 +15697,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ...@@ -15697,7 +15697,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by sextractor $as_me 2.19.5, which was This file was extended by sextractor $as_me 2.23.1, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -15763,7 +15763,7 @@ _ACEOF ...@@ -15763,7 +15763,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
sextractor config.status 2.19.5 sextractor config.status 2.23.1
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# This file part of: SExtractor # This file part of: SExtractor
# #
# Copyright: (C) 2002-2013 Emmanuel Bertin -- IAP/CNRS/UPMC # Copyright: (C) 2002-2016 Emmanuel Bertin -- IAP/CNRS/UPMC
# #
# License: GNU General Public License # License: GNU General Public License
# #
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>. # along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
# #
# Last modified: 14/12/2013 # Last modified: 08/03/2016
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],) ...@@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],) define([AC_CACHE_SAVE],)
# This is your standard Bertin source code... # This is your standard Bertin source code...
AC_INIT(sextractor, 2.19.5, [bertin@iap.fr]) AC_INIT(sextractor, 2.23.1, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c) AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf) AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADERS(config.h) AC_CONFIG_HEADERS(config.h)
......
.TH SEXTRACTOR "1" "December 2013" "SExtractor 2.19.5" "User Commands" .TH SEXTRACTOR "1" "March 2016" "SExtractor 2.23.1" "User Commands"
.SH NAME .SH NAME
sex \- extract a source catalogue from an astronomical FITS image sex \- extract a source catalogue from an astronomical FITS image
.SH SYNOPSIS .SH SYNOPSIS
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# This file part of: SExtractor # This file part of: SExtractor
# #
# Copyright: (C) 2002-2013 Emmanuel Bertin -- IAP/CNRS/UPMC # Copyright: (C) 2002-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
# #
# License: GNU General Public License # License: GNU General Public License
# #
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>. # along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
# #
# Last modified: 03/04/2013 # Last modified: 02/12/2015
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -37,16 +37,16 @@ SUBDIRS = fits $(LEVDIR) wcs ...@@ -37,16 +37,16 @@ SUBDIRS = fits $(LEVDIR) wcs
bin_PROGRAMS = sex ldactoasc bin_PROGRAMS = sex ldactoasc
check_PROGRAMS = sex check_PROGRAMS = sex
sex_SOURCES = analyse.c assoc.c astrom.c back.c bpro.c catout.c \ sex_SOURCES = analyse.c assoc.c astrom.c back.c bpro.c catout.c \
check.c clean.c extract.c $(FFTSOURCE) field.c \ check.c clean.c dgeo.c extract.c $(FFTSOURCE) \
filter.c fitswcs.c flag.c graph.c growth.c header.c \ field.c filter.c fitswcs.c flag.c graph.c growth.c \
image.c interpolate.c main.c makeit.c manobjlist.c \ header.c image.c interpolate.c main.c makeit.c \
misc.c neurro.c $(PATTERNSOURCE) pc.c photom.c \ manobjlist.c misc.c neurro.c $(PATTERNSOURCE) pc.c \
plist.c prefs.c $(PROFITSOURCE) psf.c readimage.c \ photom.c plist.c prefs.c $(PROFITSOURCE) psf.c \
refine.c retina.c scan.c som.c weight.c winpos.c \ readimage.c refine.c retina.c scan.c som.c weight.c \
xml.c \ winpos.c xml.c \
assoc.h astrom.h back.h bpro.h check.h clean.h \ assoc.h astrom.h back.h bpro.h check.h clean.h \
define.h extract.h fft.h field.h filter.h fitswcs.h \ define.h dgeo.h extract.h fft.h field.h filter.h \
flag.h globals.h growth.h header.h image.h \ fitswcs.h flag.h globals.h growth.h header.h image.h \
interpolate.h key.h neurro.h param.h paramprofit.h \ interpolate.h key.h neurro.h param.h paramprofit.h \
pattern.h photom.h plist.h prefs.h preflist.h \ pattern.h photom.h plist.h prefs.h preflist.h \
profit.h psf.h retina.h sexhead1.h sexhead.h \ profit.h psf.h retina.h sexhead1.h sexhead.h \
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# #
# This file part of: SExtractor # This file part of: SExtractor
# #
# Copyright: (C) 2002-2013 Emmanuel Bertin -- IAP/CNRS/UPMC # Copyright: (C) 2002-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
# #
# License: GNU General Public License # License: GNU General Public License
# #
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>. # along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
# #
# Last modified: 03/04/2013 # Last modified: 02/12/2015
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -103,32 +103,34 @@ am_ldactoasc_OBJECTS = ldactoasc.$(OBJEXT) ...@@ -103,32 +103,34 @@ am_ldactoasc_OBJECTS = ldactoasc.$(OBJEXT)
ldactoasc_OBJECTS = $(am_ldactoasc_OBJECTS) ldactoasc_OBJECTS = $(am_ldactoasc_OBJECTS)
ldactoasc_DEPENDENCIES = $(srcdir)/fits/libfits.a ldactoasc_DEPENDENCIES = $(srcdir)/fits/libfits.a
am__sex_SOURCES_DIST = analyse.c assoc.c astrom.c back.c bpro.c \ am__sex_SOURCES_DIST = analyse.c assoc.c astrom.c back.c bpro.c \
catout.c check.c clean.c extract.c fft.c field.c filter.c \ catout.c check.c clean.c dgeo.c extract.c fft.c field.c \
fitswcs.c flag.c graph.c growth.c header.c image.c \ filter.c fitswcs.c flag.c graph.c growth.c header.c image.c \
interpolate.c main.c makeit.c manobjlist.c misc.c neurro.c \ interpolate.c main.c makeit.c manobjlist.c misc.c neurro.c \
pattern.c pc.c photom.c plist.c prefs.c profit.c psf.c \ pattern.c pc.c photom.c plist.c prefs.c profit.c psf.c \
readimage.c refine.c retina.c scan.c som.c weight.c winpos.c \ readimage.c refine.c retina.c scan.c som.c weight.c winpos.c \
xml.c assoc.h astrom.h back.h bpro.h check.h clean.h define.h \ xml.c assoc.h astrom.h back.h bpro.h check.h clean.h define.h \
extract.h fft.h field.h filter.h fitswcs.h flag.h globals.h \ dgeo.h extract.h fft.h field.h filter.h fitswcs.h flag.h \
growth.h header.h image.h interpolate.h key.h neurro.h param.h \ globals.h growth.h header.h image.h interpolate.h key.h \
paramprofit.h pattern.h photom.h plist.h prefs.h preflist.h \ neurro.h param.h paramprofit.h pattern.h photom.h plist.h \
profit.h psf.h retina.h sexhead1.h sexhead.h sexheadsc.h som.h \ prefs.h preflist.h profit.h psf.h retina.h sexhead1.h \
threads.h types.h wcscelsys.h weight.h winpos.h xml.h sexhead.h sexheadsc.h som.h threads.h types.h wcscelsys.h \
weight.h winpos.h xml.h
@USE_MODEL_TRUE@am__objects_1 = fft.$(OBJEXT) @USE_MODEL_TRUE@am__objects_1 = fft.$(OBJEXT)
@USE_MODEL_TRUE@am__objects_2 = pattern.$(OBJEXT) @USE_MODEL_TRUE@am__objects_2 = pattern.$(OBJEXT)
@USE_MODEL_TRUE@am__objects_3 = profit.$(OBJEXT) @USE_MODEL_TRUE@am__objects_3 = profit.$(OBJEXT)
am_sex_OBJECTS = analyse.$(OBJEXT) assoc.$(OBJEXT) astrom.$(OBJEXT) \ am_sex_OBJECTS = analyse.$(OBJEXT) assoc.$(OBJEXT) astrom.$(OBJEXT) \
back.$(OBJEXT) bpro.$(OBJEXT) catout.$(OBJEXT) check.$(OBJEXT) \ back.$(OBJEXT) bpro.$(OBJEXT) catout.$(OBJEXT) check.$(OBJEXT) \
clean.$(OBJEXT) extract.$(OBJEXT) $(am__objects_1) \ clean.$(OBJEXT) dgeo.$(OBJEXT) extract.$(OBJEXT) \
field.$(OBJEXT) filter.$(OBJEXT) fitswcs.$(OBJEXT) \ $(am__objects_1) field.$(OBJEXT) filter.$(OBJEXT) \
flag.$(OBJEXT) graph.$(OBJEXT) growth.$(OBJEXT) \ fitswcs.$(OBJEXT) flag.$(OBJEXT) graph.$(OBJEXT) \
header.$(OBJEXT) image.$(OBJEXT) interpolate.$(OBJEXT) \ growth.$(OBJEXT) header.$(OBJEXT) image.$(OBJEXT) \
main.$(OBJEXT) makeit.$(OBJEXT) manobjlist.$(OBJEXT) \ interpolate.$(OBJEXT) main.$(OBJEXT) makeit.$(OBJEXT) \
misc.$(OBJEXT) neurro.$(OBJEXT) $(am__objects_2) pc.$(OBJEXT) \ manobjlist.$(OBJEXT) misc.$(OBJEXT) neurro.$(OBJEXT) \
photom.$(OBJEXT) plist.$(OBJEXT) prefs.$(OBJEXT) \ $(am__objects_2) pc.$(OBJEXT) photom.$(OBJEXT) plist.$(OBJEXT) \
$(am__objects_3) psf.$(OBJEXT) readimage.$(OBJEXT) \ prefs.$(OBJEXT) $(am__objects_3) psf.$(OBJEXT) \
refine.$(OBJEXT) retina.$(OBJEXT) scan.$(OBJEXT) som.$(OBJEXT) \ readimage.$(OBJEXT) refine.$(OBJEXT) retina.$(OBJEXT) \
weight.$(OBJEXT) winpos.$(OBJEXT) xml.$(OBJEXT) scan.$(OBJEXT) som.$(OBJEXT) weight.$(OBJEXT) winpos.$(OBJEXT) \
xml.$(OBJEXT)
sex_OBJECTS = $(am_sex_OBJECTS) sex_OBJECTS = $(am_sex_OBJECTS)
sex_DEPENDENCIES = $(srcdir)/fits/libfits.a $(srcdir)/wcs/libwcs_c.a \ sex_DEPENDENCIES = $(srcdir)/fits/libfits.a $(srcdir)/wcs/libwcs_c.a \
$(LEVLIB) $(LEVLIB)
...@@ -334,16 +336,16 @@ top_srcdir = @top_srcdir@ ...@@ -334,16 +336,16 @@ top_srcdir = @top_srcdir@
@USE_MODEL_TRUE@LEVDIR = levmar @USE_MODEL_TRUE@LEVDIR = levmar
SUBDIRS = fits $(LEVDIR) wcs SUBDIRS = fits $(LEVDIR) wcs
sex_SOURCES = analyse.c assoc.c astrom.c back.c bpro.c catout.c \ sex_SOURCES = analyse.c assoc.c astrom.c back.c bpro.c catout.c \
check.c clean.c extract.c $(FFTSOURCE) field.c \ check.c clean.c dgeo.c extract.c $(FFTSOURCE) \
filter.c fitswcs.c flag.c graph.c growth.c header.c \ field.c filter.c fitswcs.c flag.c graph.c growth.c \
image.c interpolate.c main.c makeit.c manobjlist.c \ header.c image.c interpolate.c main.c makeit.c \
misc.c neurro.c $(PATTERNSOURCE) pc.c photom.c \ manobjlist.c misc.c neurro.c $(PATTERNSOURCE) pc.c \
plist.c prefs.c $(PROFITSOURCE) psf.c readimage.c \ photom.c plist.c prefs.c $(PROFITSOURCE) psf.c \
refine.c retina.c scan.c som.c weight.c winpos.c \ readimage.c refine.c retina.c scan.c som.c weight.c \
xml.c \ winpos.c xml.c \
assoc.h astrom.h back.h bpro.h check.h clean.h \ assoc.h astrom.h back.h bpro.h check.h clean.h \
define.h extract.h fft.h field.h filter.h fitswcs.h \ define.h dgeo.h extract.h fft.h field.h filter.h \
flag.h globals.h growth.h header.h image.h \ fitswcs.h flag.h globals.h growth.h header.h image.h \
interpolate.h key.h neurro.h param.h paramprofit.h \ interpolate.h key.h neurro.h param.h paramprofit.h \
pattern.h photom.h plist.h prefs.h preflist.h \ pattern.h photom.h plist.h prefs.h preflist.h \
profit.h psf.h retina.h sexhead1.h sexhead.h \ profit.h psf.h retina.h sexhead1.h sexhead.h \
...@@ -467,6 +469,7 @@ distclean-compile: ...@@ -467,6 +469,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catout.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clean.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clean.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgeo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 12/09/2013 * Last modified: 02/12/2015
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -36,10 +36,12 @@ ...@@ -36,10 +36,12 @@
#include <string.h> #include <string.h>
#include "define.h" #include "define.h"
#include "key.h"
#include "globals.h" #include "globals.h"
#include "prefs.h" #include "prefs.h"
#include "fits/fitscat.h" #include "fits/fitscat.h"
#include "back.h" #include "back.h"
#include "dgeo.h"
#include "check.h" #include "check.h"
#include "assoc.h" #include "assoc.h"
#include "astrom.h" #include "astrom.h"
...@@ -209,6 +211,10 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj, ...@@ -209,6 +211,10 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj,
err += cdpix/gain; err += cdpix/gain;
x = PLIST(pixt,x) - xm; x = PLIST(pixt,x) - xm;
y = PLIST(pixt,y) - ym; y = PLIST(pixt,y) - ym;
if PLISTEXIST(dgeo) {
x -= PLISTPIX(pixt, dgeox);
y -= PLISTPIX(pixt, dgeoy);
}
esum += err; esum += err;
emx2 += err*x*x; emx2 += err*x*x;
emy2 += err*y*y; emy2 += err*y*y;
...@@ -274,7 +280,8 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj, ...@@ -274,7 +280,8 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj,
emy2 /= flux2; /* variance of ym */ emy2 /= flux2; /* variance of ym */
emxy /= flux2; /* covariance */ emxy /= flux2; /* covariance */
/*-- Handle fully correlated profiles (which cause a singularity...) */ /*-- Handle fully correlated profile
s (which cause a singularity...) */
esum *= 0.08333/flux2; esum *= 0.08333/flux2;
if (obj->singuflag && (emx2*emy2-emxy*emxy) < esum*esum) if (obj->singuflag && (emx2*emy2-emxy*emxy) < esum*esum)
{ {
...@@ -369,6 +376,10 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj, ...@@ -369,6 +376,10 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj,
{ {
dx = PLIST(pixt,x) - mx; dx = PLIST(pixt,x) - mx;
dy = PLIST(pixt,y) - my; dy = PLIST(pixt,y) - my;
if PLISTEXIST(dgeo) {
dx -= PLISTPIX(pixt, dgeox);
dy -= PLISTPIX(pixt, dgeoy);
}
lpix = log(pix); lpix = log(pix);
inverr2 = pix*pix; inverr2 = pix*pix;
s += inverr2; s += inverr2;
...@@ -406,7 +417,8 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj, ...@@ -406,7 +417,8 @@ void examineiso(picstruct *field, picstruct *dfield, objstruct *obj,
Final processing of object data, just before saving it to the catalog. Final processing of object data, just before saving it to the catalog.
*/ */
void endobject(picstruct *field, picstruct *dfield, picstruct *wfield, void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
picstruct *dwfield, int n, objliststruct *objlist) picstruct *dwfield, picstruct *dgeofield,
int n, objliststruct *objlist)
{ {
objstruct *obj; objstruct *obj;
checkstruct *check; checkstruct *check;
...@@ -432,6 +444,8 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield, ...@@ -432,6 +444,8 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
/* Source position */ /* Source position */
obj2->sposx = (float)(obj2->posx = obj->mx+1.0); /* That's standard FITS */ obj2->sposx = (float)(obj2->posx = obj->mx+1.0); /* That's standard FITS */
obj2->sposy = (float)(obj2->posy = obj->my+1.0); obj2->sposy = (float)(obj2->posy = obj->my+1.0);
obj2->pos_dgeox = obj->dmx;
obj2->pos_dgeoy = obj->dmy;
/* Integer coordinates */ /* Integer coordinates */
ix=(int)(obj->mx+0.49999); ix=(int)(obj->mx+0.49999);
...@@ -567,7 +581,7 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield, ...@@ -567,7 +581,7 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
/*--------------------------- Windowed barycenter --------------------------*/ /*--------------------------- Windowed barycenter --------------------------*/
if (FLAG(obj2.winpos_x)) if (FLAG(obj2.winpos_x))
{ {
compute_winpos(field, wfield, obj); compute_winpos(field, wfield, dgeofield, obj);
/*---- Express positions in FOCAL or WORLD coordinates */ /*---- Express positions in FOCAL or WORLD coordinates */
if (FLAG(obj2.winpos_xf) || FLAG(obj2.winpos_xw)) if (FLAG(obj2.winpos_xf) || FLAG(obj2.winpos_xw))
astrom_winpos(field, obj); astrom_winpos(field, obj);
...@@ -697,7 +711,28 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield, ...@@ -697,7 +711,28 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
copyimage_center(field, outobj2.vigshift, prefs.vigshiftsize[0], copyimage_center(field, outobj2.vigshift, prefs.vigshiftsize[0],
prefs.vigshiftsize[1], obj->mx, obj->my); prefs.vigshiftsize[1], obj->mx, obj->my);
if (dgeofield) {
if (FLAG(obj2.vignet_dgeox) && FLAG(obj2.vignet_dgeoy)
&& prefs.vignet_dgeoxsize[0] == prefs.vignet_dgeoysize[0]
&& prefs.vignet_dgeoxsize[1] == prefs.vignet_dgeoysize[1])
dgeo_copy(dgeofield, outobj2.vignet_dgeox , outobj2.vignet_dgeoy,
prefs.vignet_dgeoxsize[0],prefs.vignet_dgeoxsize[1], ix,iy);
else {
if (FLAG(obj2.vignet_dgeox))
dgeo_copy(dgeofield, outobj2.vignet_dgeox, NULL,
prefs.vignet_dgeoxsize[0],prefs.vignet_dgeoxsize[1], ix,iy);
if (FLAG(obj2.vignet_dgeoy))
dgeo_copy(dgeofield, NULL, outobj2.vignet_dgeoy,
prefs.vignet_dgeoysize[0],prefs.vignet_dgeoysize[1], ix,iy);
}
}
/*----- Pre-compute mags in case they are needed for PSF dependency */
if ((prefs.psffit_flag || prefs.prof_flag) && thepsf->mag_flag)
computemags(field, obj);
/*------------------------------- PSF fitting ------------------------------*/ /*------------------------------- PSF fitting ------------------------------*/
nsub = 1; nsub = 1;
if (prefs.psffit_flag) if (prefs.psffit_flag)
{ {
...@@ -715,7 +750,7 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield, ...@@ -715,7 +750,7 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
#ifdef USE_MODEL #ifdef USE_MODEL
if (prefs.prof_flag) if (prefs.prof_flag)
{ {
profit_fit(theprofit, field, wfield, obj, obj2); profit_fit(theprofit, field, wfield, dgeofield, obj, obj2);
/*---- Express positions in FOCAL or WORLD coordinates */ /*---- Express positions in FOCAL or WORLD coordinates */
if (FLAG(obj2.xf_prof) || FLAG(obj2.xw_prof)) if (FLAG(obj2.xf_prof) || FLAG(obj2.xw_prof))
astrom_profpos(field, obj); astrom_profpos(field, obj);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2014 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 23/03/2011 * Last modified: 17/06/2014
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -1125,6 +1125,14 @@ void subbackline(picstruct *field, int y, PIXTYPE *line) ...@@ -1125,6 +1125,14 @@ void subbackline(picstruct *field, int y, PIXTYPE *line)
if (nbx>1) if (nbx>1)
{ {
nx = field->backw; nx = field->backw;
if (nx==1) /* special handling of 1-pixel mesh sizes */
{
blo = node;
for (j=width; j--;)
*(line++) -= (*(backline++) = (PIXTYPE)*(blo++));
}
else
{
xstep = 1.0/nx; xstep = 1.0/nx;
changepoint = nx/2; changepoint = nx/2;
dx = (xstep - 1)/2; /* dx of the first pixel in the row */ dx = (xstep - 1)/2; /* dx of the first pixel in the row */
...@@ -1153,6 +1161,7 @@ void subbackline(picstruct *field, int y, PIXTYPE *line) ...@@ -1153,6 +1161,7 @@ void subbackline(picstruct *field, int y, PIXTYPE *line)
} }
} }
} }
}
else else
for (j=width; j--;) for (j=width; j--;)
*(line++) -= (*(backline++) = (PIXTYPE)*node); *(line++) -= (*(backline++) = (PIXTYPE)*node);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2013 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 12/09/2013 * Last modified: 26/01/2015
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -80,9 +80,9 @@ void readcatparams(char *filename) ...@@ -80,9 +80,9 @@ void readcatparams(char *filename)
(i = findkey(keyword,(char *)objkey,sizeof(keystruct)))!=RETURN_ERROR) (i = findkey(keyword,(char *)objkey,sizeof(keystruct)))!=RETURN_ERROR)
{ {
key = objkey+i; key = objkey+i;
add_key(key, objtab, 0); if (add_key(key, objtab, 0) != RETURN_ERROR)
*((char *)key->ptr) = (char)'\1';
thecat.nparam++; thecat.nparam++;
*((char *)key->ptr) = (char)'\1';
if (key->naxis) if (key->naxis)
{ {
for (i=0; i<key->naxis; i++) for (i=0; i<key->naxis; i++)
...@@ -566,7 +566,8 @@ void updateparamflags() ...@@ -566,7 +566,8 @@ void updateparamflags()
FLAG(obj2.fluxerr_win) |= FLAG(obj2.snr_win); FLAG(obj2.fluxerr_win) |= FLAG(obj2.snr_win);
FLAG(obj2.flux_win) |= FLAG(obj2.mag_win)|FLAG(obj2.magerr_win) FLAG(obj2.flux_win) |= FLAG(obj2.mag_win)|FLAG(obj2.magerr_win)
| FLAG(obj2.flux_win) | FLAG(obj2.fluxerr_win); | FLAG(obj2.flux_win) | FLAG(obj2.fluxerr_win);
FLAG(obj2.winpos_x) |= FLAG(obj2.winpos_y) FLAG(obj2.winpos_dgeox) |= FLAG(obj2.winpos_dgeoy);
FLAG(obj2.winpos_x) |= FLAG(obj2.winpos_y) | FLAG(obj2.winpos_dgeox)
| FLAG(obj2.winposerr_mx2) | FLAG(obj2.win_mx2) | FLAG(obj2.winposerr_mx2) | FLAG(obj2.win_mx2)
| FLAG(obj2.winpos_xw) | FLAG(obj2.winpos_xf) | FLAG(obj2.winpos_xw) | FLAG(obj2.winpos_xf)
| FLAG(obj2.win_flag) | FLAG(obj2.win_flag)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2012 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 12/04/2012 * Last modified: 11/03/2015
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define BANNER "SExtractor" #define BANNER "SExtractor"
#define MYVERSION VERSION #define MYVERSION VERSION
#define EXECUTABLE "sex" #define EXECUTABLE "sex"
#define COPYRIGHT "2012 IAP/CNRS/UPMC" #define COPYRIGHT "2012-2015 IAP/CNRS/UPMC"
#define DISCLAIMER BANNER " comes with ABSOLUTELY NO WARRANTY\n" \ #define DISCLAIMER BANNER " comes with ABSOLUTELY NO WARRANTY\n" \
"You may redistribute copies of " BANNER "\n" \ "You may redistribute copies of " BANNER "\n" \
"under the terms of the GNU General Public License." "under the terms of the GNU General Public License."
...@@ -221,6 +221,10 @@ ...@@ -221,6 +221,10 @@
#define PIX(pic, x, y) pic->strip[(((int)y)%pic->stripheight) \ #define PIX(pic, x, y) pic->strip[(((int)y)%pic->stripheight) \
*pic->width +(int)x] *pic->width +(int)x]
#define DGEOPIXX(pic, x, y) pic->dgeostrip[0][(((int)y)%pic->stripheight) \
*pic->width +(int)x]
#define DGEOPIXY(pic, x, y) pic->dgeostrip[1][(((int)y)%pic->stripheight) \
*pic->width +(int)x]
#define NPRINTF if (prefs.verbose_type == NORM \ #define NPRINTF if (prefs.verbose_type == NORM \
|| prefs.verbose_type==WARN) fprintf || prefs.verbose_type==WARN) fprintf
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2010 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 11/10/2010 * Last modified: 26/01/2015
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -55,7 +55,8 @@ void lutzalloc(int, int), ...@@ -55,7 +55,8 @@ void lutzalloc(int, int),
lutzfree(void), lutzfree(void),
lutzsort(infostruct *, objliststruct *), lutzsort(infostruct *, objliststruct *),
sortit(picstruct *, picstruct *, picstruct *, picstruct *, sortit(picstruct *, picstruct *, picstruct *, picstruct *,
infostruct *, objliststruct *, PIXTYPE *, PIXTYPE *), picstruct *, infostruct *, objliststruct *,
PIXTYPE *, PIXTYPE *),
update(infostruct *, infostruct *, pliststruct *); update(infostruct *, infostruct *, pliststruct *);
int lutz(objliststruct *, int, objstruct *, objliststruct *); int lutz(objliststruct *, int, objstruct *, objliststruct *);
...@@ -114,11 +114,12 @@ picstruct *newfield(char *filename, int flags, int ext) ...@@ -114,11 +114,12 @@ picstruct *newfield(char *filename, int flags, int ext)
if (cat->ntab>1) if (cat->ntab>1)
sprintf(gstr, " [%d/%d]", ext, cat->tab->naxis<2? cat->ntab-1 : cat->ntab); sprintf(gstr, " [%d/%d]", ext, cat->tab->naxis<2? cat->ntab-1 : cat->ntab);
QPRINTF(OUTPUT, "----- %s %s%s\n", QPRINTF(OUTPUT, "----- %s %s%s\n",
flags&FLAG_FIELD? "Flagging from:" : flags&DGEO_FIELD? "Shifting from:" :
(flags&FLAG_FIELD? "Flagging from:" :
(flags&(RMS_FIELD|VAR_FIELD|WEIGHT_FIELD)? (flags&(RMS_FIELD|VAR_FIELD|WEIGHT_FIELD)?
"Weighting from:" : "Weighting from:" :
(flags&MEASURE_FIELD? "Measuring from:" : (flags&MEASURE_FIELD? "Measuring from:" :
"Detecting from:")), "Detecting from:"))),
field->rfilename, field->rfilename,
cat->ntab>1? gstr : ""); cat->ntab>1? gstr : "");
QPRINTF(OUTPUT, " \"%.20s\" / %s / %dx%d / %d bits %s\n", QPRINTF(OUTPUT, " \"%.20s\" / %s / %dx%d / %d bits %s\n",
...@@ -215,6 +216,7 @@ picstruct *inheritfield(picstruct *infield, int flags) ...@@ -215,6 +216,7 @@ picstruct *inheritfield(picstruct *infield, int flags)
field->assoc = NULL; field->assoc = NULL;
field->strip = NULL; field->strip = NULL;
field->fstrip = NULL; field->fstrip = NULL;
field->dgeostrip[0] = field->dgeostrip[1] = NULL;
field->reffield = infield; field->reffield = infield;
field->file = NULL; field->file = NULL;
...@@ -235,6 +237,8 @@ void endfield(picstruct *field) ...@@ -235,6 +237,8 @@ void endfield(picstruct *field)
free_cat(&field->cat, 1); free_cat(&field->cat, 1);
free(field->strip); free(field->strip);
free(field->fstrip); free(field->fstrip);
free(field->dgeostrip[0]);
free(field->dgeostrip[1]);
if (field->wcs) if (field->wcs)
end_wcs(field->wcs); end_wcs(field->wcs);
if (field->interp_flag) if (field->interp_flag)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2010 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,18 +22,17 @@ ...@@ -22,18 +22,17 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 11/10/2010 * Last modified: 08/01/2015
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*------------------------------ field flags -------------------------------*/ /*------------------------------ field flags -------------------------------*/
#define DETECT_FIELD 0x01 /* Detection */ #define DETECT_FIELD 0x0001 /* Detection */
#define MEASURE_FIELD 0x02 /* Measurement */ #define MEASURE_FIELD 0x0002 /* Measurement */
#define FLAG_FIELD 0x04 /* Flagging */ #define FLAG_FIELD 0x0004 /* Flagging */
#define RMS_FIELD 0x08 /* Weighting with std deviations */ #define RMS_FIELD 0x0008 /* Weighting with std deviations */
#define VAR_FIELD 0x10 /* Weighting with variances */ #define VAR_FIELD 0x0010 /* Weighting with variances */
#define WEIGHT_FIELD 0x20 /* Weighting with weights */ #define WEIGHT_FIELD 0x0020 /* Weighting with weights */
#define BACKRMS_FIELD 0x40 /* Weighting from a backrms matrix */ #define BACKRMS_FIELD 0x0040 /* Weighting from a backrms matrix */
#define INTERP_FIELD 0x80 /* Purely interpolated data */ #define INTERP_FIELD 0x0080 /* Purely interpolated data */
#define DGEO_FIELD 0x0100 /* Differential geometry map */
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: AstrOmatic software * This file part of: AstrOmatic software
* *
* Copyright: (C) 1993-2012 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2016 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* along with AstrOmatic software. * along with AstrOmatic software.
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 13/07/2012 * Last modified: 08/03/2016
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -328,7 +328,7 @@ INPUT tab structure. ...@@ -328,7 +328,7 @@ INPUT tab structure.
OUTPUT -. OUTPUT -.
NOTES -. NOTES -.
AUTHOR E. Bertin (IAP) AUTHOR E. Bertin (IAP)
VERSION 18/06/2012 VERSION 15/11/2013
***/ ***/
wcsstruct *read_wcs(tabstruct *tab) wcsstruct *read_wcs(tabstruct *tab)
...@@ -397,7 +397,6 @@ wcsstruct *read_wcs(tabstruct *tab) ...@@ -397,7 +397,6 @@ wcsstruct *read_wcs(tabstruct *tab)
} }
if (fitsfind(buf, "CD?_????")!=RETURN_ERROR) if (fitsfind(buf, "CD?_????")!=RETURN_ERROR)
{
/*-- If CD keywords exist, use them for the linear mapping terms... */ /*-- If CD keywords exist, use them for the linear mapping terms... */
for (l=0; l<naxis; l++) for (l=0; l<naxis; l++)
for (j=0; j<naxis; j++) for (j=0; j<naxis; j++)
...@@ -405,8 +404,16 @@ wcsstruct *read_wcs(tabstruct *tab) ...@@ -405,8 +404,16 @@ wcsstruct *read_wcs(tabstruct *tab)
sprintf(str, "CD%d_%d", l+1, j+1); sprintf(str, "CD%d_%d", l+1, j+1);
FITSREADF(buf, str, wcs->cd[l*naxis+j], l==j?1.0:0.0) FITSREADF(buf, str, wcs->cd[l*naxis+j], l==j?1.0:0.0)
} }
else if (fitsfind(buf, "PC?_????")!=RETURN_ERROR)
/*-- ...If PC keywords exist, use them for the linear mapping terms... */
for (l=0; l<naxis; l++)
for (j=0; j<naxis; j++)
{
sprintf(str, "PC%d_%d", l+1, j+1);
FITSREADF(buf, str, wcs->cd[l*naxis+j], l==j?1.0:0.0)
wcs->cd[l*naxis+j] *= wcs->cdelt[l];
} }
else if (fitsfind(buf, "PC00?00?")!=RETURN_ERROR) else if (fitsfind(buf, "PC0??0??")!=RETURN_ERROR)
/*-- ...If PC keywords exist, use them for the linear mapping terms... */ /*-- ...If PC keywords exist, use them for the linear mapping terms... */
for (l=0; l<naxis; l++) for (l=0; l<naxis; l++)
for (j=0; j<naxis; j++) for (j=0; j<naxis; j++)
...@@ -572,6 +579,7 @@ wcsstruct *read_wcs(tabstruct *tab) ...@@ -572,6 +579,7 @@ wcsstruct *read_wcs(tabstruct *tab)
} }
else else
{ {
if (fitsread(buf, "LONPOLE",&wcs->longpole,H_FLOAT,T_DOUBLE) != RETURN_OK)
FITSREADF(buf, "LONGPOLE", wcs->longpole, 999.0); FITSREADF(buf, "LONGPOLE", wcs->longpole, 999.0);
FITSREADF(buf, "LATPOLE ", wcs->latpole, 999.0); FITSREADF(buf, "LATPOLE ", wcs->latpole, 999.0);
/*---- Old convention */ /*---- Old convention */
...@@ -616,7 +624,7 @@ INPUT tab structure, ...@@ -616,7 +624,7 @@ INPUT tab structure,
OUTPUT -. OUTPUT -.
NOTES -. NOTES -.
AUTHOR E. Bertin (IAP) AUTHOR E. Bertin (IAP)
VERSION 01/09/2010 VERSION 27/11/2013
***/ ***/
void write_wcs(tabstruct *tab, wcsstruct *wcs) void write_wcs(tabstruct *tab, wcsstruct *wcs)
...@@ -644,26 +652,26 @@ void write_wcs(tabstruct *tab, wcsstruct *wcs) ...@@ -644,26 +652,26 @@ void write_wcs(tabstruct *tab, wcsstruct *wcs)
addkeywordto_head(tab, "MJD-OBS ", "Modified Julian date at start"); addkeywordto_head(tab, "MJD-OBS ", "Modified Julian date at start");
fitswrite(tab->headbuf, "MJD-OBS ", &mjd, H_EXPO,T_DOUBLE); fitswrite(tab->headbuf, "MJD-OBS ", &mjd, H_EXPO,T_DOUBLE);
} }
addkeywordto_head(tab, "RADECSYS", "Astrometric system"); addkeywordto_head(tab, "RADESYS ", "Astrometric system");
switch(wcs->radecsys) switch(wcs->radecsys)
{ {
case RDSYS_ICRS: case RDSYS_ICRS:
fitswrite(tab->headbuf, "RADECSYS", "ICRS", H_STRING, T_STRING); fitswrite(tab->headbuf, "RADESYS ", "ICRS", H_STRING, T_STRING);
break; break;
case RDSYS_FK5: case RDSYS_FK5:
fitswrite(tab->headbuf, "RADECSYS", "FK5", H_STRING, T_STRING); fitswrite(tab->headbuf, "RADESYS ", "FK5", H_STRING, T_STRING);
break; break;
case RDSYS_FK4: case RDSYS_FK4:
fitswrite(tab->headbuf, "RADECSYS", "FK4", H_STRING, T_STRING); fitswrite(tab->headbuf, "RADESYS ", "FK4", H_STRING, T_STRING);
break; break;
case RDSYS_FK4_NO_E: case RDSYS_FK4_NO_E:
fitswrite(tab->headbuf, "RADECSYS", "FK4-NO-E", H_STRING, T_STRING); fitswrite(tab->headbuf, "RADESYS ", "FK4-NO-E", H_STRING, T_STRING);
break; break;
case RDSYS_GAPPT: case RDSYS_GAPPT:
fitswrite(tab->headbuf, "RADECSYS", "GAPPT", H_STRING, T_STRING); fitswrite(tab->headbuf, "RADESYS ", "GAPPT", H_STRING, T_STRING);
break; break;
default: default:
error(EXIT_FAILURE, "*Error*: unknown RADECSYS type in write_wcs()", ""); error(EXIT_FAILURE, "*Error*: unknown RADESYS type in write_wcs()", "");
} }
for (l=0; l<naxis; l++) for (l=0; l<naxis; l++)
{ {
...@@ -686,7 +694,7 @@ void write_wcs(tabstruct *tab, wcsstruct *wcs) ...@@ -686,7 +694,7 @@ void write_wcs(tabstruct *tab, wcsstruct *wcs)
fitswrite(tab->headbuf, str, &wcs->cd[l*naxis+j], H_EXPO, T_DOUBLE); fitswrite(tab->headbuf, str, &wcs->cd[l*naxis+j], H_EXPO, T_DOUBLE);
} }
for (j=0; j<100; j++) for (j=0; j<100; j++)
if (wcs->projp[j+100*l] != 0.0) if (fabs(wcs->projp[j+100*l]) > TINY)
{ {
sprintf(str, "PV%d_%d", l+1, j); sprintf(str, "PV%d_%d", l+1, j);
addkeywordto_head(tab, str, "Projection distortion parameter"); addkeywordto_head(tab, str, "Projection distortion parameter");
...@@ -701,6 +709,43 @@ void write_wcs(tabstruct *tab, wcsstruct *wcs) ...@@ -701,6 +709,43 @@ void write_wcs(tabstruct *tab, wcsstruct *wcs)
} }
/******* wipe_wcs ***********************************************************
PROTO void wipe_wcs(tabstruct *tab)
PURPOSE Remove all WCS (World Coordinate System) info in a FITS header.
INPUT tab structure.
OUTPUT -.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 27/11/2013
***/
void wipe_wcs(tabstruct *tab)
{
removekeywordfrom_head(tab, "CRVAL???");
removekeywordfrom_head(tab, "CTYPE???");
removekeywordfrom_head(tab, "CUNIT???");
removekeywordfrom_head(tab, "CRPIX???");
removekeywordfrom_head(tab, "CRDER???");
removekeywordfrom_head(tab, "CSYER???");
removekeywordfrom_head(tab, "CDELT???");
removekeywordfrom_head(tab, "CROTA???");
removekeywordfrom_head(tab, "CD?_????");
removekeywordfrom_head(tab, "PROJP_??");
removekeywordfrom_head(tab, "PV?_????");
removekeywordfrom_head(tab, "PC?_????");
removekeywordfrom_head(tab, "PC0??0??");
removekeywordfrom_head(tab, "EQUINOX?");
removekeywordfrom_head(tab, "RADESYS?");
removekeywordfrom_head(tab, "RADECSYS");
removekeywordfrom_head(tab, "LONPOLE?");
removekeywordfrom_head(tab, "LONGPOLE");
removekeywordfrom_head(tab, "LATPOLE?");
removekeywordfrom_head(tab, "WAT?????");
return;
}
/******* end_wcs ************************************************************** /******* end_wcs **************************************************************
PROTO void end_wcs(wcsstruct *wcs) PROTO void end_wcs(wcsstruct *wcs)
PURPOSE Free WCS (World Coordinate System) infos. PURPOSE Free WCS (World Coordinate System) infos.
...@@ -773,7 +818,7 @@ INPUT WCS structure. ...@@ -773,7 +818,7 @@ INPUT WCS structure.
OUTPUT -. OUTPUT -.
NOTES . NOTES .
AUTHOR E. Bertin (IAP) AUTHOR E. Bertin (IAP)
VERSION 13/07/2012 VERSION 08/03/2016
***/ ***/
void invert_wcs(wcsstruct *wcs) void invert_wcs(wcsstruct *wcs)
...@@ -785,7 +830,7 @@ void invert_wcs(wcsstruct *wcs) ...@@ -785,7 +830,7 @@ void invert_wcs(wcsstruct *wcs)
lngstep,latstep, rawsize, epsilon; lngstep,latstep, rawsize, epsilon;
int group[] = {1,1}; int group[] = {1,1};
/* Don't ask, this is needed by poly_init()! */ /* Don't ask, this is needed by poly_init()! */
int i,j,lng,lat,deg, tnxflag, maxflag; int i,j,lng,lat,deg, tnxflag, maxflag, maxflagflag;
/* Check first that inversion is not straightforward */ /* Check first that inversion is not straightforward */
lng = wcs->wcsprm->lng; lng = wcs->wcsprm->lng;
...@@ -856,7 +901,7 @@ void invert_wcs(wcsstruct *wcs) ...@@ -856,7 +901,7 @@ void invert_wcs(wcsstruct *wcs)
if (deg>1) if (deg>1)
poly_end(poly); poly_end(poly);
poly = poly_init(group, 2, &deg, 1); poly = poly_init(group, 2, &deg, 1);
poly_fit(poly, outpos, lngpos, NULL, WCS_NGRIDPOINTS2, NULL); poly_fit(poly, outpos, lngpos, NULL, WCS_NGRIDPOINTS2, NULL, 0.0);
maxflag = 0; maxflag = 0;
outpost = outpos; outpost = outpos;
lngpost = lngpos; lngpost = lngpos;
...@@ -867,11 +912,11 @@ void invert_wcs(wcsstruct *wcs) ...@@ -867,11 +912,11 @@ void invert_wcs(wcsstruct *wcs)
break; break;
} }
} }
if (maxflag)
warning("Significant inaccuracy likely to occur in projection","");
/* Now link the created structure */ /* Now link the created structure */
wcs->prj->inv_x = wcs->inv_x = poly; wcs->prj->inv_x = wcs->inv_x = poly;
maxflagflag = maxflag;
/* Invert "latitude" */ /* Invert "latitude" */
/* Compute the extent of the pixel in reduced projected coordinates */ /* Compute the extent of the pixel in reduced projected coordinates */
linrev(rawmin, wcs->lin, pixin); linrev(rawmin, wcs->lin, pixin);
...@@ -890,7 +935,7 @@ void invert_wcs(wcsstruct *wcs) ...@@ -890,7 +935,7 @@ void invert_wcs(wcsstruct *wcs)
if (deg>1) if (deg>1)
poly_end(poly); poly_end(poly);
poly = poly_init(group, 2, &deg, 1); poly = poly_init(group, 2, &deg, 1);
poly_fit(poly, outpos, latpos, NULL, WCS_NGRIDPOINTS2, NULL); poly_fit(poly, outpos, latpos, NULL, WCS_NGRIDPOINTS2, NULL, 0.0);
maxflag = 0; maxflag = 0;
outpost = outpos; outpost = outpos;
latpost = latpos; latpost = latpos;
...@@ -901,11 +946,14 @@ void invert_wcs(wcsstruct *wcs) ...@@ -901,11 +946,14 @@ void invert_wcs(wcsstruct *wcs)
break; break;
} }
} }
if (maxflag)
warning("Significant inaccuracy likely to occur in projection","");
/* Now link the created structure */ /* Now link the created structure */
wcs->prj->inv_y = wcs->inv_y = poly; wcs->prj->inv_y = wcs->inv_y = poly;
maxflagflag |= maxflag;
if (maxflagflag)
warning("Significant inaccuracy likely to occur in projection","");
/* Free memory */ /* Free memory */
free(outpos); free(outpos);
free(lngpos); free(lngpos);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: AstrOmatic software * This file part of: AstrOmatic software
* *
* Copyright: (C) 1993-2012 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2016 IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* along with AstrOmatic software. * along with AstrOmatic software.
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 14/06/2012 * Last modified: 08/03/2016
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -40,8 +40,14 @@ ...@@ -40,8 +40,14 @@
#define ARCMIN (DEG/60.0) /* 1 arcsec in radians */ #define ARCMIN (DEG/60.0) /* 1 arcsec in radians */
#define ARCSEC (DEG/3600.0) /* 1 arcsec in radians */ #define ARCSEC (DEG/3600.0) /* 1 arcsec in radians */
#define MAS (ARCSEC/1000.0) /* 1 mas in radians */ #define MAS (ARCSEC/1000.0) /* 1 mas in radians */
#define YEAR (365.25*DAY) /* 1 year in seconds */
#define DAY (24.0*HOUR) /* 1 day in seconds */
#define HOUR (60.0*MINUTE) /* 1 hour in seconds */
#define MINUTE 60.0 /* 1 minute in seconds */
#define MJD2000 51544.50000 /* Modified Julian date for J2000.0 */ #define MJD2000 51544.50000 /* Modified Julian date for J2000.0 */
#define JD2000 (2400000.5+MJD2000) /* Julian date for J2000.0 */
#define MJD1950 33281.92346 /* Modified Julian date for B1950.0 */ #define MJD1950 33281.92346 /* Modified Julian date for B1950.0 */
#define JD1950 (2400000.5+MJD1950) /* Julian date for B1950.0 */
#define JU2TROP 1.0000214 /* 1 Julian century in tropical units*/ #define JU2TROP 1.0000214 /* 1 Julian century in tropical units*/
#define WCS_NOCOORD 1e31 /* Code for non-existing coordinates */ #define WCS_NOCOORD 1e31 /* Code for non-existing coordinates */
...@@ -158,6 +164,7 @@ extern void b2j(double yearobs, double alphain, double deltain, ...@@ -158,6 +164,7 @@ extern void b2j(double yearobs, double alphain, double deltain,
precess_wcs(wcsstruct *wcs, double yearin, precess_wcs(wcsstruct *wcs, double yearin,
double yearout), double yearout),
range_wcs(wcsstruct *wcs), range_wcs(wcsstruct *wcs),
wipe_wcs(tabstruct *tab),
write_wcs(tabstruct *tab, wcsstruct *wcs); write_wcs(tabstruct *tab, wcsstruct *wcs);
#endif #endif
...@@ -51,7 +51,7 @@ extern void alloccatparams(void), ...@@ -51,7 +51,7 @@ extern void alloccatparams(void),
dumpparams(void), dumpparams(void),
endfield(picstruct *), endfield(picstruct *),
endobject(picstruct *, picstruct *, picstruct *, picstruct *, endobject(picstruct *, picstruct *, picstruct *, picstruct *,
int, objliststruct *), picstruct *, int, objliststruct *),
examineiso(picstruct *, picstruct *, objstruct *, examineiso(picstruct *, picstruct *, objstruct *,
pliststruct *), pliststruct *),
flagcleancrowded(int, objliststruct *), flagcleancrowded(int, objliststruct *),
...@@ -74,7 +74,7 @@ extern void alloccatparams(void), ...@@ -74,7 +74,7 @@ extern void alloccatparams(void),
readimagehead(picstruct *), readimagehead(picstruct *),
readprefs(char *, char **, char **, int), readprefs(char *, char **, char **, int),
scanimage(picstruct *, picstruct *, picstruct **, int, scanimage(picstruct *, picstruct *, picstruct **, int,
picstruct *, picstruct *), picstruct *, picstruct *, picstruct *),
sexcircle(PIXTYPE *bmp, int, int, double, double, double, sexcircle(PIXTYPE *bmp, int, int, double, double, double,
PIXTYPE), PIXTYPE),
sexdraw(PIXTYPE *bmp, int, int, double, double, PIXTYPE), sexdraw(PIXTYPE *bmp, int, int, double, double, PIXTYPE),
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2013 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 17/08/2013 * Last modified: 21/01/2015
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -73,7 +73,8 @@ void makeit() ...@@ -73,7 +73,8 @@ void makeit()
{ {
checkstruct *check; checkstruct *check;
picstruct *dfield, *field,*pffield[MAXFLAG], *wfield,*dwfield; picstruct *dfield, *field,*pffield[MAXFLAG], *wfield,*dwfield,
*dgeofield;
catstruct *imacat; catstruct *imacat;
tabstruct *imatab; tabstruct *imatab;
patternstruct *pattern; patternstruct *pattern;
...@@ -82,7 +83,8 @@ void makeit() ...@@ -82,7 +83,8 @@ void makeit()
unsigned int modeltype; unsigned int modeltype;
int nflag[MAXFLAG], nparam2[2], int nflag[MAXFLAG], nparam2[2],
i, nok, ntab, next, ntabmax, forcextflag, i, nok, ntab, next, ntabmax, forcextflag,
nima0,nima1, nweight0,nweight1, npsf0,npsf1, npat,npat0; nima0,nima1, nweight0,nweight1, npsf0,npsf1, npat,npat0,
ndgeo;
/* Install error logging */ /* Install error logging */
error_installfunc(write_error); error_installfunc(write_error);
...@@ -134,6 +136,7 @@ void makeit() ...@@ -134,6 +136,7 @@ void makeit()
npsf0 = selectext(prefs.psf_name[0]); npsf0 = selectext(prefs.psf_name[0]);
for (i=0; i<prefs.nfimage_name; i++) for (i=0; i<prefs.nfimage_name; i++)
nflag[i] = selectext(prefs.fimage_name[i]); nflag[i] = selectext(prefs.fimage_name[i]);
ndgeo = selectext(prefs.dgeoimage_name);
if (prefs.psf_flag) if (prefs.psf_flag)
{ {
...@@ -319,7 +322,7 @@ void makeit() ...@@ -319,7 +322,7 @@ void makeit()
time(&thetime1); time(&thetime1);
thecat.currext = nok; thecat.currext = nok;
dfield = field = wfield = dwfield = NULL; dfield = field = wfield = dwfield = dgeofield = NULL;
if (prefs.dimage_flag) if (prefs.dimage_flag)
{ {
...@@ -420,6 +423,18 @@ void makeit() ...@@ -420,6 +423,18 @@ void makeit()
"*Error*: Incompatible FLAG-map size in ", prefs.fimage_name[i]); "*Error*: Incompatible FLAG-map size in ", prefs.fimage_name[i]);
} }
/*-- Init the differential geometry images */
if (prefs.dgeo_type != DGEO_NONE) {
dgeofield = newfield(prefs.dgeoimage_name, DGEO_FIELD,
nima0<0? ntab : (ndgeo<0?1:ndgeo));
if ((dgeofield->width != field->width)
|| (dgeofield->height != field->height))
error(EXIT_FAILURE,
"*Error*: Incompatible differential geometry map size in ",
prefs.dgeoimage_name);
}
/*-- Compute background maps for `standard' fields */ /*-- Compute background maps for `standard' fields */
QPRINTF(OUTPUT, dfield? "Measurement image:" QPRINTF(OUTPUT, dfield? "Measurement image:"
: "Detection+Measurement image: "); : "Detection+Measurement image: ");
...@@ -541,7 +556,8 @@ void makeit() ...@@ -541,7 +556,8 @@ void makeit()
/*-- Start the extraction pipeline */ /*-- Start the extraction pipeline */
NFPRINTF(OUTPUT, "Scanning image"); NFPRINTF(OUTPUT, "Scanning image");
scanimage(field, dfield, pffield, prefs.nimaflag, wfield, dwfield); scanimage(field, dfield, pffield, prefs.nimaflag, wfield, dwfield,
dgeofield);
/*-- Finish the current CHECK-image processing */ /*-- Finish the current CHECK-image processing */
if (prefs.check_flag) if (prefs.check_flag)
...@@ -579,6 +595,8 @@ void makeit() ...@@ -579,6 +595,8 @@ void makeit()
endfield(wfield); endfield(wfield);
if (dwfield) if (dwfield)
endfield(dwfield); endfield(dwfield);
if (dgeofield)
endfield(dgeofield);
QPRINTF(OUTPUT, " Objects: detected %-8d / sextracted %-8d \n\n", QPRINTF(OUTPUT, " Objects: detected %-8d / sextracted %-8d \n\n",
thecat.ndetect, thecat.ntotal); thecat.ndetect, thecat.ntotal);
......
...@@ -85,13 +85,14 @@ PROTO void propagate_covar(double *vi, double *d, double *vo, ...@@ -85,13 +85,14 @@ PROTO void propagate_covar(double *vi, double *d, double *vo,
PURPOSE Compute Dt.V.D (propagate covariance matrix errors) PURPOSE Compute Dt.V.D (propagate covariance matrix errors)
INPUT Pointer to the original covariance matrix, INPUT Pointer to the original covariance matrix,
pointer to the matrix of derivatives, pointer to the matrix of derivatives,
pointer to the destination covariance matrix;
input number of parameters, input number of parameters,
output number of parameters, output number of parameters,
pointer to a ni*no work array. pointer to a ni*no work array.
OUTPUT -. OUTPUT -.
NOTES -. NOTES -.
AUTHOR E. Bertin (IAP) AUTHOR E. Bertin (IAP)
VERSION 20/08/2010 VERSION 29/04/2014
***/ ***/
void propagate_covar(double *vi, double *d, double *vo, void propagate_covar(double *vi, double *d, double *vo,
int ni, int no, double *temp) int ni, int no, double *temp)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2014 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2016 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 17/02/2014 * Last modified: 13/01/2016
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -34,6 +34,9 @@ keystruct objkey[] = { ...@@ -34,6 +34,9 @@ keystruct objkey[] = {
{"NUMBER", "Running object number", {"NUMBER", "Running object number",
&outobj.number, H_INT, T_LONG, "%10d", "", &outobj.number, H_INT, T_LONG, "%10d", "",
"meta.record", ""}, "meta.record", ""},
{"ID_PARENT", "Parent ID (before deblending)",
&outobj.id_parent, H_INT, T_LONG, "%10d", "",
"meta.id.parent", ""},
{"EXT_NUMBER", "FITS extension number", {"EXT_NUMBER", "FITS extension number",
&outobj2.ext_number, H_INT, T_SHORT, "%3d", "", &outobj2.ext_number, H_INT, T_SHORT, "%3d", "",
"meta.id;meta.dataset", ""}, "meta.id;meta.dataset", ""},
...@@ -277,24 +280,35 @@ keystruct objkey[] = { ...@@ -277,24 +280,35 @@ keystruct objkey[] = {
{"Y_IMAGE", "Object position along y", {"Y_IMAGE", "Object position along y",
&outobj2.sposy, H_FLOAT, T_FLOAT, "%11.4f", "pixel", &outobj2.sposy, H_FLOAT, T_FLOAT, "%11.4f", "pixel",
"pos.cartesian.y;pos.barycenter;instr.det;meta.main", "pix"}, "pos.cartesian.y;pos.barycenter;instr.det;meta.main", "pix"},
{"DGEOX_IMAGE", "Differential geometry correction to X_IMAGE",
&outobj2.pos_dgeox, H_FLOAT, T_FLOAT, "%+7.4f", "pixel",
"pos.cartesian.x;pos.barycenter;instr.det;arith.diff", "pix"},
{"DGEOY_IMAGE", "Differential geometry correction to Y_IMAGE",
&outobj2.pos_dgeoy, H_FLOAT, T_FLOAT, "%+7.4f", "pixel",
"pos.cartesian.y;pos.barycenter;instr.det;arith.diff", "pix"},
{"X_IMAGE_DBL", "Object position along x (double precision)", {"X_IMAGE_DBL", "Object position along x (double precision)",
&outobj2.posx, H_FLOAT, T_DOUBLE, "%11.4f", "pixel", &outobj2.posx, H_FLOAT, T_DOUBLE, "%11.4f", "pixel",
"pos.cartesian.x;pos.barycenter;instr.det", "pix"}, "pos.cartesian.x;pos.barycenter;instr.det", "pix"},
{"Y_IMAGE_DBL", "Object position along y (double precision)", {"Y_IMAGE_DBL", "Object position along y (double precision)",
&outobj2.posy, H_FLOAT, T_DOUBLE, "%11.4f", "pixel", &outobj2.posy, H_FLOAT, T_DOUBLE, "%11.4f", "pixel",
"pos.cartesian.x;pos.barycenter;instr.det", "pix"}, "pos.cartesian.x;pos.barycenter;instr.det", "pix"},
{"X_FOCAL", "Barycenter position along focal-plane x axis", {"X_FOCAL", "Barycenter position along focal-plane x axis",
&outobj2.mxf, H_FLOAT, T_DOUBLE, "%18.10e", "", &outobj2.mxf, H_FLOAT, T_DOUBLE, "%18.10e", "",
"pos.cartesian.x", ""}, "pos.cartesian.x", ""},
{"Y_FOCAL", "Barycenter position along focal-plane y axis", {"Y_FOCAL", "Barycenter position along focal-plane y axis",
&outobj2.myf, H_FLOAT, T_DOUBLE, "%18.10e", "", &outobj2.myf, H_FLOAT, T_DOUBLE, "%18.10e", "",
"pos.cartesian.y", ""}, "pos.cartesian.y", ""},
{"X_WORLD", "Barycenter position along world x axis", {"X_WORLD", "Barycenter position along world x axis",
&outobj2.mxw, H_FLOAT, T_DOUBLE, "%18.10e", "deg", &outobj2.mxw, H_FLOAT, T_DOUBLE, "%18.10e", "deg",
"pos.eq.ra", "deg"}, "pos.eq.ra", "deg"},
{"Y_WORLD", "Barycenter position along world y axis", {"Y_WORLD", "Barycenter position along world y axis",
&outobj2.myw, H_FLOAT, T_DOUBLE, "%18.10e", "deg", &outobj2.myw, H_FLOAT, T_DOUBLE, "%18.10e", "deg",
"pos.eq.dec", "deg"}, "pos.eq.dec", "deg"},
{"X_MAMA", "Barycenter position along MAMA x axis", {"X_MAMA", "Barycenter position along MAMA x axis",
&outobj2.mamaposx, H_FLOAT, T_DOUBLE, "%8.1f", "m**(-6)", &outobj2.mamaposx, H_FLOAT, T_DOUBLE, "%8.1f", "m**(-6)",
"pos.cartesian.x;instr.det;pos.barycenter", "um"}, "pos.cartesian.x;instr.det;pos.barycenter", "um"},
...@@ -462,6 +476,13 @@ keystruct objkey[] = { ...@@ -462,6 +476,13 @@ keystruct objkey[] = {
&outobj2.winpos_y, H_FLOAT, T_DOUBLE, "%11.4f", "pixel", &outobj2.winpos_y, H_FLOAT, T_DOUBLE, "%11.4f", "pixel",
"pos.cartesian.y;instr.det", "pix"}, "pos.cartesian.y;instr.det", "pix"},
{"DGEOXWIN_IMAGE", "Differential geometry correction to XWIN_IMAGE",
&outobj2.winpos_dgeox, H_FLOAT, T_FLOAT, "%+7.4f", "pixel",
"pos.cartesian.x;instr.det;arith.diff", "pix"},
{"DGEOYWIN_IMAGE", "Differential geometry correction to YWIN_IMAGE",
&outobj2.winpos_dgeoy, H_FLOAT, T_FLOAT, "%+7.4f", "pixel",
"pos.cartesian.y;instr.det;arith.diff", "pix"},
{"XWIN_FOCAL", "Windowed position along focal-plane x axis", {"XWIN_FOCAL", "Windowed position along focal-plane x axis",
&outobj2.winpos_xf, H_FLOAT, T_DOUBLE, "%18.10e", "", &outobj2.winpos_xf, H_FLOAT, T_DOUBLE, "%18.10e", "",
"pos.cartesian.x", ""}, "pos.cartesian.x", ""},
...@@ -725,6 +746,12 @@ keystruct objkey[] = { ...@@ -725,6 +746,12 @@ keystruct objkey[] = {
{"VIGNET_SHIFT", "Pixel data around detection, corrected for shift", {"VIGNET_SHIFT", "Pixel data around detection, corrected for shift",
&outobj2.vigshift, H_FLOAT, T_FLOAT, "%12.7g", "count", &outobj2.vigshift, H_FLOAT, T_FLOAT, "%12.7g", "count",
"obs.image", "ct", 2, prefs.vigshiftsize}, "obs.image", "ct", 2, prefs.vigshiftsize},
{"VIGNET_DGEOX", "Differential x geometry data around detection",
&outobj2.vignet_dgeox, H_FLOAT, T_FLOAT, "%+10.6f", "pix",
"pos.cartesian.x;instr.det;arith.diff", "px", 2, prefs.vignet_dgeoxsize},
{"VIGNET_DGEOY", "Differential y geometry data around detection",
&outobj2.vignet_dgeoy, H_FLOAT, T_FLOAT, "%+10.6f", "pix",
"pos.cartesian.y;instr.det;arith.diff", "px", 2, prefs.vignet_dgeoysize},
{"VECTOR_ASSOC", "ASSOCiated parameter vector", {"VECTOR_ASSOC", "ASSOCiated parameter vector",
&outobj2.assoc, H_FLOAT, T_DOUBLE, "%12.7g", "", &outobj2.assoc, H_FLOAT, T_DOUBLE, "%12.7g", "",
"src", "", 1, &prefs.assoc_size}, "src", "", 1, &prefs.assoc_size},
......
...@@ -148,8 +148,8 @@ PURPOSE initialize a pixel-list and its components. ...@@ -148,8 +148,8 @@ PURPOSE initialize a pixel-list and its components.
INPUT -. INPUT -.
OUTPUT -. OUTPUT -.
NOTES The preparation of components relies on the preferences. NOTES The preparation of components relies on the preferences.
AUTHOR E. Bertin (IAP, Leiden observatory & ESO) AUTHOR E. Bertin (IAP)
VERSION 29/11/2005 VERSION 14/01/2015
***/ ***/
void init_plist(void) void init_plist(void)
...@@ -223,6 +223,17 @@ void init_plist(void) ...@@ -223,6 +223,17 @@ void init_plist(void)
else else
plistexist_dthresh = 0; plistexist_dthresh = 0;
if (prefs.dgeo_type != DGEO_NONE)
{
plistexist_dgeo = 1;
plistoff_dgeox = plistsize;
plistsize += sizeof(PIXTYPE);
plistoff_dgeoy = plistsize;
plistsize += sizeof(PIXTYPE);
}
else
plistexist_dgeo = 0;
return; return;
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2010 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 11/10/2010 * Last modified: 14/01/2015
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -49,9 +49,10 @@ typedef struct ...@@ -49,9 +49,10 @@ typedef struct
int plistexist_value, plistexist_dvalue, plistexist_cdvalue, int plistexist_value, plistexist_dvalue, plistexist_cdvalue,
plistexist_flag, plistexist_wflag, plistexist_dthresh, plistexist_var, plistexist_flag, plistexist_wflag, plistexist_dthresh, plistexist_var,
plistexist_dgeo,
plistoff_value, plistoff_dvalue, plistoff_cdvalue, plistoff_value, plistoff_dvalue, plistoff_cdvalue,
plistoff_flag[MAXFLAG], plistoff_wflag, plistoff_dthresh, plistoff_var, plistoff_flag[MAXFLAG], plistoff_wflag, plistoff_dthresh, plistoff_var,
plistsize; plistoff_dgeox, plistoff_dgeoy, plistsize;
/*------------------------------- functions ---------------------------------*/ /*------------------------------- functions ---------------------------------*/
......
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