Commit 02f1bedb authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Changed ExMODEL parameters to ELLIPx_MODEL.

Changed EPSxMODEL parameters to POLARx_MODEL.
Added AMODEL, BMODEL, THETAMODEL for both _IMAGE and _WORLD coordinates.
Added CXXMODEL CYYMODEL, CXYMODEL for both _IMAGE and _WORLD coordinates.
AddedTHETAMODEL_SKY,THETAMODEL_J2000,THETAMODEL_B1950.
Added ELLIPxMODEL_WORLD and POLARxMODEL_WORLD.
Fixed broken PSF-fitting.
Fixed warnings while generating the configure (thanks to S.Pascual).
Pushed version number to 2.9.1.
parent 404b23f8
......@@ -13,7 +13,7 @@ dnl @authors Emmanuel Bertin <bertin@iap.fr> Ville Laurikari <vl@iki.fi>
dnl
AC_DEFUN([ACX_PROG_CC_OPTIM], [
msg="for C compiler optimization flags"
AC_CACHE_CHECK($msg, prog_cc_optim_flags, [
AC_CACHE_CHECK($msg, prog_cc_optim_cv_flags, [
if test -n "$CC"; then
cat > conftest.c <<EOF
int main(int argc, char **argv) { return 0; }
......@@ -32,80 +32,80 @@ EOF
if $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3 -axSSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_flags="-static-intel"
prog_cc_optim_cv_flags="-O3 -axSSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
dnl INTEL C 32bits compiler
elif $CC -V 2>&1 | grep -i "Intel(R)" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_flags="-static-intel"
prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
dnl GCC
elif test "$GCC" = "yes"; then
prog_cc_optim_flags="-O3 -g -funroll-loops -fomit-frame-pointer -Wall"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O3 -g -funroll-loops -fomit-frame-pointer -Wall"
prog_ld_optim_cv_flags=""
dnl Solaris C compiler
elif $CC -V 2>&1 | grep -i "WorkShop" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O"
prog_ld_optim_cv_flags=""
dnl Digital Unix/Compaq C compiler
elif ($CC -V 2>&1 | grep -i "Digital UNIX Compiler"> /dev/null 2>&1 ||
$CC -V 2>&1 | grep -i "Compaq C"> /dev/null 2>&1) &&
$CC -c -fast conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-fast -tune host"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-fast -tune host"
prog_ld_optim_cv_flags=""
dnl C for AIX Compiler
elif $CC 2>&1 | grep -i "C for AIX Compiler" > /dev/null 2>&1 &&
$CC -c -qinfo=all -O2 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O2"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O2"
prog_ld_optim_cv_flags=""
dnl IRIX C compiler
elif $CC -version 2>&1 | grep -i "MIPSpro Compilers" > /dev/null 2>&1 &&
$CC -c -fullwarn -O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O3"
prog_ld_optim_cv_flags=""
dnl HP-UX C compiler
elif what $CC 2>&1 | grep -i "HP C Compiler" > /dev/null 2>&1 &&
$CC -c -Aa +O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="+O3"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="+O3"
prog_ld_optim_cv_flags=""
dnl The NEC SX-5 (Super-UX 10) C compiler
elif $CC -V 2>&1 | grep "/SX" > /dev/null 2>&1 &&
$CC -c -Xc -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O"
prog_ld_optim_cv_flags=""
dnl The Cray C compiler (Unicos)
elif $CC -V 2>&1 | grep -i "Cray" > /dev/null 2>&1 &&
$CC -c -h conform -O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O3"
prog_ld_optim_cv_flags=""
fi
rm -f conftest.*
fi
if test -n "$prog_cc_optim_flags"; then
AM_CFLAGS="$CFLAGS $prog_cc_optim_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_flags"
if test -n "$prog_cc_optim_cv_flags"; then
AM_CFLAGS="$CFLAGS $prog_cc_optim_cv_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_cv_flags"
else
prog_cc_optim_flags=""
prog_ld_optim_flags=""
prog_cc_optim_cv_flags=""
prog_ld_optim_cv_flags=""
fi
])
])dnl
......
......@@ -110,8 +110,8 @@
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Define to 1 if you have the `sincos' function. */
#undef HAVE_SINCOS
/* Define to 1 if you have the `sincosf' function. */
#undef HAVE_SINCOSF
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for sextractor 2.9.0.
# Generated by GNU Autoconf 2.63 for sextractor 2.9.1.
#
# Report bugs to <bertin@iap.fr>.
#
......@@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.9.0'
PACKAGE_STRING='sextractor 2.9.0'
PACKAGE_VERSION='2.9.1'
PACKAGE_STRING='sextractor 2.9.1'
PACKAGE_BUGREPORT='bertin@iap.fr'
 
ac_unique_file="src/makeit.c"
......@@ -1505,7 +1505,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.9.0 to adapt to many kinds of systems.
\`configure' configures sextractor 2.9.1 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1575,7 +1575,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sextractor 2.9.0:";;
short | recursive ) echo "Configuration of sextractor 2.9.1:";;
esac
cat <<\_ACEOF
 
......@@ -1706,7 +1706,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sextractor configure 2.9.0
sextractor configure 2.9.1
generated by GNU Autoconf 2.63
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
......@@ -1720,7 +1720,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.9.0, which was
It was created by sextractor $as_me 2.9.1, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
$ $0 $@
......@@ -2423,7 +2423,7 @@ fi
 
# Define the identity of the package.
PACKAGE='sextractor'
VERSION='2.9.0'
VERSION='2.9.1'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -2620,11 +2620,9 @@ cclist="cc gcc"
$as_echo_n "checking if compilation flags are set automatically... " >&6; }
# Check whether --enable-auto-flags was given.
if test "${enable_auto_flags+set}" = set; then
enableval=$enable_auto_flags; use_autoflag="yes"
{ $as_echo "$as_me:$LINENO: result: yes" >&5
enableval=$enable_auto_flags; { $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
use_autoflag="no"
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
......@@ -2635,12 +2633,10 @@ fi
$as_echo_n "checking for Linux Intel C compiler mode... " >&6; }
# Check whether --enable-icc was given.
if test "${enable_icc+set}" = set; then
enableval=$enable_icc; use_icc="yes"
cclist="icc $cclist"
enableval=$enable_icc; cclist="icc $cclist"
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
use_icc="no"
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
......@@ -4449,14 +4445,14 @@ if test "$ac_res" != no; then
fi
 
# Override automatic CFLAGS and LDFLAGS with those of user
if test "$use_autoflag" = "yes"; then
if test "$enable_auto_flags" = "yes"; then
CFLAGS=""
LDFLAGS =""
 
msg="for C compiler optimization flags"
{ $as_echo "$as_me:$LINENO: checking $msg" >&5
$as_echo_n "checking $msg... " >&6; }
if test "${prog_cc_optim_flags+set}" = set; then
if test "${prog_cc_optim_cv_flags+set}" = set; then
$as_echo_n "(cached) " >&6
else
 
......@@ -4469,76 +4465,76 @@ EOF
if $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3 -axSSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_flags="-static-intel"
prog_cc_optim_cv_flags="-O3 -axSSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
 
elif $CC -V 2>&1 | grep -i "Intel(R)" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_flags="-static-intel"
prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2 -ip -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
 
elif test "$GCC" = "yes"; then
prog_cc_optim_flags="-O3 -g -funroll-loops -fomit-frame-pointer -Wall"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O3 -g -funroll-loops -fomit-frame-pointer -Wall"
prog_ld_optim_cv_flags=""
 
elif $CC -V 2>&1 | grep -i "WorkShop" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O"
prog_ld_optim_cv_flags=""
 
elif ($CC -V 2>&1 | grep -i "Digital UNIX Compiler"> /dev/null 2>&1 ||
$CC -V 2>&1 | grep -i "Compaq C"> /dev/null 2>&1) &&
$CC -c -fast conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-fast -tune host"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-fast -tune host"
prog_ld_optim_cv_flags=""
 
elif $CC 2>&1 | grep -i "C for AIX Compiler" > /dev/null 2>&1 &&
$CC -c -qinfo=all -O2 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O2"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O2"
prog_ld_optim_cv_flags=""
 
elif $CC -version 2>&1 | grep -i "MIPSpro Compilers" > /dev/null 2>&1 &&
$CC -c -fullwarn -O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O3"
prog_ld_optim_cv_flags=""
 
elif what $CC 2>&1 | grep -i "HP C Compiler" > /dev/null 2>&1 &&
$CC -c -Aa +O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="+O3"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="+O3"
prog_ld_optim_cv_flags=""
 
elif $CC -V 2>&1 | grep "/SX" > /dev/null 2>&1 &&
$CC -c -Xc -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O"
prog_ld_optim_cv_flags=""
 
elif $CC -V 2>&1 | grep -i "Cray" > /dev/null 2>&1 &&
$CC -c -h conform -O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3"
prog_ld_optim_flags=""
prog_cc_optim_cv_flags="-O3"
prog_ld_optim_cv_flags=""
 
fi
rm -f conftest.*
fi
if test -n "$prog_cc_optim_flags"; then
AM_CFLAGS="$CFLAGS $prog_cc_optim_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_flags"
if test -n "$prog_cc_optim_cv_flags"; then
AM_CFLAGS="$CFLAGS $prog_cc_optim_cv_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_cv_flags"
else
prog_cc_optim_flags=""
prog_ld_optim_flags=""
prog_cc_optim_cv_flags=""
prog_ld_optim_cv_flags=""
fi
 
fi
{ $as_echo "$as_me:$LINENO: result: $prog_cc_optim_flags" >&5
$as_echo "$prog_cc_optim_flags" >&6; }
{ $as_echo "$as_me:$LINENO: result: $prog_cc_optim_cv_flags" >&5
$as_echo "$prog_cc_optim_cv_flags" >&6; }
 
fi
# Check whether --enable-shared was given.
......@@ -5320,7 +5316,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5323 "configure"' > conftest.$ac_ext
echo '#line 5319 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
......@@ -8095,11 +8091,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8098: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8094: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8102: \$? = $ac_status" >&5
echo "$as_me:8098: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -8385,11 +8381,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8388: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8384: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8392: \$? = $ac_status" >&5
echo "$as_me:8388: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -8489,11 +8485,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8492: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8488: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8496: \$? = $ac_status" >&5
echo "$as_me:8492: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -10876,7 +10872,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10879 "configure"
#line 10875 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -10976,7 +10972,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10979 "configure"
#line 10975 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -13404,11 +13400,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13407: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13403: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13411: \$? = $ac_status" >&5
echo "$as_me:13407: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -13508,11 +13504,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13511: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13507: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13515: \$? = $ac_status" >&5
echo "$as_me:13511: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -15072,11 +15068,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15075: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15071: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15079: \$? = $ac_status" >&5
echo "$as_me:15075: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -15176,11 +15172,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15179: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15175: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15183: \$? = $ac_status" >&5
echo "$as_me:15179: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -17373,11 +17369,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17376: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17372: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:17380: \$? = $ac_status" >&5
echo "$as_me:17376: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -17663,11 +17659,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17666: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17662: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:17670: \$? = $ac_status" >&5
echo "$as_me:17666: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -17767,11 +17763,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17770: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17766: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:17774: \$? = $ac_status" >&5
echo "$as_me:17770: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -20938,7 +20934,7 @@ fi
 
done
 
if test $use_icc = "yes" -a $CC = "icc"; then
if test $enable_icc = "yes" -a $CC = "icc"; then
 
for ac_header in mathimf.h
do
......@@ -22432,7 +22428,7 @@ done
 
 
for ac_func in atexit getenv memcpy memmove memset mkdir munmap strstr \
sincos logf
sincosf logf
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
......@@ -23136,11 +23132,9 @@ use_pthreads="no"
$as_echo_n "checking for gprof profiler mode... " >&6; }
# Check whether --enable-gprof was given.
if test "${enable_gprof+set}" = set; then
enableval=$enable_gprof; use_gprof="yes"
{ $as_echo "$as_me:$LINENO: result: yes" >&5
enableval=$enable_gprof; { $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
use_gprof="no"
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
......@@ -23151,11 +23145,9 @@ fi
$as_echo_n "checking best linking option... " >&6; }
# Check whether --enable-best-link was given.
if test "${enable_best_link+set}" = set; then
enableval=$enable_best_link; use_best="yes"
{ $as_echo "$as_me:$LINENO: result: yes" >&5
enableval=$enable_best_link; { $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
use_best="no"
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
......@@ -27884,17 +27876,17 @@ $as_echo "$as_me: error: $ATLAS_ERROR Exiting." >&2;}
fi
 
# Link with gprof option
if test "$use_gprof" = "yes"; then
if test "$use_icc" = "yes"; then
if test "$enable_gprof" = "yes"; then
if test "$enable_icc" = "yes"; then
AM_CFLAGS="$AM_CFLAGS -pq"
else
AM_CFLAGS="$AM_CFLAGS -pg"
fi
use_best="no"
enable_best_link="no"
fi
 
# "Best" linking option
if test "$use_best" = "yes"; then
if test "$enable_best_link" = "yes"; then
AM_LDFLAGS="-shared-libgcc -static-libtool-libs $AM_LDFLAGS"
fi
 
......@@ -28297,7 +28289,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sextractor $as_me 2.9.0, which was
This file was extended by sextractor $as_me 2.9.1, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -28360,7 +28352,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sextractor config.status 2.9.0
sextractor config.status 2.9.1
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
......
......@@ -6,7 +6,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
# This is your standard Bertin source code...
AC_INIT(sextractor, 2.9.0, [bertin@iap.fr])
AC_INIT(sextractor, 2.9.1, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf)
AM_CONFIG_HEADER(config.h)
......@@ -38,9 +38,7 @@ AC_ARG_ENABLE(auto-flags,
[AC_HELP_STRING([--enable-auto-flags],
[Let the configure script choose the compilation flags \
(off by default)])],
use_autoflag="yes"
AC_MSG_RESULT([yes]),
use_autoflag="no"
AC_MSG_RESULT([no]))
# Provide special option for the Linux Intel C compiler
......@@ -49,10 +47,8 @@ AC_ARG_ENABLE(icc,
[AC_HELP_STRING([--enable-icc],
[Enable special mode for compilation with the Intel compiler \
(off by default)])],
use_icc="yes"
cclist="icc $cclist"
AC_MSG_RESULT([yes]),
use_icc="no"
AC_MSG_RESULT([no]))
# Checks for programs.
......@@ -63,7 +59,7 @@ AC_PROG_CC([$cclist])
AM_PROG_CC_STDC
AC_ISC_POSIX
# Override automatic CFLAGS and LDFLAGS with those of user
if test "$use_autoflag" = "yes"; then
if test "$enable_auto_flags" = "yes"; then
CFLAGS=""
LDFLAGS =""
ACX_PROG_CC_OPTIM
......@@ -78,7 +74,7 @@ AC_CHECK_LIB(m, sin)
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/mman.h \
sys/types.h unistd.h])
if test $use_icc = "yes" -a $CC = "icc"; then
if test $enable_icc = "yes" -a $CC = "icc"; then
AC_CHECK_HEADERS(mathimf.h)
fi
......@@ -97,7 +93,7 @@ AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([atexit getenv memcpy memmove memset mkdir munmap strstr \
sincos logf])
sincosf logf])
# Check support for large files
AC_SYS_LARGEFILE
......@@ -168,9 +164,7 @@ AC_ARG_ENABLE(gprof,
[AC_HELP_STRING([--enable-gprof],
[Enable special mode for compilation with the gprof profiler \
(off by default)])],
use_gprof="yes"
AC_MSG_RESULT([yes]),
use_gprof="no"
AC_MSG_RESULT([no]))
# Enable linking options for making the executable as portable as possible.
......@@ -179,9 +173,7 @@ AC_ARG_ENABLE(best-link,
[AC_HELP_STRING([--enable-best-link],
[Choose the right combination of static and dynamic linking to make \
the executable as portable as possible (off by default)])],
use_best="yes"
AC_MSG_RESULT([yes]),
use_best="no"
AC_MSG_RESULT([no]))
################# Actions to complete in case of multhreading ################
......@@ -223,17 +215,17 @@ else
fi
# Link with gprof option
if test "$use_gprof" = "yes"; then
if test "$use_icc" = "yes"; then
if test "$enable_gprof" = "yes"; then
if test "$enable_icc" = "yes"; then
AM_CFLAGS="$AM_CFLAGS -pq"
else
AM_CFLAGS="$AM_CFLAGS -pg"
fi
use_best="no"
enable_best_link="no"
fi
# "Best" linking option
if test "$use_best" = "yes"; then
if test "$enable_best_link" = "yes"; then
AM_LDFLAGS="-shared-libgcc -static-libtool-libs $AM_LDFLAGS"
fi
......
.TH SEXTRACTOR "1" "September 2009" "SWarp 2.9.0" "User Commands"
.TH SEXTRACTOR "1" "September 2009" "SWarp 2.9.1" "User Commands"
.SH NAME
sex \- extract a source catalog from an astronomical FITS image
.SH SYNOPSIS
......
......@@ -9,7 +9,7 @@
*
* Contents: analyse(), endobject()...: measurements on detections.
*
* Last modify: 27/08/2009
* Last modify: 11/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -387,8 +387,7 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
{
objstruct *obj;
checkstruct *check;
double rawpos[NAXIS],
pixscale2;
double rawpos[NAXIS];
int i,j, ix,iy,selecflag, newnumber,nsub;
obj = &objlist->obj[n];
......@@ -474,20 +473,18 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
if (FLAG(obj2.mxf) || FLAG(obj2.mxw))
astrom_pos(field, obj);
pixscale2 = 0.0; /* To avoid gcc -Wall warnings */
obj2->pixscale2 = 0.0; /* To avoid gcc -Wall warnings */
if (FLAG(obj2.mx2w)
|| FLAG(obj2.win_mx2w)
|| FLAG(obj2.poserr_mx2w)
|| FLAG(obj2.winposerr_mx2w)
|| FLAG(obj2.poserrmx2w_prof)
|| FLAG(obj2.prof_flagw)
|| ((!prefs.pixel_scale) && (FLAG(obj2.npixw)
|| FLAG(obj2.fdnpixw)
|| FLAG(obj2.fwhmw))))
|| ((!prefs.pixel_scale) && FLAG(obj2.area_flagw)))
{
rawpos[0] = obj2->posx;
rawpos[1] = obj2->posy;
pixscale2 = wcs_jacobian(field->wcs, rawpos, obj2->jacob);
obj2->pixscale2 = wcs_jacobian(field->wcs, rawpos, obj2->jacob);
}
/*-- Express shape parameters in the FOCAL or WORLD frame */
......@@ -499,14 +496,14 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
if (FLAG(obj2.npixw))
obj2->npixw = obj->npix * (prefs.pixel_scale?
field->pixscale/3600.0*field->pixscale/3600.0 : pixscale2);
field->pixscale/3600.0*field->pixscale/3600.0 : obj2->pixscale2);
if (FLAG(obj2.fdnpixw))
obj2->fdnpixw = obj->fdnpix * (prefs.pixel_scale?
field->pixscale/3600.0*field->pixscale/3600.0 : pixscale2);
field->pixscale/3600.0*field->pixscale/3600.0 : obj2->pixscale2);
if (FLAG(obj2.fwhmw))
obj2->fwhmw = obj->fwhm * (prefs.pixel_scale?
field->pixscale/3600.0 : sqrt(pixscale2));
field->pixscale/3600.0 : sqrt(obj2->pixscale2));
/*------------------------------- Photometry -------------------------------*/
......@@ -539,10 +536,10 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
if (FLAG(obj2.winpos_xf) || FLAG(obj2.winpos_xw))
astrom_winpos(field, obj);
/*---- Express shape parameters in the FOCAL or WORLD frame */
if (FLAG(obj2.mx2w))
if (FLAG(obj2.win_mx2w))
astrom_winshapeparam(field, obj);
/*---- Express position error parameters in the FOCAL or WORLD frame */
if (FLAG(obj2.poserr_mx2w))
if (FLAG(obj2.winposerr_mx2w))
astrom_winerrparam(field, obj);
}
......@@ -691,18 +688,17 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
}
/*----------------------------- Profile fitting -----------------------------*/
nsub = 1;
if (prefs.prof_flag)
{
profit_fit(theprofit, field, wfield, obj, obj2);
/*---- Express positions in FOCAL or WORLD coordinates */
if (FLAG(obj2.winpos_xf) || FLAG(obj2.winpos_xw))
if (FLAG(obj2.xf_prof) || FLAG(obj2.xw_prof))
astrom_profpos(field, obj);
/*---- Express shape parameters in the FOCAL or WORLD frame */
if (FLAG(obj2.mx2w))
if (FLAG(obj2.prof_flagw))
astrom_profshapeparam(field, obj);
/*---- Express position error parameters in the FOCAL or WORLD frame */
if (FLAG(obj2.poserr_mx2w))
if (FLAG(obj2.poserrmx2w_prof))
astrom_proferrparam(field, obj);
}
......
......@@ -916,6 +916,78 @@ void astrom_profshapeparam(picstruct *field, objstruct *obj)
: 0.0;
}
/* Global 2nd-order moments */
if (FLAG(obj2.prof_mx2w))
{
dx2 = obj2->prof_mx2;
dy2 = obj2->prof_my2;
dxy = obj2->prof_mxy;
obj2->prof_mx2w = xm2 = lm0*lm0*dx2 + lm1*lm1*dy2 + lm0*lm1*dxy;
obj2->prof_my2w = ym2 = lm2*lm2*dx2 + lm3*lm3*dy2 + lm2*lm3*dxy;
obj2->prof_mxyw = xym = lm0*lm2*dx2 + lm1*lm3*dy2 + (lm0*lm3+lm1*lm2)*dxy;
temp=xm2-ym2;
if (FLAG(obj2.prof_thetaw))
{
obj2->prof_thetaw = fmod_m90_p90((temp == 0.0)?
(45.0) : (0.5*atan2(2.0*xym,temp)/DEG));
/*---- Compute position angles in J2000 or B1950 reference frame */
if (wcs->lng != wcs->lat)
{
if (FLAG(obj2.prof_thetas))
obj2->prof_thetas = fmod_m90_p90(lng<lat?
((obj2->prof_thetaw>0.0?90:-90.0) - obj2->prof_thetaw)
: obj2->prof_thetaw);
if (FLAG(obj2.prof_theta2000))
obj2->prof_theta2000 = fmod_m90_p90(obj2->prof_thetas
+ obj2->dtheta2000);
if (FLAG(obj2.prof_theta1950))
obj2->prof_theta1950 = fmod_m90_p90(obj2->prof_thetas
+ obj2->dtheta1950);
}
}
if (FLAG(obj2.prof_aw))
{
temp = sqrt(0.25*temp*temp+xym*xym);
pm2 = 0.5*(xm2+ym2);
obj2->prof_aw = (float)sqrt(pm2+temp);
obj2->prof_bw = (float)sqrt(pm2-temp);
}
if (FLAG(obj2.prof_cxxw))
{
/*---- Handle large, fully correlated profiles (can cause a singularity...) */
if ((temp=xm2*ym2-xym*xym)<1e-6)
{
temp = 1e-6;
xym *= 0.99999;
}
obj2->prof_cxxw = (float)(ym2/temp);
obj2->prof_cyyw = (float)(xm2/temp);
obj2->prof_cxyw = (float)(-2*xym/temp);
}
if (FLAG(obj2.prof_e1w))
{
if (xm2+ym2 > 1.0/BIG)
{
obj2->prof_pol1w = (xm2 - ym2) / (xm2+ym2);
obj2->prof_pol2w = 2.0*xym / (xm2 + ym2);
temp = xm2*ym2-xym*xym;
if (temp>=0.0)
temp = xm2+ym2+2.0*sqrt(temp);
else
temp = xm2+ym2;
obj2->prof_e1w = (xm2 - ym2) / temp;
obj2->prof_e2w = 2.0*xym / temp;
}
else
obj2->prof_pol1w = obj2->prof_pol2w
= obj2->prof_e1w = obj2->prof_e2w = 0.0;
}
}
return;
}
......@@ -9,7 +9,7 @@
*
* Contents: functions for output of catalog data.
*
* Last modify: 20/07/2009
* Last modify: 11/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -219,6 +219,7 @@ void updateparamflags()
FLAG(obj2.prof_spheroid_theta) |= FLAG(obj2.prof_spheroid_thetaerr);
FLAG(obj2.prof_spheroid_sersicn) |= FLAG(obj2.prof_spheroid_sersicnerr);
FLAG(obj2.prof_disk_mag) |= FLAG(obj2.prof_disk_magerr);
FLAG(obj2.prof_disk_peak) |= FLAG(obj2.prof_disk_mumax);
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);
......@@ -228,7 +229,22 @@ void updateparamflags()
FLAG(obj2.prof_bar_aspect) |= FLAG(obj2.prof_bar_aspecterr);
FLAG(obj2.prof_bar_theta) |= FLAG(obj2.prof_bar_thetaerr);
FLAG(obj2.prof_arms_mag) |= FLAG(obj2.prof_arms_magerr);
FLAG(obj2.dtheta1950) |= FLAG(obj2.prof_spheroid_theta1950)
FLAG(obj2.prof_e1w) |= FLAG(obj2.prof_e2w)
| FLAG(obj2.prof_pol1w) | FLAG(obj2.prof_pol2w);
FLAG(obj2.prof_aw) |= FLAG(obj2.prof_bw);
FLAG(obj2.prof_cxxw) |= FLAG(obj2.prof_cyyw) | FLAG(obj2.prof_cxyw);
FLAG(obj2.prof_thetas) |= FLAG(obj2.prof_theta1950)
| FLAG(obj2.prof_theta2000);
FLAG(obj2.prof_thetaw) |= FLAG(obj2.prof_thetas);
FLAG(obj2.prof_mx2w) |= FLAG(obj2.prof_my2w)
| FLAG(obj2.prof_mxyw)
| FLAG(obj2.prof_thetaw) | FLAG(obj2.prof_aw)
| FLAG(obj2.prof_cxxw)
| FLAG(obj2.prof_e1w);
FLAG(obj2.dtheta1950) |= FLAG(obj2.prof_theta1950)
| FLAG(obj2.prof_spheroid_theta1950)
| FLAG(obj2.prof_disk_theta1950)
// | FLAG(obj2.prof_arms_theta1950)
| FLAG(obj2.prof_bar_theta1950)
......@@ -238,7 +254,8 @@ void updateparamflags()
| FLAG(obj2.poserr_theta1950)
| FLAG(obj2.theta1950)
| FLAG(obj2.poserrtheta1950_prof);
FLAG(obj2.dtheta2000) |= FLAG(obj2.prof_spheroid_theta2000)
FLAG(obj2.dtheta2000) |= FLAG(obj2.prof_theta2000)
| FLAG(obj2.prof_spheroid_theta2000)
| FLAG(obj2.prof_disk_theta2000)
// | FLAG(obj2.prof_arms_theta2000)
| FLAG(obj2.prof_bar_theta2000)
......@@ -280,6 +297,9 @@ void updateparamflags()
| FLAG(obj2.prof_disk_aspecterrw)
| FLAG(obj2.prof_disk_thetaerrw)
| FLAG(obj2.prof_arms_scalew);
FLAG(obj2.prof_disk_fluxeff) |= FLAG(obj2.prof_disk_mueff);
FLAG(obj2.prof_disk_peak) |= FLAG(obj2.prof_disk_mumax)
| FLAG(obj2.prof_disk_fluxeff);
FLAG(obj2.prof_spheroid_reffw) |= FLAG(obj2.prof_spheroid_aspectw)
| FLAG(obj2.prof_spheroid_thetaw)
......@@ -287,14 +307,32 @@ void updateparamflags()
| FLAG(obj2.prof_spheroid_aspecterrw)
| FLAG(obj2.prof_spheroid_thetaerrw);
FLAG(obj2.prof_mx2w) |= FLAG(obj2.prof_my2w) | FLAG(obj2.prof_mxyw)
| FLAG(obj2.prof_e1w) |FLAG(obj2.prof_e2w)
| FLAG(obj2.prof_pol1w) |FLAG(obj2.prof_pol2w);
FLAG(obj2.prof_spheroid_fluxeff) |= FLAG(obj2.prof_spheroid_mueff);
FLAG(obj2.prof_spheroid_peak) |= FLAG(obj2.prof_spheroid_mumax)
| FLAG(obj2.prof_spheroid_fluxeff);
FLAG(obj2.prof_flagw) |= FLAG(obj2.prof_spheroid_reffw)
| FLAG(obj2.prof_disk_scalew)
| FLAG(obj2.prof_bar_lengthw)
| FLAG(obj2.prof_arms_scalew);
| FLAG(obj2.prof_arms_scalew)
| FLAG(obj2.prof_mx2w);
FLAG(obj2.prof_e1) |= FLAG(obj2.prof_e2)
| FLAG(obj2.prof_pol1) | FLAG(obj2.prof_pol2)
| FLAG(obj2.prof_e1w);
FLAG(obj2.prof_a) |= FLAG(obj2.prof_b) | FLAG(obj2.prof_theta)
| FLAG(obj2.prof_aw);
FLAG(obj2.prof_cxx) |= FLAG(obj2.prof_cyy)
| FLAG(obj2.prof_cxy) | FLAG(obj2.prof_cxxw);
FLAG(obj2.prof_mx2) |= FLAG(obj2.prof_my2) | FLAG(obj2.prof_mxy)
| FLAG(obj2.prof_e1) |FLAG(obj2.prof_e2)
| FLAG(obj2.prof_eps1) |FLAG(obj2.prof_eps2);
| FLAG(obj2.prof_e1)
| FLAG(obj2.prof_a) | FLAG(obj2.prof_cxx)
| FLAG(obj2.prof_mx2w);
FLAG(obj2.prof_arms_flux) |= FLAG(obj2.prof_arms_fluxerr)
| FLAG(obj2.prof_arms_mag)
| FLAG(obj2.prof_arms_scalew)
......@@ -319,6 +357,7 @@ void updateparamflags()
| FLAG(obj2.prof_disk_aspect)
| FLAG(obj2.prof_disk_inclination)
| FLAG(obj2.prof_disk_theta)
| FLAG(obj2.prof_disk_peak)
| FLAG(obj2.prof_bar_flux);
FLAG(obj2.prof_spheroid_flux) |= FLAG(obj2.prof_spheroid_fluxerr)
| FLAG(obj2.prof_spheroid_mag)
......@@ -326,7 +365,8 @@ void updateparamflags()
| FLAG(obj2.prof_spheroid_reff)
| FLAG(obj2.prof_spheroid_aspect)
| FLAG(obj2.prof_spheroid_theta)
| FLAG(obj2.prof_spheroid_sersicn);
| FLAG(obj2.prof_spheroid_sersicn)
| FLAG(obj2.prof_spheroid_peak);
prefs.prof_flag |= FLAG(obj2.prof_chi2) | FLAG(obj2.prof_niter)
| FLAG(obj2.prof_vector) | FLAG(obj2.prof_errvector)
| FLAG(obj2.x_prof) | FLAG(obj2.y_prof)
......@@ -431,9 +471,7 @@ void updateparamflags()
FLAG(obj2.cxxw) |= FLAG(obj2.cyyw) | FLAG(obj2.cxyw);
FLAG(obj2.mx2w) |= FLAG(obj2.my2w) | FLAG(obj2.mxyw)
| FLAG(obj2.thetaw) | FLAG(obj2.aw) | FLAG(obj2.cxxw)
| FLAG(obj2.npixw) | FLAG(obj2.fdnpixw)
| FLAG(obj2.fwhmw);
| FLAG(obj2.thetaw) | FLAG(obj2.aw) | FLAG(obj2.cxxw);
FLAG(obj2.peakxw) |= FLAG(obj2.peakyf);
FLAG(obj2.peakxw) |= FLAG(obj2.peakyw) | FLAG(obj2.peakalphas);
......@@ -452,6 +490,12 @@ void updateparamflags()
| FLAG(obj2.win_flag)
| FLAG(obj2.flux_win) |FLAG(obj2.winpos_niter);
FLAG(obj2.area_flagw) |= FLAG(obj2.npixw) | FLAG(obj2.fdnpixw)
| FLAG(obj2.fwhmw)
| FLAG(obj2.maxmu) | FLAG(obj2.threshmu)
| FLAG(obj2.prof_spheroid_mumax)
| FLAG(obj2.prof_disk_mumax);
/*------------------------------ Photometry ---------------------------------*/
FLAG(obj2.fluxerr_best) |= FLAG(obj2.magerr_best);
......@@ -587,6 +631,7 @@ void initcat(void)
else
if (!(ascfile = fopen(prefs.cat_name, "w+")))
error(EXIT_FAILURE,"*Error*: cannot open ", prefs.cat_name);
// setlinebuf(ascfile);
if (prefs.cat_type == ASCII_HEAD && (key = objtab->key))
for (i=0,n=1; i++<objtab->nkey; key=key->nextkey)
{
......
......@@ -10,7 +10,7 @@
* Contents: functions dealing with on-line filtering of the image
* (for detection).
*
* Last modify: 26/11/2003
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -333,24 +333,23 @@ void neurfilter(picstruct *field, PIXTYPE *mscan)
/*
Convolve a vignet with an array.
*/
void convolve_image(picstruct *field, double *vig1,
double *vig2, int width, int height)
void convolve_image(picstruct *field, float *vig1,
float *vig2, int width, int height)
{
int mw,mw2,m0,me,m,mx,dmx, y, y0,dy;
float *mask;
double *mscane, *s,*s0, *vig3, *d,*de, mval, val;
float *mask, *mscane, *s,*s0, *vig3, *d,*de, mval, val;
/* If no filtering, just return a copy of the input data */
if (!thefilter || thefilter->bpann)
{
memcpy(vig2, vig1, width*height*sizeof(double));
memcpy(vig2, vig1, width*height*sizeof(float));
return;
}
s0 = NULL; /* To avoid gcc -Wall warnings */
mw = thefilter->convw;
mw2 = mw/2;
memset(vig2, 0, width*height*sizeof(double));
memset(vig2, 0, width*height*sizeof(float));
vig3 = vig2;
for (y=0; y<height; y++, vig3+=width)
{
......
......@@ -10,7 +10,7 @@
* Contents: functions dealing with on-line filtering of the image
* (for detection).
*
* Last modify: 09/11/99
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -36,8 +36,8 @@ filterstruct *thefilter;
/*------------------------------- functions ---------------------------------*/
void convolve(picstruct *, PIXTYPE *),
convolve_image(picstruct *field, double *vig1,
double *vig2, int width, int height),
convolve_image(picstruct *field, float *vig1,
float *vig2, int width, int height),
filter(picstruct *, PIXTYPE *),
neurfilter(picstruct *, PIXTYPE *),
endfilter(void),
......
......@@ -9,7 +9,7 @@
*
* Contents: Function related to image manipulations.
*
* Last modify: 13/12/2002
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -461,11 +461,11 @@ void pasteimage(picstruct *field, PIXTYPE *mask, int w,int h,
Scale and shift a small image through sinc interpolation.
Image parts which lie outside boundaries are set to 0.
*/
int vignet_resample(double *pix1, int w1, int h1,
double *pix2, int w2, int h2,
double dx, double dy, double step2)
int vignet_resample(float *pix1, int w1, int h1,
float *pix2, int w2, int h2,
float dx, float dy, float step2)
{
double *mask,*maskt, xc1,xc2,yc1,yc2, xs1,ys1, x1,y1, x,y, dxm,dym,
float *mask,*maskt, xc1,xc2,yc1,yc2, xs1,ys1, x1,y1, x,y, dxm,dym,
val,
*pix12, *pixin,*pixin0, *pixout,*pixout0;
int i,j,k,n,t, *start,*startt, *nmask,*nmaskt,
......@@ -474,10 +474,10 @@ int vignet_resample(double *pix1, int w1, int h1,
/* Initialize destination buffer to zero */
memset(pix2, 0, w2*h2*sizeof(double));
memset(pix2, 0, w2*h2*sizeof(float));
xc1 = (double)(w1/2); /* Im1 center x-coord*/
xc2 = (double)(w2/2); /* Im2 center x-coord*/
xc1 = (float)(w1/2); /* Im1 center x-coord*/
xc2 = (float)(w2/2); /* Im2 center x-coord*/
xs1 = xc1 + dx - xc2*step2; /* Im1 start x-coord */
if ((int)xs1 >= w1)
......@@ -497,8 +497,8 @@ int vignet_resample(double *pix1, int w1, int h1,
nx2 = ix2;
if (nx2<=0)
return RETURN_ERROR;
yc1 = (double)(h1/2); /* Im1 center y-coord */
yc2 = (double)(h2/2); /* Im2 center y-coord */
yc1 = (float)(h1/2); /* Im1 center y-coord */
yc2 = (float)(h2/2); /* Im2 center y-coord */
ys1 = yc1 + dy - yc2*step2; /* Im1 start y-coord */
if ((int)ys1 >= h1)
return RETURN_ERROR;
......@@ -528,10 +528,10 @@ int vignet_resample(double *pix1, int w1, int h1,
ny1 = h1;
/* Express everything relative to the effective Im1 start (with margin) */
ny1 -= iys1a;
ys1 -= (double)iys1a;
ys1 -= (float)iys1a;
/* Allocate interpolant stuff for the x direction */
QMALLOC(mask, double, nx2*INTERPW); /* Interpolation masks */
QMALLOC(mask, float, nx2*INTERPW); /* Interpolation masks */
QMALLOC(nmask, int, nx2); /* Interpolation mask sizes */
QMALLOC(start, int, nx2); /* Int part of Im1 conv starts */
/* Compute the local interpolant and data starting points in x */
......@@ -547,7 +547,7 @@ int vignet_resample(double *pix1, int w1, int h1,
if (ix < 0)
{
n = INTERPW+ix;
dxm -= (double)ix;
dxm -= (float)ix;
ix = 0;
}
else
......@@ -560,7 +560,7 @@ int vignet_resample(double *pix1, int w1, int h1,
*(maskt++) = INTERPF(x);
}
QCALLOC(pix12, double, nx2*ny1); /* Intermediary frame-buffer */
QCALLOC(pix12, float, nx2*ny1); /* Intermediary frame-buffer */
/* Make the interpolation in x (this includes transposition) */
pixin0 = pix1+iys1a*w1;
......@@ -582,7 +582,7 @@ int vignet_resample(double *pix1, int w1, int h1,
}
/* Reallocate interpolant stuff for the y direction */
QREALLOC(mask, double, ny2*INTERPH); /* Interpolation masks */
QREALLOC(mask, float, ny2*INTERPH); /* Interpolation masks */
QREALLOC(nmask, int, ny2); /* Interpolation mask sizes */
QREALLOC(start, int, ny2); /* Int part of Im1 conv starts */
......@@ -599,7 +599,7 @@ int vignet_resample(double *pix1, int w1, int h1,
if (iy < 0)
{
n = INTERPH+iy;
dym -= (double)iy;
dym -= (float)iy;
iy = 0;
}
else
......
......@@ -9,7 +9,7 @@
*
* Contents: Include file for image.c.
*
* Last modify: 29/08/98
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -37,6 +37,6 @@ extern void addimage(picstruct *field, float *psf,
extern int copyimage(picstruct *, PIXTYPE *, int, int, int, int),
copyimage_center(picstruct *, PIXTYPE *, int,int, float,float),
vignet_resample(double *pix1, int w1, int h1, double *pix2,
int w2, int h2, double dx, double dy, double step2);
vignet_resample(float *pix1, int w1, int h1, float *pix2,
int w2, int h2, float dx, float dy, float step2);
......@@ -44,6 +44,7 @@ int main(int argc, char *argv[])
int a, narg, nim, opt, opt2;
char **argkey, **argval, *str;
setlinebuf(stdout);
if (argc<2)
{
fprintf(OUTPUT, "\n %s version %s (%s)\n", BANNER,MYVERSION,DATE);
......
......@@ -9,7 +9,7 @@
*
* Contents: Model-fitting parameter list for catalog data.
*
* Last modify: 20/07/2009
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -161,19 +161,88 @@
{"XYMODEL_IMAGE", "Covariance between x and y from model-fitting",
&outobj2.prof_mxy, H_EXPO, T_DOUBLE, "%18.10e", "pixel**2",
"src.impactParam;stat.fit;instr.det", "pix2"},
{"E1MODEL_IMAGE", "Ellipticity component from model-fitting",
{"ELLIP1MODEL_IMAGE", "Ellipticity component from model-fitting",
&outobj2.prof_e1, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit;instr.det", ""},
{"E2MODEL_IMAGE", "Ellipticity component from model-fitting",
{"ELLIP2MODEL_IMAGE", "Ellipticity component from model-fitting",
&outobj2.prof_e2, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit;instr.det", ""},
{"EPS1MODEL_IMAGE", "Ellipticity component (quadratic) from model-fitting",
&outobj2.prof_eps1, H_FLOAT, T_FLOAT, "%10.6f", "",
{"POLAR1MODEL_IMAGE", "Ellipticity component (quadratic) from model-fitting",
&outobj2.prof_pol1, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit;instr.det", ""},
{"EPS2MODEL_IMAGE", "Ellipticity component (quadratic) from model-fitting",
&outobj2.prof_eps2, H_FLOAT, T_FLOAT, "%10.6f", "",
{"POLAR2MODEL_IMAGE", "Ellipticity component (quadratic) from model-fitting",
&outobj2.prof_pol2, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit;instr.det", ""},
{"X2MODEL_WORLD", "Variance along X-WORLD (alpha) from model-fitting",
&outobj2.prof_mx2w, H_EXPO, T_DOUBLE, "%18.10e", "deg**2",
"src.impactParam;stat.fit", "deg2"},
{"Y2MODEL_WORLD", "Variance along Y_WORLD (delta) from model-fitting",
&outobj2.prof_my2w, H_EXPO, T_DOUBLE, "%18.10e", "deg**2",
"src.impactParam;stat.fit", "deg2"},
{"XYMODEL_WORLD", "Covariance between X-WORLD and Y-WORLD from model-fitting",
&outobj2.prof_mxyw, H_EXPO, T_DOUBLE, "%18.10e", "deg**2",
"src.impactParam;stat.fit", "deg2"},
{"ELLIP1MODEL_WORLD", "Ellipticity component from model-fitting",
&outobj2.prof_e1w, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit", ""},
{"ELLIP2MODEL_WORLD", "Ellipticity component from model-fitting",
&outobj2.prof_e2w, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit", ""},
{"POLAR1MODEL_WORLD", "Ellipticity component (quadratic) from model-fitting",
&outobj2.prof_pol1w, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit", ""},
{"POLAR2MODEL_WORLD", "Ellipticity component (quadratic) from model-fitting",
&outobj2.prof_pol2w, H_FLOAT, T_FLOAT, "%10.6f", "",
"src.ellipticity;stat.fit", ""},
{"CXXMODEL_IMAGE", "Cxx ellipse parameter from model-fitting",
&outobj2.prof_cxx, H_EXPO, T_FLOAT, "%15.7e", "pixel**(-2)",
"src.impactParam;stat.fit;instr.det", "pix-2"},
{"CYYMODEL_IMAGE", "Cyy ellipse parameter from model-fittinh",
&outobj2.prof_cyy, H_EXPO, T_FLOAT, "%15.7e", "pixel**(-2)",
"src.impactParam;stat.fit;instr.det", "pix-2"},
{"CXYMODEL_IMAGE", "Cxy ellipse parameter from model-fitting",
&outobj2.prof_cxy, H_EXPO, T_FLOAT, "%15.7e", "pixel**(-2)",
"src.impactParam;stat.fit;instr.det", "pix-2"},
{"CXXMODEL_WORLD", "Cxx ellipse parameter (WORLD) from model-fitting",
&outobj2.prof_cxxw, H_EXPO, T_FLOAT, "%15.7e", "deg**(-2)",
"src.impactParam;stat.fit", "deg-2"},
{"CYYMODEL_WORLD", "Cyy ellipse parameter (WORLD) from model-fitting",
&outobj2.prof_cyyw, H_EXPO, T_FLOAT, "%15.7e", "deg**(-2)",
"src.impactParam;stat.fit", "deg-2"},
{"CXYMODEL_WORLD", "Cxy ellipse parameter (WORLD) from model-fitting",
&outobj2.prof_cxyw, H_EXPO, T_FLOAT, "%15.7e", "deg**(-2)",
"src.impactParam;stat.fit", "deg-2"},
{"AMODEL_IMAGE", "Model RMS along major axis",
&outobj2.prof_a, H_FLOAT, T_FLOAT, "%9.3f", "pixel",
"phys.size.smajAxis;stat.fit;instr.det", "pix"},
{"BMODEL_IMAGE", "Model RMS along minor axis",
&outobj2.prof_b, H_FLOAT, T_FLOAT, "%9.3f", "pixel",
"phys.size.sminAxis;stat.fit;instr.det", "pix"},
{"THETAMODEL_IMAGE", "Model position angle (CCW/x)",
&outobj2.prof_theta, H_FLOAT, T_FLOAT, "%6.2f", "deg",
"pos.posAng;stat.fit;instr.det", "deg"},
{"AMODEL_WORLD", "Model RMS along major axis (WORLD units)",
&outobj2.prof_aw, H_FLOAT, T_FLOAT, "%12.7g", "deg",
"phys.size.smajAxis;stat.fit", "deg"},
{"BMODEL_WORLD", "Model RMS along minor axis (WORLD units)",
&outobj2.prof_bw, H_FLOAT, T_FLOAT, "%12.7g", "deg",
"phys.size.sminAxis;stat.fit", "deg"},
{"THETAMODEL_WORLD", "Model position angle (CCW/WORLD-x)",
&outobj2.prof_thetaw, H_FLOAT, T_FLOAT, "%6.2f", "deg",
"pos.posAng;stat.fit", "deg"},
{"THETAMODEL_SKY", "Model position angle (east of north) (native)",
&outobj2.prof_thetas, H_FLOAT, T_FLOAT, "%+6.2f", "deg",
"pos.posAng;stat.fit", "deg"},
{"THETAMODEL_J2000", "Model position angle (east of north) (J2000)",
&outobj2.prof_theta2000, H_FLOAT, T_FLOAT, "%+6.2f", "deg",
"pos.posAng;stat.fit", "deg"},
{"THETAMODEL_B1950", "Model position angle (east of north) (B1950)",
&outobj2.prof_theta1950, H_FLOAT, T_FLOAT, "%+6.2f", "deg",
"pos.posAng;stat.fit", "deg"},
{"CONCENTRATION_MODEL", "Concentration parameter from model-fitting",
&outobj2.prof_concentration, H_FLOAT, T_FLOAT, "%7.4f", "",
"src.morph.param", ""},
......@@ -200,6 +269,18 @@
{"MAGERR_SPHEROID", "RMS error on fitted spheroid total magnitude",
&outobj2.prof_spheroid_magerr, H_FLOAT, T_FLOAT, "%8.4f", "mag",
"stat.error;phot.mag;stat.fit.param", "mag"},
{"FLUX_MAX_SPHEROID", "Peak spheroid flux above background",
&outobj2.prof_spheroid_peak, H_FLOAT, T_FLOAT, "%12.7g", "count",
"phot.flux.sb;stat.max;stat.fit.param", "ct"},
{"FLUX_EFF_SPHEROID", "Effective spheroid flux above background",
&outobj2.prof_spheroid_fluxeff, H_FLOAT, T_FLOAT, "%12.7g", "count",
"phot.flux.sb;stat.fit.param", "ct"},
{"MU_MAX_SPHEROID", "Peak spheroid surface brightness above background",
&outobj2.prof_spheroid_mumax, H_FLOAT, T_FLOAT, "%8.4f", "mag * arcsec**(-2)",
"phot.mag.sb;stat.max;stat.fit.param", "mag.arcsec-2"},
{"MU_EFF_SPHEROID", "Effective spheroid surface brightness above background",
&outobj2.prof_spheroid_mueff, H_FLOAT, T_FLOAT, "%8.4f", "mag * arcsec**(-2)",
"phot.mag.sb;stat.fit.param", "mag.arcsec-2"},
{"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"},
......@@ -264,6 +345,18 @@
{"MAGERR_DISK", "RMS error on fitted disk total magnitude",
&outobj2.prof_disk_magerr, H_FLOAT, T_FLOAT, "%8.4f", "mag",
"stat.error;phot.mag;stat.fit.param", "mag"},
{"FLUX_MAX_DISK", "Peak disk flux above background",
&outobj2.prof_disk_peak, H_FLOAT, T_FLOAT, "%12.7g", "count",
"phot.flux.sb;stat.max;stat.fit.param", "ct"},
{"FLUX_EFF_DISK", "Effective disk flux above background",
&outobj2.prof_disk_fluxeff, H_FLOAT, T_FLOAT, "%12.7g", "count",
"phot.flux.sb;stat.fit.param", "ct"},
{"MU_MAX_DISK", "Peak disk surface brightness above background",
&outobj2.prof_disk_mumax, H_FLOAT, T_FLOAT, "%8.4f", "mag * arcsec**(-2)",
"phot.mag.sb;stat.max;stat.fit.param", "mag.arcsec-2"},
{"MU_EFF_DISK", "Effective disk surface brightness above background",
&outobj2.prof_disk_mueff, H_FLOAT, T_FLOAT, "%8.4f", "mag * arcsec**(-2)",
"phot.mag.sb;stat.fit.param", "mag.arcsec-2"},
{"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"},
......
......@@ -9,7 +9,7 @@
*
* Contents: Stuff related to Principal Component Analysis (PCA).
*
* Last modify: 11/10/2007
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -172,7 +172,7 @@ pcstruct *pc_load(catstruct *cat)
}
}
QMALLOC(pc->maskcurr, double, pc->masksize[0]*pc->masksize[1]*pc->npc);
QMALLOC(pc->maskcurr, float, pc->masksize[0]*pc->masksize[1]*pc->npc);
/* But don't touch my arrays!! */
blank_keys(tab);
......@@ -189,14 +189,15 @@ headerror:
/*
Fit the PC data to the current data.
*/
void pc_fit(psfstruct *psf, double *data, double *weight,
void pc_fit(psfstruct *psf, float *data, float *weight,
int width, int height,int ix, int iy,
double dx, double dy, int npc, float backrms)
float dx, float dy, int npc, float backrms)
{
pcstruct *pc;
checkstruct *check;
codestruct *code;
double *basis,*basis0, *cpix,*cpix0, *pcshift,*wpcshift,
double *basis,*basis0;
float *cpix,*cpix0, *pcshift,*wpcshift,
*spix,*wspix, *w, *sumopc,*sumopct, *checkbuf,
*sol,*solt, *datat,
*mx2t, *my2t, *mxyt,
......@@ -218,7 +219,7 @@ void pc_fit(psfstruct *psf, double *data, double *weight,
dx *= pixstep;
dy *= pixstep;
memset(pc->maskcurr, 0, npix*npc*sizeof(double));
memset(pc->maskcurr, 0, npix*npc*sizeof(float));
basis0 = psf->poly->basis;
cpix0 = pc->maskcurr;
ppix = pc->maskcomp;
......@@ -232,14 +233,14 @@ void pc_fit(psfstruct *psf, double *data, double *weight,
cpix = cpix0;
val = *(basis++);
for (p=npix; p--;)
*(cpix++) += val*(double)*(ppix++);
*(cpix++) += val**(ppix++);
}
}
/* Allocate memory for temporary buffers */
QMALLOC(pcshift, double, npix2*npc);
QMALLOC(wpcshift, double, npix2*npc);
QMALLOC(sol, double, npc);
QMALLOC(pcshift, float, npix2*npc);
QMALLOC(wpcshift, float, npix2*npc);
QMALLOC(sol, float, npc);
/* Now shift and scale to the right position, and weight the PCs */
cpix = pc->maskcurr;
......@@ -446,7 +447,7 @@ void pc_fit(psfstruct *psf, double *data, double *weight,
{
/*- Reconstruct the unconvolved profile */
nopix = pc->omasksize[0]*pc->omasksize[1];
QCALLOC(sumopc, double, nopix);
QCALLOC(sumopc, float, nopix);
solt = sol;
ospix = pc->omaskcomp;
for (c=npc; c--;)
......@@ -454,9 +455,9 @@ void pc_fit(psfstruct *psf, double *data, double *weight,
val = *(solt++);
sumopct = sumopc;
for (p=nopix; p--;)
*(sumopct++) += val*(double)*(ospix++);
*(sumopct++) += val**(ospix++);
}
QMALLOC(checkbuf, double, npix2);
QMALLOC(checkbuf, float, npix2);
vignet_resample(sumopc, pc->omasksize[0], pc->omasksize[1],
checkbuf, width, height, -dx, -dy, pixstep);
ppix = checkmask;
......
......@@ -9,7 +9,7 @@
*
* Contents: Compute magnitudes and other photometrical parameters.
*
* Last modify: 02/05/2008
* Last modify: 11/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -880,6 +880,23 @@ void computemags(picstruct *field, objstruct *obj)
-2.5*log10(obj2->prof_spheroid_flux)
+ prefs.mag_zeropoint
:99.0;
if (FLAG(obj2.prof_spheroid_mumax))
obj2->prof_spheroid_mumax = obj2->prof_spheroid_peak > 0.0 ?
-2.5*log10((obj2->prof_spheroid_peak)
/ (prefs.pixel_scale? field->pixscale*field->pixscale
: obj2->pixscale2 * 3600.0*3600.0))
+ prefs.mag_zeropoint
: 99.0;
if (FLAG(obj2.prof_spheroid_mueff))
obj2->prof_spheroid_mueff = obj2->prof_spheroid_fluxeff > 0.0 ?
-2.5*log10((obj2->prof_spheroid_fluxeff)
/ (prefs.pixel_scale? field->pixscale*field->pixscale
: obj2->pixscale2 * 3600.0*3600.0))
+ prefs.mag_zeropoint
: 99.0;
if (FLAG(obj2.prof_spheroid_magerr))
obj2->prof_spheroid_magerr = obj2->prof_spheroid_flux>0.0?
1.086*obj2->prof_spheroid_fluxerr
......@@ -897,6 +914,22 @@ void computemags(picstruct *field, objstruct *obj)
/ obj2->prof_disk_flux
:99.0;
if (FLAG(obj2.prof_disk_mumax))
obj2->prof_disk_mumax = obj2->prof_disk_peak > 0.0 ?
-2.5*log10((obj2->prof_disk_peak)
/ (prefs.pixel_scale? field->pixscale*field->pixscale
: obj2->pixscale2 * 3600.0*3600.0))
+ prefs.mag_zeropoint
: 99.0;
if (FLAG(obj2.prof_disk_mueff))
obj2->prof_disk_mueff = obj2->prof_disk_fluxeff > 0.0 ?
-2.5*log10((obj2->prof_disk_fluxeff)
/ (prefs.pixel_scale? field->pixscale*field->pixscale
: obj2->pixscale2 * 3600.0*3600.0))
+ prefs.mag_zeropoint
: 99.0;
if (FLAG(obj2.prof_bar_mag))
obj2->prof_bar_mag = obj2->prof_bar_flux>0.0?
-2.5*log10(obj2->prof_bar_flux)
......@@ -938,19 +971,24 @@ void computemags(picstruct *field, objstruct *obj)
1.086*obj2->fluxerr_galfit/obj2->flux_galfit
:99.0;
/* SB units */
/* Other surface brightnesses */
if (FLAG(obj2.maxmu))
outobj2.maxmu = obj->peak > 0.0 ?
-2.5*log10((obj->peak)
/ (field->pixscale * field->pixscale)) + prefs.mag_zeropoint
/ (prefs.pixel_scale? field->pixscale*field->pixscale
: obj2->pixscale2 * 3600.0*3600.0))
+ prefs.mag_zeropoint
: 99.0;
if (FLAG(obj2.threshmu))
obj2->threshmu = obj->thresh > 0.0 ?
-2.5*log10((obj->thresh)
/ (field->pixscale * field->pixscale)) + prefs.mag_zeropoint
/ (prefs.pixel_scale? field->pixscale*field->pixscale
: obj2->pixscale2 * 3600.0*3600.0))
+ prefs.mag_zeropoint
: 99.0;
return;
}
......
......@@ -9,7 +9,7 @@
*
* Contents: Functions to handle the configuration file.
*
* Last modify: 26/06/2009
* Last modify: 11/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -477,8 +477,8 @@ void useprefs()
|| FLAG(obj2.mx2w) || FLAG(obj2.win_mx2w)
|| FLAG(obj2.xw_prof) || FLAG(obj2.poserrmx2w_prof)
|| FLAG(obj2.poserr_mx2w) || FLAG(obj2.winposerr_mx2w)
|| FLAG(obj2.npixw) || FLAG(obj2.fdnpixw)
|| FLAG(obj2.fwhmw) || FLAG(obj2.prof_flagw);
|| FLAG(obj2.area_flagw) || FLAG(obj2.prof_flagw);
/* Default astrometric settings */
strcpy(prefs.coosys, "ICRS");
prefs.epoch = 2000.0;
......
......@@ -9,7 +9,7 @@
*
* Contents: Fit an arbitrary profile combination to a detection.
*
* Last modify: 07/09/2009
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -18,6 +18,10 @@
#include "config.h"
#endif
#ifndef HAVE_MATHIMF_H
#define _GNU_SOURCE
#endif
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -35,6 +39,7 @@
#include "psf.h"
#include "profit.h"
static double prof_gamma(double x);
static float prof_interpolate(profstruct *prof, float *posin);
static float interpolate_pix(float *posin, float *pix, int *naxisn,
interpenum interptype);
......@@ -156,7 +161,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 07/09/2009
VERSION 11/09/2009
***/
void profit_fit(profitstruct *profit,
picstruct *field, picstruct *wfield,
......@@ -166,7 +171,7 @@ void profit_fit(profitstruct *profit,
patternstruct *pattern;
psfstruct *psf;
checkstruct *check;
double emx2,emy2,emxy, a , cp,sp;
double emx2,emy2,emxy, a , cp,sp, k, n;
float psf_fwhm, dchi2, err;
int i,j,p, nparam, ncomp, nprof;
......@@ -412,6 +417,22 @@ void profit_fit(profitstruct *profit,
obj2->prof_spheroid_sersicnerr =
profit->paramerr[profit->paramindex[PARAM_SPHEROID_SERSICN]];
}
else
obj2->prof_spheroid_sersicn = 4.0;
if (FLAG(obj2.prof_spheroid_peak))
{
n = obj2->prof_spheroid_sersicn;
k = 2.0*n - 1.0/3.0 + 4.0/(405.0*n) + 46.0/(25515.0*n*n)
+ 131.0/(1148175*n*n*n); /* Ciotti & Bertin 1999 */
obj2->prof_spheroid_peak = obj2->prof_spheroid_reff>0.0?
obj2->prof_spheroid_flux * pow(k, 2.0*n)
/ (2.0 * PI * obj2->prof_spheroid_sersicn
* obj2->prof_spheroid_reff*obj2->prof_spheroid_reff
* obj2->prof_spheroid_aspect * prof_gamma(2.0*n))
: 0.0;
if (FLAG(obj2.prof_spheroid_fluxeff))
obj2->prof_spheroid_fluxeff = obj2->prof_spheroid_peak * exp(-k);
}
}
/* Disk */
......@@ -440,6 +461,17 @@ void profit_fit(profitstruct *profit,
}
}
if (FLAG(obj2.prof_disk_peak))
{
obj2->prof_disk_peak = obj2->prof_disk_scale>0.0?
obj2->prof_disk_flux
/ (2.0 * PI * obj2->prof_disk_scale*obj2->prof_disk_scale
* obj2->prof_disk_aspect)
: 0.0;
if (FLAG(obj2.prof_disk_fluxeff))
obj2->prof_disk_fluxeff = obj2->prof_disk_peak * 0.186682;
}
/* Disk pattern */
if (prefs.pattern_flag)
{
......@@ -574,6 +606,32 @@ void profit_fit(profitstruct *profit,
return;
}
/****i* prof_gamma ************************************************************
PROTO double prof_gammaln(double xx)
PURPOSE Returns the Gamma function (from Num. Recipes in C, p.168).
INPUT A double.
OUTPUT Gamma function.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 11/09/009
*/
static double prof_gamma(double xx)
{
double x,tmp,ser;
static double cof[6]={76.18009173,-86.50532033,24.01409822,
-1.231739516,0.120858003e-2,-0.536382e-5};
int j;
tmp=(x=xx-1.0)+5.5;
tmp -= (x+0.5)*log(tmp);
ser=1.0;
for (j=0;j<6;j++)
ser += cof[j]/(x+=1.0);
return 2.50662827465*ser*exp(-tmp);
}
/****** profit_psf ************************************************************
PROTO void profit_psf(profitstruct *profit)
......@@ -686,11 +744,11 @@ int profit_minimize(profitstruct *profit, int niter)
profit_boundtounbound(profit, profit->paraminit);
/* Perform fit */
lm_opts[0] = 1.0e-3;
lm_opts[0] = 1.0e-4;
lm_opts[1] = 1.0e-18;
lm_opts[2] = 1.0e-18;
lm_opts[3] = 1.0e-18;
lm_opts[4] = 1.0e-5;
lm_opts[4] = 1.0e-4;
niter = slevmar_dif(profit_evaluate, profit->paraminit, profit->resi,
n, m, niter, lm_opts, info, NULL, profit->covar, profit);
......@@ -1329,13 +1387,13 @@ INPUT Profile-fitting structure.
OUTPUT -.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 07/09/2009
VERSION 13/09/2009
***/
void profit_moments(profitstruct *profit)
{
objstruct *obj;
obj2struct *obj2;
double mx,my, sum, mx2,my2,mxy, den;
double mx,my, sum, mx2,my2,mxy, den, temp,temp2,pmx2,theta;
float *pix,
hw,hh, x,y, xstart, val, r2max;
int ix,iy;
......@@ -1374,20 +1432,53 @@ void profit_moments(profitstruct *profit)
obj2->prof_mx2 = mx2 = mx2/sum - mx*mx;
obj2->prof_my2 = my2 = my2/sum - my*my;
obj2->prof_mxy = mxy = mxy/sum - mx*my;
/* Handle fully correlated profiles (which cause a singularity...) */
if ((temp2=mx2*my2-mxy*mxy)<0.00694)
{
mx2 += 0.0833333;
my2 += 0.0833333;
temp2 = mx2*my2-mxy*mxy;
}
if (FLAG(obj2.prof_e1))
{
if (mx2+my2 > 1.0/BIG)
{
obj2->prof_eps1 = (mx2 - my2) / (mx2+my2);
obj2->prof_eps2 = 2.0*mxy / (mx2 + my2);
den = mx2*my2-mxy*mxy;
if (den>=0.0)
den = mx2+my2+2.0*sqrt(den);
obj2->prof_pol1 = (mx2 - my2) / (mx2+my2);
obj2->prof_pol2 = 2.0*mxy / (mx2 + my2);
if (temp2>=0.0)
den = mx2+my2+2.0*sqrt(temp2);
else
den = mx2+my2;
obj2->prof_e1 = (mx2 - my2) / den;
obj2->prof_e2 = 2.0*mxy / den;
}
else
obj2->prof_eps1 = obj2->prof_eps2 = obj2->prof_e1 = obj2->prof_e2 = 0.0;
obj2->prof_pol1 = obj2->prof_pol2 = obj2->prof_e1 = obj2->prof_e2 = 0.0;
}
if (FLAG(obj2.prof_cxx))
{
obj2->prof_cxx = (float)(my2/temp2);
obj2->prof_cyy = (float)(mx2/temp2);
obj2->prof_cxy = (float)(-2*mxy/temp2);
}
if (FLAG(obj2.prof_a))
{
if ((fabs(temp=mx2-my2)) > 0.0)
theta = atan2(2.0 * mxy,temp) / 2.0;
else
theta = PI/4.0;
temp = sqrt(0.25*temp*temp+mxy*mxy);
pmx2 = 0.5*(mx2+my2);
obj2->prof_a = (float)sqrt(pmx2 + temp);
obj2->prof_b = (float)sqrt(pmx2 - temp);
obj2->prof_theta = theta*180.0/PI;
}
return;
}
......@@ -1984,13 +2075,13 @@ VERSION 07/09/2009
***/
void prof_add(profstruct *prof, profitstruct *profit)
{
double xscale, yscale, saspect, ctheta,stheta, flux, scaling;
double xscale, yscale, saspect, ctheta,stheta, flux, scaling, n;
float posin[PROFIT_MAXEXTRA], posout[2], dnaxisn[2],
*pixin, *pixout,
fluxfac, amp,cd11,cd12,cd21,cd22, dcd11,dcd21, dx1,dx2,
x1,x10,x2, x1cin,x2cin, x1cout,x2cout,
x1in,x2in, odx, ostep,
n,k, hinvn, x1t,x2t, ca,sa, u,umin,
k, hinvn, x1t,x2t, ca,sa, u,umin,
armamp,arm2amp, armrdphidr, armrdphidrvar, posang,
width, invwidth2,
r,r2,rmin,r2min, r2minxin,r2minxout, rmax, r2max, invr2xdif,
......@@ -2037,8 +2128,8 @@ void prof_add(profstruct *prof, profitstruct *profit)
{
case PROF_SERSIC:
n = fabs(*prof->extra[0]);
k = 1.0/3.0 - 2.0*n - 4.0/(405.0*n) - 46.0/(25515.0*n*n)
- 131.0/(1148175*n*n*n);
k = (float)(1.0/3.0 - 2.0*n - 4.0/(405.0*n) - 46.0/(25515.0*n*n)
- 131.0/(1148175*n*n*n)); /* Ciotti & Bertin 1999 */
hinvn = 0.5/n;
/*---- The consequence of sampling on flux is compensated by PSF normalisation*/
x10 = -x1cout - dx1;
......@@ -2588,7 +2679,7 @@ void make_kernel(float pos, float *kernel, interpenum interptype)
else
{
x = -PI/2.0*(pos+1.0);
#ifdef HAVE_SINCOS
#ifdef HAVE_SINCOSF
sincosf(x, &sinx1, &cosx1);
#else
sinx1 = sinf(x);
......
......@@ -261,7 +261,7 @@ psfstruct *psf_load(char *filename)
psf->pc = pc_load(cat);
QMALLOC(psf->maskloc, double, psf->masksize[0]*psf->masksize[1]);
QMALLOC(psf->maskloc, float, psf->masksize[0]*psf->masksize[1]);
/* But don't touch my arrays!! */
blank_keys(tab);
......@@ -320,21 +320,21 @@ void psf_fit(psfstruct *psf, picstruct *field, picstruct *wfield,
fluxb[PSF_NPSFMAX],
sol[PSF_NTOT], covmat[PSF_NTOT*PSF_NTOT],
vmat[PSF_NTOT*PSF_NTOT], wmat[PSF_NTOT];
double **psfmasks, **psfmaskx,**psfmasky,
*data, *data2, *data3, *weight, *mat, *checkdata,
*d, *m, *w, *ps, *var,
float *data, *data2, *data3, *weight, *d, *w;
double *mat,
*m, *var,
dx,dy,
pix,pix2, wthresh,val,
backnoise2, gain, radmin2,radmax2,satlevel,chi2,
r2, valmax, psf_fwhm;
float *dh, *wh, pixstep,fluxerr;
float **psfmasks, **psfmaskx,**psfmasky,
*ps, *dh, *wh, pixstep,fluxerr;
PIXTYPE *datah, *weighth, *cpix;
int i,j,p, npsf,npsfmax, npix, nppix, ix,iy,niter,
width, height, pwidth,pheight, x,y,
xmax,ymax, wbad, gainflag, convflag, npsfflag,
ival,kill=0;
checkdata = NULL; /* To avoid gcc -Wall warnings */
dx = dy = 0.0;
niter = 0;
npsfmax = prefs.psf_npsfmax;
......@@ -383,28 +383,27 @@ void psf_fit(psfstruct *psf, picstruct *field, picstruct *wfield,
QMALLOC(obj2->fluxerr_psf, float, prefs.psf_npsfmax);
QMALLOC(weighth, PIXTYPE, npix);
QMALLOC(weight, double, npix);
QMALLOC(weight, float, npix);
QMALLOC(datah, PIXTYPE, npix);
QMALLOC(data, double, npix);
QMALLOC(data2, double, npix);
QMALLOC(data3, double, npix);
QMALLOC(data, float, npix);
QMALLOC(data2, float, npix);
QMALLOC(data3, float, npix);
QMALLOC(mat, double, npix*PSF_NTOT);
if (prefs.check[CHECK_SUBPSFPROTOS] || prefs.check[CHECK_PSFPROTOS]
|| prefs.check[CHECK_SUBPCPROTOS] || prefs.check[CHECK_PCPROTOS]
|| prefs.check[CHECK_PCOPROTOS])
{
QMALLOC(checkdata, double, nppix);
QMALLOC(checkmask, PIXTYPE, nppix);
}
QMALLOC(psfmasks, double *, npsfmax);
QMALLOC(psfmaskx, double *, npsfmax);
QMALLOC(psfmasky, double *, npsfmax);
QMALLOC(psfmasks, float *, npsfmax);
QMALLOC(psfmaskx, float *, npsfmax);
QMALLOC(psfmasky, float *, npsfmax);
for (i=0; i<npsfmax; i++)
{
QMALLOC(psfmasks[i], double, npix);
QMALLOC(psfmaskx[i], double, npix);
QMALLOC(psfmasky[i], double, npix);
QMALLOC(psfmasks[i], float, npix);
QMALLOC(psfmaskx[i], float, npix);
QMALLOC(psfmasky[i], float, npix);
}
copyimage(field, datah, width, height, ix, iy);
......@@ -637,12 +636,8 @@ void psf_fit(psfstruct *psf, picstruct *field, picstruct *wfield,
for (j=0; j<npsf; j++)
{
vignet_resample(psf->maskloc, psf->masksize[0], psf->masksize[1],
checkdata, pwidth, pheight,
checkmask, pwidth, pheight,
-deltax[j]*pixstep, -deltay[j]*pixstep, pixstep);
cpix = checkmask;
d = checkdata;
for (p=nppix; p--;)
*(cpix++) = (PIXTYPE)*(d++);
if ((check = prefs.check[CHECK_SUBPSFPROTOS]))
addcheck(check, checkmask, pwidth,pheight, ix,iy,-flux[j]);
if ((check = prefs.check[CHECK_PSFPROTOS]))
......@@ -717,7 +712,6 @@ void psf_fit(psfstruct *psf, picstruct *field, picstruct *wfield,
|| prefs.check[CHECK_SUBPCPROTOS] || prefs.check[CHECK_PCPROTOS]
|| prefs.check[CHECK_PCOPROTOS])
{
QFREE(checkdata);
QFREE(checkmask);
}
......@@ -740,16 +734,16 @@ void double_psf_fit(psfstruct *ppsf, picstruct *pfield, picstruct *pwfield,
pdeltay[PSF_NPSFMAX],psol[PSF_NPSFMAX], pcovmat[PSF_NPSFMAX*PSF_NPSFMAX],
pvmat[PSF_NPSFMAX*PSF_NPSFMAX], pwmat[PSF_NPSFMAX],pflux[PSF_NPSFMAX];
double **ppsfmasks, **ppsfmaskx,**ppsfmasky,
*pmat, *checkdata,
*pdata, *pdata2, *pdata3,
*pm,*pd, *pw, *pps,*pweight,/* *pps, *px, *py,*/
double *pmat,
*pm, /* *pps, *px, *py,*/
dx,dy,pdx,pdy, /* x1,y1, mx,my,mflux, */
val, ppix,ppix2, /* dflux, */
gain, radmin2,radmax2,satlevel
,chi2,pwthresh,pbacknoise2, /* mr, */
r2=0, psf_fwhm,ppsf_fwhm ;
float *pdh, *pwh, pixstep,ppixstep;
float **ppsfmasks, **ppsfmaskx,**ppsfmasky, *pps;
float *pdata, *pdata2, *pdata3, *pweight, *pd, *pw,
*pdh, *pwh, pixstep,ppixstep;
PIXTYPE *pdatah, *pweighth;
int i,j,k,p, npsf, npix,ix,iy,
width, height, /* hw,hh, */
......@@ -759,7 +753,7 @@ void double_psf_fit(psfstruct *ppsf, picstruct *pfield, picstruct *pwfield,
double *pvar;
static obj2struct *obj2 = &outobj2;
checkdata = NULL; /* To avoid gcc -Wall warnings */
pdx = pdy =dx = dy = 0.0;
ppixstep = 1.0/ppsf->pixstep;
pixstep = 1.0/psf->pixstep;
......@@ -801,23 +795,23 @@ void double_psf_fit(psfstruct *ppsf, picstruct *pfield, picstruct *pwfield,
psf_fit(psf,field, wfield,obj);
npsf=thepsfit->npsf;
QMALLOC(ppsfmasks,double *,npsfmax);
QMALLOC(ppsfmaskx,double *,npsfmax);
QMALLOC(ppsfmasky,double *,npsfmax);
QMALLOC(ppsfmasks,float *,npsfmax);
QMALLOC(ppsfmaskx,float *,npsfmax);
QMALLOC(ppsfmasky,float *,npsfmax);
for (i=0; i<npsfmax; i++)
{
QMALLOC(ppsfmasks[i],double,npix);
QMALLOC(ppsfmaskx[i],double,npix);
QMALLOC(ppsfmasky[i],double,npix);
QMALLOC(ppsfmasks[i],float,npix);
QMALLOC(ppsfmaskx[i],float,npix);
QMALLOC(ppsfmasky[i],float,npix);
}
QMALLOC(pweighth, PIXTYPE, npix);
QMALLOC(pweight, double, npix);
QMALLOC(pweight, float, npix);
QMALLOC(pdatah, PIXTYPE, npix);
QMALLOC(pdata, double, npix);
QMALLOC(pdata2, double, npix);
QMALLOC(pdata3, double, npix);
QMALLOC(pdata, float, npix);
QMALLOC(pdata2, float, npix);
QMALLOC(pdata3, float, npix);
QMALLOC(pmat, double, npix*npsfmax);
for (j=0; j<npsf; j++)
......@@ -1007,7 +1001,6 @@ void double_psf_fit(psfstruct *ppsf, picstruct *pfield, picstruct *pwfield,
|| prefs.check[CHECK_SUBPCPROTOS] || prefs.check[CHECK_PCPROTOS]
|| prefs.check[CHECK_PCOPROTOS])
{
QFREE(checkdata);
QFREE(checkmask);
}
return;
......@@ -1027,7 +1020,7 @@ void psf_build(psfstruct *psf)
npix = psf->masksize[0]*psf->masksize[1];
/* Reset the Local PSF mask */
memset(psf->maskloc, 0, npix*sizeof(double));
memset(psf->maskloc, 0, npix*sizeof(float));
/* Grab the context vector */
ndim = psf->poly->ndim;
......@@ -1056,12 +1049,12 @@ void psf_build(psfstruct *psf)
/*****************************compute_gradient*********************************/
double *compute_gradient(double *weight,int width, int height,
double *masks,double *maskx,double *masky
double *compute_gradient(float *weight,int width, int height,
float *masks,float *maskx,float *masky
,double *m)
{
int x,y;
double *w,*ps,*px,*py;
float *w, *ps,*px,*py;
/*------ copy of the (weighted) PSF, with outer ring set to zero */
ps = masks;
......@@ -1090,12 +1083,12 @@ double *compute_gradient(double *weight,int width, int height,
/*****************************compute_gradient_phot*****************************
****/
double *compute_gradient_phot(double *pweight,int width, int height,
double *pmasks,double *pm)
double *compute_gradient_phot(float *pweight,int width, int height,
float *pmasks,double *pm)
{
int x,y;
double *pw,*pps;
float *pw, *pps;
/*------ copy of the (weighted) PSF, with outer ring set to zero */
pps = pmasks;
......@@ -1245,7 +1238,7 @@ General least-square fit A.x = b, based on Singular Value Decomposition (SVD).
Loosely adapted from Numerical Recipes in C, 2nd Ed. (p. 671).
Note: the a and v matrices are transposed with respect to the N.R. convention.
*/
void svdfit(double *a, double *b, int m, int n, double *sol,
void svdfit(double *a, float *b, int m, int n, double *sol,
double *vmat, double *wmat)
{
#define MAX(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ?\
......@@ -1262,7 +1255,8 @@ void svdfit(double *a, double *b, int m, int n, double *sol,
at,bt,ct,maxarg1,maxarg2,
thresh, wmax,
*w,*ap,*ap0,*ap1,*ap10,*rv1p,*vp,*vp0,*vp1,*vp10,
*bp,*tmpp, *rv1,*tmp;
*tmpp, *rv1,*tmp;
float *bp;
anorm = g = scale = 0.0;
if (m < n)
......
......@@ -10,7 +10,7 @@
*
* Contents: Include file for psffit.c.
*
* Last modify: 12/01/2006
* Last modify: 13/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -54,10 +54,10 @@ typedef struct pc
int *omasksize; /* PC mask dimensions */
int omasknpix; /* Total number of involved PC pixels */
float *omaskcomp; /* Original pix data (principal components) */
double *maskcurr; /* Current model */
double *mx2,*my2,*mxy; /* 2nd order moments for each component */
double *flux; /* Flux of each component */
double *bt; /* B/T for each component */
float *maskcurr; /* Current model */
float *mx2,*my2,*mxy; /* 2nd order moments for each component */
float *flux; /* Flux of each component */
float *bt; /* B/T for each component */
codestruct *code;
} pcstruct;
......@@ -104,21 +104,21 @@ extern void compute_pos(int *pnpsf,int *pconvflag,int *pnpsfflag,
psf_build(psfstruct *psf),
psf_end(psfstruct *psf, psfitstruct *psfit),
psf_init(psfstruct *psf),
svdfit(double *a, double *b, int m, int n, double *sol,
svdfit(double *a, float *b, int m, int n, double *sol,
double *vmat, double *wmat),
svdvar(double *vmat, double *wmat, int n, double *covmat);
extern double *compute_gradient (double *weight,int width, int height,
double *masks, double *maskx, double *masky,
extern double *compute_gradient (float *weight,int width, int height,
float *masks, float *maskx, float *masky,
double *mat),
*compute_gradient_phot(double *weight,int width, int height,
double *masks, double *pm);
*compute_gradient_phot(float *weight,int width, int height,
float *masks, double *pm);
extern psfstruct *psf_load(char *filename);
extern void pc_end(pcstruct *pc),
pc_fit(psfstruct *psf, double *data, double *weight,
int width, int height, int ix, int iy, double dx, double dy,
pc_fit(psfstruct *psf, float *data, float *weight,
int width, int height, int ix, int iy, float dx, float dy,
int npc, float backrms),
double_psf_fit(psfstruct *psf, picstruct *field,
picstruct *wfield, objstruct *obj,
......
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