Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
msc
sextractor
Commits
572b27d7
Unverified
Commit
572b27d7
authored
Feb 25, 2023
by
Emmanuel Bertin
Committed by
GitHub
Feb 25, 2023
Browse files
Merge pull request #42 from astromatic/icx
Icx
parents
9689a1c4
cd937f43
Changes
27
Show whitespace changes
Inline
Side-by-side
src/fits/fitsmisc.c
View file @
572b27d7
...
@@ -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: 0
9
/1
0
/201
0
* Last modified:
2
0/1
1
/201
3
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include
"fitscat_defs.h"
#include
"fitscat_defs.h"
#include
"fitscat.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
char
warning_historystr
[
WARNING_NMAX
][
192
]
=
{
""
};
static
int
nwarning
=
0
,
nwarning_history
=
0
,
nerror
=
0
;
static
int
nwarning
=
0
,
nwarning_history
=
0
,
nerror
=
0
;
...
@@ -48,7 +48,7 @@ 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!
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
);
fprintf
(
stderr
,
"
\n
> %s%s
\n\n
"
,
msg1
,
msg2
);
if
(
num
&&
errorfunc
&&
!
nerror
)
if
(
num
&&
errorfunc
&&
!
nerror
)
...
@@ -64,7 +64,7 @@ void error(int num, char *msg1, char *msg2)
...
@@ -64,7 +64,7 @@ void error(int num, char *msg1, char *msg2)
/*
/*
I hope it will never be used!
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
)
if
(
func
)
errorfunc
=
func
;
errorfunc
=
func
;
...
...
src/fits/fitswrite.c
View file @
572b27d7
...
@@ -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:
11
/0
2
/2020
* Last modified:
26
/0
8
/2020
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...
@@ -359,13 +359,13 @@ INPUT catalog structure,
...
@@ -359,13 +359,13 @@ INPUT catalog structure,
OUTPUT -.
OUTPUT -.
NOTES -.
NOTES -.
AUTHOR E. Bertin (IAP & Leiden observatory)
AUTHOR E. Bertin (IAP & Leiden observatory)
VERSION
26/09/2004
VERSION
03/12/2019
***/
***/
void
end_writeobj
(
catstruct
*
cat
,
tabstruct
*
tab
,
char
*
buf
)
void
end_writeobj
(
catstruct
*
cat
,
tabstruct
*
tab
,
char
*
buf
)
{
{
keystruct
*
key
;
keystruct
*
key
;
OFF_T
pos
;
OFF_T
2
pos
;
int
k
;
int
k
;
/* Make the table parameters reflect its content*/
/* Make the table parameters reflect its content*/
...
...
src/globals.h
View file @
572b27d7
...
@@ -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:
15
/0
7
/2020
* Last modified:
23
/0
9
/2020
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...
@@ -82,7 +82,7 @@ extern void alloccatparams(void),
...
@@ -82,7 +82,7 @@ extern void alloccatparams(void),
updateparamflags
(
void
),
updateparamflags
(
void
),
useprefs
(
void
),
useprefs
(
void
),
writecat
(
int
,
objliststruct
*
),
writecat
(
int
,
objliststruct
*
),
write_error
(
char
*
msg1
,
char
*
msg2
),
write_error
(
const
char
*
msg1
,
const
char
*
msg2
),
write_vo_fields
(
FILE
*
file
),
write_vo_fields
(
FILE
*
file
),
zerocat
(
void
);
zerocat
(
void
);
...
...
src/header.c
View file @
572b27d7
...
@@ -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/07
/20
1
2
* Last modified:
07/09
/20
2
2
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...
@@ -49,7 +49,7 @@ INPUT Name of the ASCII file,
...
@@ -49,7 +49,7 @@ INPUT Name of the ASCII file,
OUTPUT RETURN_OK if the file was found, RETURN_ERROR otherwise.
OUTPUT RETURN_OK if the file was found, RETURN_ERROR otherwise.
NOTES -.
NOTES -.
AUTHOR E. Bertin (IAP)
AUTHOR E. Bertin (IAP)
VERSION
12/07
/20
1
2
VERSION
07/09
/20
2
2
***/
***/
int
read_aschead
(
char
*
filename
,
int
frameno
,
tabstruct
*
tab
)
int
read_aschead
(
char
*
filename
,
int
frameno
,
tabstruct
*
tab
)
{
{
...
@@ -63,7 +63,7 @@ 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 */
/*- Skip previous ENDs in multi-FITS extension headers */
for
(
i
=
frameno
-
1
;
i
--
;)
for
(
i
=
frameno
-
1
;
i
--
;)
while
(
fgets
(
str
,
MAXCHAR
,
file
)
while
(
fgets
(
str
,
88
,
file
)
&&
strncmp
(
str
,
"END "
,
4
)
&&
strncmp
(
str
,
"END "
,
4
)
&&
strncmp
(
str
,
"END
\n
"
,
4
));
&&
strncmp
(
str
,
"END
\n
"
,
4
));
memset
(
str
,
' '
,
80
);
memset
(
str
,
' '
,
80
);
...
...
src/makeit.c
View file @
572b27d7
...
@@ -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:
15
/0
7
/2020
* Last modified:
23
/0
9
/2020
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...
@@ -43,7 +43,9 @@
...
@@ -43,7 +43,9 @@
#include
"assoc.h"
#include
"assoc.h"
#include
"back.h"
#include
"back.h"
#include
"check.h"
#include
"check.h"
#ifdef USE_MODEL
#include
"fft.h"
#include
"fft.h"
#endif
#include
"field.h"
#include
"field.h"
#include
"filter.h"
#include
"filter.h"
#include
"growth.h"
#include
"growth.h"
...
@@ -282,6 +284,9 @@ void makeit()
...
@@ -282,6 +284,9 @@ void makeit()
if
((
imatab
->
naxis
<
2
)
if
((
imatab
->
naxis
<
2
)
||
!
strncmp
(
imatab
->
xtension
,
"BINTABLE"
,
8
)
||
!
strncmp
(
imatab
->
xtension
,
"BINTABLE"
,
8
)
||
!
strncmp
(
imatab
->
xtension
,
"ASCTABLE"
,
8
))
||
!
strncmp
(
imatab
->
xtension
,
"ASCTABLE"
,
8
))
#ifdef HAVE_CFITSIO
if
(
!
imatab
->
isTileCompressed
)
#endif
continue
;
continue
;
next
++
;
next
++
;
}
}
...
@@ -321,8 +326,10 @@ void makeit()
...
@@ -321,8 +326,10 @@ void makeit()
if
(
!
forcextflag
&&
((
imatab
->
naxis
<
2
)
if
(
!
forcextflag
&&
((
imatab
->
naxis
<
2
)
||
!
strncmp
(
imatab
->
xtension
,
"BINTABLE"
,
8
)
||
!
strncmp
(
imatab
->
xtension
,
"BINTABLE"
,
8
)
||
!
strncmp
(
imatab
->
xtension
,
"ASCTABLE"
,
8
)))
||
!
strncmp
(
imatab
->
xtension
,
"ASCTABLE"
,
8
)))
#ifdef HAVE_CFITSIO
if
(
!
imatab
->
isTileCompressed
)
#endif
continue
;
continue
;
nok
++
;
nok
++
;
/*-- Initial time measurement*/
/*-- Initial time measurement*/
...
@@ -707,7 +714,7 @@ OUTPUT Extension number, or RETURN_ERROR if nos extension specified.
...
@@ -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
NOTES The bracket and its extension number are removed from the filename if
found.
found.
AUTHOR E. Bertin (IAP)
AUTHOR E. Bertin (IAP)
VERSION
08/10
/200
7
VERSION
23/09
/20
2
0
***/
***/
static
int
selectext
(
char
*
filename
)
static
int
selectext
(
char
*
filename
)
{
{
...
@@ -720,6 +727,11 @@ static int selectext(char *filename)
...
@@ -720,6 +727,11 @@ static int selectext(char *filename)
if
((
bracr
=
strrchr
(
bracl
+
1
,
']'
)))
if
((
bracr
=
strrchr
(
bracl
+
1
,
']'
)))
*
bracr
=
'\0'
;
*
bracr
=
'\0'
;
next
=
strtol
(
bracl
+
1
,
NULL
,
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
;
return
next
;
}
}
...
@@ -735,9 +747,9 @@ INPUT a character string,
...
@@ -735,9 +747,9 @@ INPUT a character string,
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
NOTES -.
NOTES -.
AUTHOR E. Bertin (IAP)
AUTHOR E. Bertin (IAP)
VERSION
14
/0
7
/200
6
VERSION
23
/0
9
/20
2
0
***/
***/
void
write_error
(
char
*
msg1
,
char
*
msg2
)
void
write_error
(
const
char
*
msg1
,
const
char
*
msg2
)
{
{
char
error
[
MAXCHAR
];
char
error
[
MAXCHAR
];
...
...
src/readimage.c
View file @
572b27d7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
* This file part of: SExtractor
* This file part of: SExtractor
*
*
* Copyright: (C) 1993-20
15 Emmanuel Bertin --
IAP/CNRS/
UPMC
* Copyright: (C) 1993-20
20
IAP/CNRS/
SorbonneU
*
*
* 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
/0
1
/20
15
* Last modified:
23
/0
9
/20
20
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...
@@ -93,7 +93,12 @@ void *loadstrip(picstruct *field, picstruct *wfield)
...
@@ -93,7 +93,12 @@ void *loadstrip(picstruct *field, picstruct *wfield)
else
if
(
flags
&
INTERP_FIELD
)
else
if
(
flags
&
INTERP_FIELD
)
copydata
(
field
,
0
,
nbpix
);
copydata
(
field
,
0
,
nbpix
);
else
else
{
#ifdef HAVE_CFITSIO
tab
->
currentElement
=
1
;
#endif
read_body
(
tab
,
data
,
nbpix
);
read_body
(
tab
,
data
,
nbpix
);
}
if
(
flags
&
(
WEIGHT_FIELD
|
RMS_FIELD
|
BACKRMS_FIELD
|
VAR_FIELD
))
if
(
flags
&
(
WEIGHT_FIELD
|
RMS_FIELD
|
BACKRMS_FIELD
|
VAR_FIELD
))
weight_to_var
(
field
,
data
,
nbpix
);
weight_to_var
(
field
,
data
,
nbpix
);
if
((
flags
&
MEASURE_FIELD
)
&&
(
check
=
prefs
.
check
[
CHECK_IDENTICAL
]))
if
((
flags
&
MEASURE_FIELD
)
&&
(
check
=
prefs
.
check
[
CHECK_IDENTICAL
]))
...
...
src/types.h
View file @
572b27d7
...
@@ -621,7 +621,7 @@ typedef struct pic
...
@@ -621,7 +621,7 @@ typedef struct pic
int
interp_xtimeout
;
/* interpolation timeout value in x */
int
interp_xtimeout
;
/* interpolation timeout value in x */
int
interp_ytimeout
;
/* interpolation timeout value in y */
int
interp_ytimeout
;
/* interpolation timeout value in y */
struct
pic
*
reffield
;
/* pointer to a reference field */
struct
pic
*
reffield
;
/* pointer to a reference field */
OFF_T
mefpos
;
/* Position in a MEF file */
OFF_T
2
mefpos
;
/* Position in a MEF file */
}
picstruct
;
}
picstruct
;
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment