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
98adcc78
Commit
98adcc78
authored
Dec 01, 2009
by
Emmanuel Bertin
Browse files
Set XMODEL_IMAGE and YMODEL_IMAGE data types back to double precision (thanks to S.Desai).
Fixed various compilation warnings.
parent
8888bb8d
Changes
14
Hide whitespace changes
Inline
Side-by-side
configure
View file @
98adcc78
...
...
@@ -4447,7 +4447,7 @@ fi
# Override automatic CFLAGS and LDFLAGS with those of user
if test "$enable_auto_flags" = "yes"; then
CFLAGS=""
LDFLAGS
=""
LDFLAGS=""
msg="for C compiler optimization flags"
{ $as_echo "$as_me:$LINENO: checking $msg" >&5
...
...
configure.ac
View file @
98adcc78
...
...
@@ -61,7 +61,7 @@ AC_ISC_POSIX
# Override automatic CFLAGS and LDFLAGS with those of user
if test "$enable_auto_flags" = "yes"; then
CFLAGS=""
LDFLAGS
=""
LDFLAGS=""
ACX_PROG_CC_OPTIM
fi
AC_PROG_LIBTOOL
...
...
man/sex.1
View file @
98adcc78
.TH SEXTRACTOR "1" "
Nov
ember 2009" "SWarp 2.9.9" "User Commands"
.TH SEXTRACTOR "1" "
Dec
ember 2009" "SWarp 2.9.9" "User Commands"
.SH NAME
sex \- extract a source catalog from an astronomical FITS image
.SH SYNOPSIS
...
...
src/analyse.c
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: analyse(), endobject()...: measurements on detections.
*
* Last modify: 01/1
0
/2009
* Last modify: 01/1
2
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -397,6 +397,8 @@ void endobject(picstruct *field, picstruct *dfield, picstruct *wfield,
if
(
FLAG
(
obj2
.
analtime
))
analtime1
=
counter_seconds
();
else
analtime1
=
0
.
0
;
/* To avoid gcc -Wall warnings */
obj
=
&
objlist
->
obj
[
n
];
...
...
src/fft.c
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: Routines dealing with float precision FFT.
*
* Last modify: 1
7
/1
1
/2009
* Last modify:
0
1/1
2
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -133,12 +133,11 @@ OUTPUT -.
NOTES For data1 and fdata2, memory must be allocated for
size[0]* ... * 2*(size[naxis-1]/2+1) floats (padding required).
AUTHOR E. Bertin (IAP)
VERSION 0
8
/1
0
/2009
VERSION 0
1
/1
2
/2009
***/
void
fft_conv
(
float
*
data1
,
float
*
fdata2
,
int
*
size
)
{
fftwf_complex
*
fdata0
;
float
*
fdata1p
,
*
fdata2p
,
*
data0
,
float
*
fdata1p
,
*
fdata2p
,
real
,
imag
,
fac
;
int
i
,
npix
,
npix2
;
...
...
src/fits/fitsbody.c
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: Handle memory allocation for FITS bodies.
*
* Last modify:
02
/11/2009
* Last modify:
19
/11/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -191,7 +191,7 @@ INPUT A pointer to the tab structure,
OUTPUT -.
NOTES .
AUTHOR E. Bertin (IAP)
VERSION
02
/11/2009
VERSION
19
/11/2009
***/
void
read_body
(
tabstruct
*
tab
,
PIXTYPE
*
ptr
,
size_t
size
)
{
...
...
@@ -334,14 +334,14 @@ void read_body(tabstruct *tab, PIXTYPE *ptr, size_t size)
llblank
=
(
LONGLONG
)
tab
->
blank
;
for
(
i
=
spoonful
;
i
--
;
bufdata
+=
sizeof
(
LONGLONG
))
*
(
ptr
++
)
=
((
llval
=
*
((
LONGLONG
*
)
bufdata
))
==
llblank
)
?
-
BIG
:
i
val
*
bs
+
bz
;
-
BIG
:
ll
val
*
bs
+
bz
;
}
else
{
llublank
=
(
ULONGLONG
)
tab
->
blank
;
for
(
i
=
spoonful
;
i
--
;
bufdata
+=
sizeof
(
ULONGLONG
))
*
(
ptr
++
)
=
((
lluval
=
*
((
ULONGLONG
*
)
bufdata
))
==
llublank
)
?
-
BIG
:
i
uval
*
bs
+
bz
;
-
BIG
:
ll
uval
*
bs
+
bz
;
}
}
else
...
...
src/fits/fitsconv.c
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: functions for converting LDAC FITS catalogs.
*
* Last modify:
02
/11/2009
* Last modify:
19
/11/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -133,14 +133,14 @@ INPUT Pointer to element to convert,
OUTPUT -.
NOTES ttypeconv does not yet handle arrays.
AUTHOR E. Bertin (IAP)
VERSION
02
/11/2009
VERSION
19
/11/2009
***/
void
ttypeconv
(
void
*
ptrin
,
void
*
ptrout
,
t_type
ttypein
,
t_type
ttypeout
)
{
union
{
char
tbyte
;
short
tshort
;
int
tlong
;
LONGLONG
tlonglong
;
float
tfloat
;
double
tdouble
;
char
tstring
;}
ival
;
//
union {char tbyte; short tshort; int tlong; LONGLONG tlonglong;
//
float tfloat; double tdouble; char tstring;} ival;
#ifdef HAVE_LONG_LONG_INT
#define OUTCONV(x, y) \
...
...
src/levmar/Axb_core.c
View file @
98adcc78
...
...
@@ -900,7 +900,7 @@ int AX_EQ_B_LU(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m)
__STATIC__
void
*
buf
=
NULL
;
__STATIC__
int
buf_sz
=
0
;
int
a_sz
,
ipiv_sz
,
b_sz
,
work_sz
,
tot_sz
;
int
a_sz
,
ipiv_sz
,
b_sz
,
tot_sz
;
register
int
i
,
j
;
int
info
,
*
ipiv
;
LM_REAL
*
a
,
*
b
;
...
...
src/paramprofit.h
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: Model-fitting parameter list for catalog data.
*
* Last modify: 1
2
/1
0
/2009
* Last modify:
0
1/1
2
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -67,10 +67,10 @@
"phot.mag.sb;stat.mean;stat.fit.param"
,
"mag.arcsec-2"
},
{
"XMODEL_IMAGE"
,
"X coordinate from model-fitting"
,
&
outobj2
.
x_prof
,
H_FLOAT
,
T_
FLOAT
,
"%10.3f"
,
"pixel"
,
&
outobj2
.
x_prof
,
H_FLOAT
,
T_
DOUBLE
,
"%10.3f"
,
"pixel"
,
"pos.cartesian.x;stat.fit.param;instr.det;meta.main"
,
"pix"
},
{
"YMODEL_IMAGE"
,
"Y coordinate from model-fitting"
,
&
outobj2
.
y_prof
,
H_FLOAT
,
T_
FLOAT
,
"%10.3f"
,
"pixel"
,
&
outobj2
.
y_prof
,
H_FLOAT
,
T_
DOUBLE
,
"%10.3f"
,
"pixel"
,
"pos.cartesian.y;stat.fit.param;instr.det;meta.main"
,
"pix"
},
{
"XFOCAL_WORLD"
,
"Fitted position along focal-plane x axis"
,
...
...
src/pattern.c
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: Generate and handle image patterns for image fitting.
*
* Last modify:
18/03
/2009
* Last modify:
01/12
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -394,7 +394,7 @@ INPUT Pointer to pattern structure,
OUTPUT -.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 1
8
/1
1
/2009
VERSION
0
1/1
2
/2009
***/
void
pattern_create
(
patternstruct
*
pattern
,
profitstruct
*
profit
)
{
...
...
@@ -719,7 +719,7 @@ void pattern_create(patternstruct *pattern, profitstruct *profit)
pix
-=
npix
;
pnorm
=
norm
*
sbd
*
sbd
;
norm
=
(
norm
>
0
.
0
?
1
.
0
/
sqrt
(
norm
)
:
1
.
0
);
*
(
normt
++
)
=
pnorm
>
1
.
0
/
BIG
?
norm
0
/
sqrt
(
pnorm
)
:
0
.
0
;
*
(
normt
++
)
=
pnorm
>
1
.
0
/
BIG
?
norm
/
sqrt
(
pnorm
)
:
0
.
0
;
fnorm
=
(
float
)
norm
;
for
(
i
=
npix
;
i
--
;)
*
(
pix
++
)
*=
fnorm
;
...
...
@@ -739,7 +739,7 @@ void pattern_create(patternstruct *pattern, profitstruct *profit)
pix
-=
npix
;
pnorm
=
norm
*
sbd
*
sbd
;
norm
=
(
norm
>
0
.
0
?
1
.
0
/
sqrt
(
norm
)
:
1
.
0
);
*
(
normt
++
)
=
pnorm
>
1
.
0
/
BIG
?
norm
0
/
sqrt
(
pnorm
)
:
0
.
0
;
*
(
normt
++
)
=
pnorm
>
1
.
0
/
BIG
?
norm
/
sqrt
(
pnorm
)
:
0
.
0
;
fnorm
=
(
float
)
norm
;
for
(
i
=
npix
;
i
--
;)
*
(
pix
++
)
*=
fnorm
;
...
...
src/profit.c
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: Fit an arbitrary profile combination to a detection.
*
* Last modify: 1
9
/1
0
/2009
* Last modify:
0
1/1
2
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -173,7 +173,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 1
9
/1
0
/2009
VERSION
0
1/1
2
/2009
***/
void
profit_fit
(
profitstruct
*
profit
,
picstruct
*
field
,
picstruct
*
wfield
,
...
...
@@ -363,14 +363,14 @@ the_gal++;
/*-- Model coordinates follow the FITS convention (first pixel at 1,1) */
if
(
profit
->
paramlist
[
PARAM_X
])
{
obj2
->
x_prof
=
profit
->
ix
+
*
profit
->
paramlist
[
PARAM_X
]
+
1
.
0
;
obj2
->
x_prof
=
(
double
)
profit
->
ix
+
*
profit
->
paramlist
[
PARAM_X
]
+
1
.
0
;
obj2
->
poserrmx2_prof
=
emx2
=
profit
->
covar
[
i
*
(
nparam
+
1
)];
}
else
emx2
=
0
.
0
;
if
(
profit
->
paramlist
[
PARAM_Y
])
{
obj2
->
y_prof
=
profit
->
iy
+
*
profit
->
paramlist
[
PARAM_Y
]
+
1
.
0
;
obj2
->
y_prof
=
(
double
)
profit
->
iy
+
*
profit
->
paramlist
[
PARAM_Y
]
+
1
.
0
;
obj2
->
poserrmy2_prof
=
emy2
=
profit
->
covar
[
j
*
(
nparam
+
1
)];
}
else
...
...
@@ -1319,7 +1319,7 @@ INPUT Pointer to the profit structure,
OUTPUT The number of valid pixels copied.
NOTES Global preferences are used.
AUTHOR E. Bertin (IAP)
VERSION 0
7
/1
0
/2009
VERSION 0
1
/1
2
/2009
***/
int
profit_copyobjpix
(
profitstruct
*
profit
,
picstruct
*
field
,
picstruct
*
wfield
)
...
...
@@ -1328,7 +1328,7 @@ int profit_copyobjpix(profitstruct *profit, picstruct *field,
PIXTYPE
*
pixin
,
*
spixin
,
*
wpixin
,
*
swpixin
,
*
pixout
,
*
wpixout
,
backnoise2
,
invgain
,
satlevel
,
wthresh
,
pix
,
spix
,
wpix
,
swpix
;
int
i
,
x
,
y
,
xmin
,
xmax
,
ymin
,
ymax
,
w
,
h
,
dw
,
npix
,
off
,
gainflag
,
badflag
,
sflag
,
sx
,
sy
,
sn
,
sw
,
rem
,
ix
,
iy
;
badflag
,
sflag
,
sx
,
sy
,
sn
,
sw
,
ix
,
iy
;
/* First put the image background to -BIG */
pixout
=
profit
->
objpix
;
...
...
src/psf.c
View file @
98adcc78
...
...
@@ -10,7 +10,7 @@
*
* Contents: Fit the PSF to a detection.
*
* Last modify:
19/08
/2009
* Last modify:
01/12
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -329,7 +329,7 @@ void psf_fit(psfstruct *psf, picstruct *field, picstruct *wfield,
r2
,
valmax
,
psf_fwhm
;
float
**
psfmasks
,
**
psfmaskx
,
**
psfmasky
,
*
ps
,
*
dh
,
*
wh
,
pixstep
,
fluxerr
;
PIXTYPE
*
datah
,
*
weighth
,
*
cpix
;
PIXTYPE
*
datah
,
*
weighth
;
int
i
,
j
,
p
,
npsf
,
npsfmax
,
npix
,
nppix
,
ix
,
iy
,
niter
,
width
,
height
,
pwidth
,
pheight
,
x
,
y
,
xmax
,
ymax
,
wbad
,
gainflag
,
convflag
,
npsfflag
,
...
...
src/scan.c
View file @
98adcc78
...
...
@@ -10,7 +10,7 @@
* Contents: functions for extraction of connected pixels from
* a pixmap.
*
* Last modify: 01/1
0
/2009
* Last modify: 01/1
2
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -48,7 +48,7 @@ INPUT Measurement field pointer,
OUTPUT -.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 01/1
0
/2009
VERSION 01/1
2
/2009
***/
void
scanimage
(
picstruct
*
field
,
picstruct
*
dfield
,
picstruct
**
pffield
,
int
nffield
,
picstruct
*
wfield
,
picstruct
*
dwfield
)
...
...
@@ -290,14 +290,11 @@ void scanimage(picstruct *field, picstruct *dfield, picstruct **pffield,
else
dscan
=
scan
;
if
(
cdwfield
&&
PLISTEXIST
(
wflag
))
/*------ Copy the previously filtered weight line to track bad pixel limits */
{
}
if
(
prefs
.
filter_flag
)
{
filter
(
cfield
,
cdscan
,
cfield
->
y
);
if
(
cdwfield
)
{
if
(
PLISTEXIST
(
wflag
))
{
if
(
yl
==
0
)
...
...
@@ -311,6 +308,7 @@ void scanimage(picstruct *field, picstruct *dfield, picstruct **pffield,
}
else
filter
(
cdwfield
,
cdwscan
,
yl
);
}
}
else
{
...
...
src/types.h
View file @
98adcc78
...
...
@@ -9,7 +9,7 @@
*
* Contents: global type definitions.
*
* Last modify: 01/1
0
/2009
* Last modify: 01/1
2
/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
...
...
@@ -325,7 +325,7 @@ typedef struct
float
mumax_prof
;
/* Model peak surf. bri. */
float
mueff_prof
;
/* Model effective surf. bri. */
float
mumean_prof
;
/* Mean model effective SB */
float
x_prof
,
y_prof
;
/* Coords from model-fitting*/
double
x_prof
,
y_prof
;
/* Coords from model-fitting*/
double
xf_prof
,
yf_prof
;
/* FOCAL coordinates */
double
xw_prof
,
yw_prof
;
/* WORLD coords */
double
alphas_prof
,
deltas_prof
;
/* native alpha, delta */
...
...
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