Unverified Commit 572b27d7 authored by Emmanuel Bertin's avatar Emmanuel Bertin Committed by GitHub
Browse files

Merge pull request #42 from astromatic/icx

Icx
parents 9689a1c4 cd937f43
......@@ -23,7 +23,7 @@
* along with AstrOmatic software.
* If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 09/10/2010
* Last modified: 20/11/2013
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -40,7 +40,7 @@
#include "fitscat_defs.h"
#include "fitscat.h"
static void (*errorfunc)(char *msg1, char *msg2) = NULL;
static void (*errorfunc)(const char *msg1, const char *msg2) = NULL;
static char warning_historystr[WARNING_NMAX][192]={""};
static int nwarning = 0, nwarning_history = 0, nerror = 0;
......@@ -48,7 +48,7 @@ static int nwarning = 0, nwarning_history = 0, nerror = 0;
/*
I hope it will never be used!
*/
void error(int num, char *msg1, char *msg2)
void error(int num, const char *msg1, const char *msg2)
{
fprintf(stderr, "\n> %s%s\n\n",msg1,msg2);
if (num && errorfunc && !nerror)
......@@ -64,7 +64,7 @@ void error(int num, char *msg1, char *msg2)
/*
I hope it will never be used!
*/
void error_installfunc(void (*func)(char *msg1, char *msg2))
void error_installfunc(void (*func)(const char *msg1, const char *msg2))
{
if (func)
errorfunc = func;
......
......@@ -23,7 +23,7 @@
* along with AstrOmatic software.
* If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 11/02/2020
* Last modified: 26/08/2020
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -359,13 +359,13 @@ INPUT catalog structure,
OUTPUT -.
NOTES -.
AUTHOR E. Bertin (IAP & Leiden observatory)
VERSION 26/09/2004
VERSION 03/12/2019
***/
void end_writeobj(catstruct *cat, tabstruct *tab, char *buf)
{
keystruct *key;
OFF_T pos;
OFF_T2 pos;
int k;
/* Make the table parameters reflect its content*/
......
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 15/07/2020
* Last modified: 23/09/2020
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -82,7 +82,7 @@ extern void alloccatparams(void),
updateparamflags(void),
useprefs(void),
writecat(int, objliststruct *),
write_error(char *msg1, char *msg2),
write_error(const char *msg1, const char *msg2),
write_vo_fields(FILE *file),
zerocat(void);
......
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 12/07/2012
* Last modified: 07/09/2022
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -49,7 +49,7 @@ INPUT Name of the ASCII file,
OUTPUT RETURN_OK if the file was found, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 12/07/2012
VERSION 07/09/2022
***/
int read_aschead(char *filename, int frameno, tabstruct *tab)
{
......@@ -63,7 +63,7 @@ int read_aschead(char *filename, int frameno, tabstruct *tab)
{
/*- Skip previous ENDs in multi-FITS extension headers */
for (i=frameno-1; i--;)
while (fgets(str, MAXCHAR, file)
while (fgets(str, 88, file)
&& strncmp(str,"END ",4)
&& strncmp(str,"END\n",4));
memset(str, ' ', 80);
......
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 15/07/2020
* Last modified: 23/09/2020
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -43,7 +43,9 @@
#include "assoc.h"
#include "back.h"
#include "check.h"
#ifdef USE_MODEL
#include "fft.h"
#endif
#include "field.h"
#include "filter.h"
#include "growth.h"
......@@ -282,7 +284,10 @@ void makeit()
if ((imatab->naxis < 2)
|| !strncmp(imatab->xtension, "BINTABLE", 8)
|| !strncmp(imatab->xtension, "ASCTABLE", 8))
continue;
#ifdef HAVE_CFITSIO
if (!imatab->isTileCompressed)
#endif
continue;
next++;
}
}
......@@ -321,8 +326,10 @@ void makeit()
if (!forcextflag && ((imatab->naxis < 2)
|| !strncmp(imatab->xtension, "BINTABLE", 8)
|| !strncmp(imatab->xtension, "ASCTABLE", 8)))
#ifdef HAVE_CFITSIO
if (!imatab->isTileCompressed)
#endif
continue;
nok++;
/*-- Initial time measurement*/
......@@ -707,7 +714,7 @@ OUTPUT Extension number, or RETURN_ERROR if nos extension specified.
NOTES The bracket and its extension number are removed from the filename if
found.
AUTHOR E. Bertin (IAP)
VERSION 08/10/2007
VERSION 23/09/2020
***/
static int selectext(char *filename)
{
......@@ -720,6 +727,11 @@ static int selectext(char *filename)
if ((bracr=strrchr(bracl+1, ']')))
*bracr = '\0';
next = strtol(bracl+1, NULL, 0);
// VERY BAD HACK to check if this is tile-compressed, if so, add +1 to extension number requested
if (strstr(filename, ".fits.fz") != NULL)
next++;
return next;
}
......@@ -735,9 +747,9 @@ INPUT a character string,
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 14/07/2006
VERSION 23/09/2020
***/
void write_error(char *msg1, char *msg2)
void write_error(const char *msg1, const char *msg2)
{
char error[MAXCHAR];
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 1993-2020 IAP/CNRS/SorbonneU
*
* License: GNU General Public License
*
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 14/01/2015
* Last modified: 23/09/2020
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -93,7 +93,12 @@ void *loadstrip(picstruct *field, picstruct *wfield)
else if (flags & INTERP_FIELD)
copydata(field, 0, nbpix);
else
{
#ifdef HAVE_CFITSIO
tab->currentElement = 1;
#endif
read_body(tab, data, nbpix);
}
if (flags & (WEIGHT_FIELD|RMS_FIELD|BACKRMS_FIELD|VAR_FIELD))
weight_to_var(field, data, nbpix);
if ((flags & MEASURE_FIELD) && (check=prefs.check[CHECK_IDENTICAL]))
......
......@@ -621,7 +621,7 @@ typedef struct pic
int interp_xtimeout; /* interpolation timeout value in x */
int interp_ytimeout; /* interpolation timeout value in y */
struct pic *reffield; /* pointer to a reference field */
OFF_T mefpos; /* Position in a MEF file */
OFF_T2 mefpos; /* Position in a MEF file */
} picstruct;
......
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