diff --git a/configure b/configure index 1a1c3f67f76e24b9a44fcadf9bbe0be4ef0b0963..76a7dc9a6cd7e5d3d6d951221a0c29f532c26efd 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for sextractor 2.18.3. +# Generated by GNU Autoconf 2.68 for sextractor 2.18.4. # # Report bugs to . # @@ -570,8 +570,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sextractor' PACKAGE_TARNAME='sextractor' -PACKAGE_VERSION='2.18.3' -PACKAGE_STRING='sextractor 2.18.3' +PACKAGE_VERSION='2.18.4' +PACKAGE_STRING='sextractor 2.18.4' PACKAGE_BUGREPORT='bertin@iap.fr' PACKAGE_URL='' @@ -1324,7 +1324,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sextractor 2.18.3 to adapt to many kinds of systems. +\`configure' configures sextractor 2.18.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1394,7 +1394,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sextractor 2.18.3:";; + short | recursive ) echo "Configuration of sextractor 2.18.4:";; esac cat <<\_ACEOF @@ -1524,7 +1524,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sextractor configure 2.18.3 +sextractor configure 2.18.4 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1947,7 +1947,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sextractor $as_me 2.18.3, which was +It was created by sextractor $as_me 2.18.4, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2752,7 +2752,7 @@ fi # Define the identity of the package. PACKAGE='sextractor' - VERSION='2.18.3' + VERSION='2.18.4' cat >>confdefs.h <<_ACEOF @@ -15509,7 +15509,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sextractor $as_me 2.18.3, which was +This file was extended by sextractor $as_me 2.18.4, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15575,7 +15575,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sextractor config.status 2.18.3 +sextractor config.status 2.18.4 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index e9bc4dfb7642462285d0b8a31a80ceda4d4f986b..0df2a5056f4fc039fc0d937414961cae3e9a4336 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ # You should have received a copy of the GNU General Public License # along with SExtractor. If not, see . # -# Last modified: 19/07/2012 +# Last modified: 23/09/2012 # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],) define([AC_CACHE_SAVE],) # This is your standard Bertin source code... -AC_INIT(sextractor, 2.18.3, [bertin@iap.fr]) +AC_INIT(sextractor, 2.18.4, [bertin@iap.fr]) AC_CONFIG_SRCDIR(src/makeit.c) AC_CONFIG_AUX_DIR(autoconf) AC_CONFIG_HEADERS(config.h) diff --git a/man/sex.1 b/man/sex.1 index 5ee05b0093d2a51b79e359c54093908072bf30c5..2b3834d13a559fc42719eef15f3c7fbf2c9153aa 100644 --- a/man/sex.1 +++ b/man/sex.1 @@ -1,4 +1,4 @@ -.TH SEXTRACTOR "1" "July 2012" "SExtractor 2.18.3" "User Commands" +.TH SEXTRACTOR "1" "September 2012" "SExtractor 2.18.4" "User Commands" .SH NAME sex \- extract a source catalogue from an astronomical FITS image .SH SYNOPSIS diff --git a/src/fits/fitscat.c b/src/fits/fitscat.c index 9c31a694eceacb0a9a273eabb02b653b8bb190d7..cd90e248388a61d627eae6d375440988ac187fc6 100644 --- a/src/fits/fitscat.c +++ b/src/fits/fitscat.c @@ -7,7 +7,7 @@ * * This file part of: AstrOmatic FITS/LDAC library * -* Copyright: (C) 1995-2010 Emmanuel Bertin -- IAP/CNRS/UPMC +* Copyright: (C) 1995-2012 Emmanuel Bertin -- IAP/CNRS/UPMC * * License: GNU General Public License * @@ -23,7 +23,7 @@ * along with AstrOmatic software. * If not, see . * -* Last modified: 09/10/2010 +* Last modified: 29/08/2012 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -386,16 +386,16 @@ catstruct *new_cat(int ncat) /****** open_cat *************************************************************** -PROTO int open_cat(catstruct *cat, access_type at) +PROTO int open_cat(catstruct *cat, access_type_t at) PURPOSE Open a FITS catalog with name filename. INPUT catalog structure, access type (can be WRITE_ONLY or READ_ONLY). OUTPUT RETURN_OK if the cat is found, RETURN_ERROR otherwise. NOTES If the file was already opened by this catalog, nothing is done. AUTHOR E. Bertin (IAP & Leiden observatory) -VERSION 13/06/2002 +VERSION 29/08/2012 ***/ -int open_cat(catstruct *cat, access_type at) +int open_cat(catstruct *cat, access_type_t at) { diff --git a/src/fits/fitscat.h b/src/fits/fitscat.h index 83b497d74f27cceec8f97066fa4e436b98e3e804..41ebb722d7e713ab21995d201f7fbece3def2811 100644 --- a/src/fits/fitscat.h +++ b/src/fits/fitscat.h @@ -23,7 +23,7 @@ * along with AstrOmatic software. * If not, see . * -* Last modified: 16/06/2012 +* Last modified: 29/08/2012 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -87,7 +87,7 @@ typedef enum {T_BYTE, T_SHORT, T_LONG, T_LONGLONG, T_FLOAT, T_DOUBLE, T_STRING} t_type; /* Type of data */ typedef enum {WRITE_ONLY, READ_ONLY} - access_type; /* Type of access */ + access_type_t; /* Type of access */ typedef enum {SHOW_ASCII, SHOW_SKYCAT} output_type; /* Type of output */ @@ -149,7 +149,7 @@ typedef struct structcat FILE *file; /* pointer to the file structure */ struct structtab *tab; /* pointer to the first table */ int ntab; /* number of tables included */ - access_type access_type; /* READ_ONLY or WRITE_ONLY */ + access_type_t access_type; /* READ_ONLY or WRITE_ONLY */ } catstruct; /*-------------------------------- table ----------------------------------*/ @@ -293,7 +293,7 @@ extern int about_cat(catstruct *cat, FILE *stream), inherit_cat(catstruct *catin, catstruct *catout), init_cat(catstruct *cat), map_cat(catstruct *cat), - open_cat(catstruct *cat, access_type at), + open_cat(catstruct *cat, access_type_t at), pad_tab(catstruct *cat, KINGSIZE_T size), prim_head(tabstruct *tab), readbintabparam_head(tabstruct *tab), diff --git a/src/fits/fitshead.c b/src/fits/fitshead.c index 42acbae0e8e79b8fe640a04291fcf2a5a5159211..45c203692a9f49a87ad838f3a2db1607b19e4738 100644 --- a/src/fits/fitshead.c +++ b/src/fits/fitshead.c @@ -23,7 +23,7 @@ * along with AstrOmatic software. * If not, see . * -* Last modified: 18/07/2012 +* Last modified: 29/08/2012 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -706,16 +706,15 @@ INPUT TFORM string (see the FITS documentation). OUTPUT size in bytes, or RETURN_ERROR if the TFORM is unknown. NOTES -. AUTHOR E. Bertin (IAP) -VERSION 18/07/2012 +VERSION 29/08/2012 ***/ t_type ttypeof(char *str) { char *str2; - long dummy; str2 = str; - dummy = strtol(str, &str2, 10); + strtol(str, &str2, 10); switch ((int)*str2) { case 'L': case 'B': case 'X': return T_BYTE; diff --git a/src/fits/fitstab.c b/src/fits/fitstab.c index e1c600dd5794629704affe251d76c7efa5a90a36..5919b2a22695f25b82c1c1f1054849179c3b8e23 100644 --- a/src/fits/fitstab.c +++ b/src/fits/fitstab.c @@ -23,7 +23,7 @@ * along with AstrOmatic software. * If not, see . * -* Last modified: 09/10/2010 +* Last modified: 11/09/2012 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -570,7 +570,7 @@ INPUT Table structure. OUTPUT RETURN_OK if tab is a binary table, or RETURN_ERROR otherwise. NOTES The headbuf pointer in the catstruct might be reallocated. AUTHOR E. Bertin (IAP & Leiden observatory) -VERSION 08/02/97 +VERSION 11/09/2012 ***/ int update_tab(tabstruct *tab) @@ -613,7 +613,7 @@ int update_tab(tabstruct *tab) key = key->nextkey; } - tab->tabsize = nobj*nbytes; + tab->tabsize = (KINGSIZE_T)nobj*nbytes; tab->naxisn[0] = nbytes; tab->naxisn[1] = nobj; tab->tfields = tab->nkey; diff --git a/src/fits/fitswrite.c b/src/fits/fitswrite.c index f01692eee1a0c94379cbf9ddf6ac3d41022c2d39..4c30cc85003ef955def62891456a262f7df4070a 100644 --- a/src/fits/fitswrite.c +++ b/src/fits/fitswrite.c @@ -23,7 +23,7 @@ * along with AstrOmatic software. * If not, see . * -* Last modified: 13/06/2012 +* Last modified: 27/08/2012 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -313,9 +313,9 @@ PURPOSE Write one individual source in a FITS table INPUT Table structure, pointer to the temporary buffer. OUTPUT -. -NOTES -. +NOTES key content is destroyed (actually, byte-swapped) on output. AUTHOR E. Bertin (IAP & Leiden observatory) -VERSION 28/12/2004 +VERSION 27/08/2012 ***/ int write_obj(tabstruct *tab, char *buf) diff --git a/src/profit.c b/src/profit.c index 20384366341a3b5f1030323f1bb44a7d3e8b1d78..bd21c603bbca670d0d333c410c0a83e324aaa333 100644 --- a/src/profit.c +++ b/src/profit.c @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with SExtractor. If not, see . * -* Last modified: 12/07/2012 +* Last modified: 23/09/2012 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -1816,7 +1816,7 @@ INPUT Profile-fitting structure, OUTPUT RETURN_ERROR if the rasters don't overlap, RETURN_OK otherwise. NOTES -. AUTHOR E. Bertin (IAP) -VERSION 12/09/2010 +VERSION 23/09/2012 ***/ int profit_resample(profitstruct *profit, float *inpix, PIXTYPE *outpix, float factor) @@ -1825,20 +1825,23 @@ int profit_resample(profitstruct *profit, float *inpix, PIXTYPE *outpix, float *pixin,*pixin0, *mask,*maskt, *pixinout, *dpixin,*dpixin0, *dpixout,*dpixout0, *dx,*dy, xcin,xcout,ycin,ycout, xsin,ysin, xin,yin, x,y, dxm,dym, val, - invpixstep, norm; + invpixstep, norm, fluxnorm; int *start,*startt, *nmask,*nmaskt, i,j,k,n,t, ixsout,iysout, ixout,iyout, dixout,diyout, nxout,nyout, iysina, nyin, hmw,hmh, ix,iy, ixin,iyin; invpixstep = profit->subsamp/profit->pixstep; + factor /= profit->subsamp*profit->subsamp; - xcin = (profit->modnaxisn[0]/2); - xcout = (float)(profit->objnaxisn[0]/2); - if ((dx=(profit->paramlist[PARAM_X]))) - xcout += *dx; + xcin = (float)(profit->modnaxisn[0]/2); + xcout = ((int)(profit->subsamp*profit->objnaxisn[0])/2 + 0.5) + / profit->subsamp - 0.5; + if ((dx=profit->paramlist[PARAM_X])) + xcout += *dx / profit->subsamp; xsin = xcin - xcout*invpixstep; /* Input start x-coord*/ + if ((int)xsin >= profit->modnaxisn[0]) return RETURN_ERROR; ixsout = 0; /* Int. part of output start x-coord */ @@ -1858,10 +1861,11 @@ int profit_resample(profitstruct *profit, float *inpix, PIXTYPE *outpix, if (!nxout) return RETURN_ERROR; - ycin = (profit->modnaxisn[1]/2); - ycout = (float)(profit->objnaxisn[1]/2); - if ((dy=(profit->paramlist[PARAM_Y]))) - ycout += *dy; + ycin = (float)(profit->modnaxisn[1]/2); + ycout = ((int)(profit->subsamp*profit->objnaxisn[1])/2 + 0.5) + / profit->subsamp - 0.5; + if ((dy=profit->paramlist[PARAM_Y])) + ycout += *dy / profit->subsamp; ysin = ycin - ycout*invpixstep; /* Input start y-coord*/ if ((int)ysin >= profit->modnaxisn[1])