Commit 1b0fb5bd authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Added one extra decimal to position measurements in pixel coordinates.

Preliminary implementation of a RESCALE_WEIGHTS configuration switch.
parent c5f7c68f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
.TH SEXTRACTOR "1" "January 2011" "SExtractor 2.13.2" "User Commands"
.TH SEXTRACTOR "1" "March 2011" "SExtractor 2.13.2" "User Commands"
.SH NAME
.SH NAME
sex \- extract a source catalogue from an astronomical FITS image
sex \- extract a source catalogue from an astronomical FITS image
.SH SYNOPSIS
.SH SYNOPSIS
+2 −2
Original line number Original line Diff line number Diff line
@@ -48,7 +48,7 @@
Background maps are established from the images themselves; thus we need to
Background maps are established from the images themselves; thus we need to
make at least one first pass through the data.
make at least one first pass through the data.
*/
*/
void	makeback(picstruct *field, picstruct *wfield)
void	makeback(picstruct *field, picstruct *wfield, int wscale_flag)


  {
  {
   backstruct	*backmesh,*wbackmesh, *bm,*wbm;
   backstruct	*backmesh,*wbackmesh, *bm,*wbm;
@@ -294,7 +294,7 @@ void makeback(picstruct *field, picstruct *wfield)
    filterback(wfield);
    filterback(wfield);


/* Compute normalization for variance- or weight-maps*/
/* Compute normalization for variance- or weight-maps*/
  if (wfield && wfield->flags&(VAR_FIELD|WEIGHT_FIELD))
  if (wfield && wscale_flag && wfield->flags&(VAR_FIELD|WEIGHT_FIELD))
    {      
    {      
    nr = 0;
    nr = 0;
    QMALLOC(ratio, float, wfield->nback);
    QMALLOC(ratio, float, wfield->nback);
+6 −3
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
*
*
*	This file part of:	SExtractor
*	This file part of:	SExtractor
*
*
*	Copyright:		(C) 1993-2010 Emmanuel Bertin -- IAP/CNRS/UPMC
*	Copyright:		(C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
*
*
*	License:		GNU General Public License
*	License:		GNU General Public License
*
*
@@ -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:		11/10/2010
*	Last modified:		09/03/2011
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/


@@ -33,6 +33,9 @@
#define	QUANTIF_NMAXLEVELS	4096		/* max nb of quantif. levels */
#define	QUANTIF_NMAXLEVELS	4096		/* max nb of quantif. levels */
#define	QUANTIF_AMIN		4		/* min nb of "mode pixels" */
#define	QUANTIF_AMIN		4		/* min nb of "mode pixels" */


#define	BACK_WSCALE		1		/* Activate weight scaling */
#define	BACK_NOWSCALE		0		/* No weight scaling */

/* NOTES:
/* NOTES:
One must have:		BACK_BUFSIZE >= MAXPICSIZE
One must have:		BACK_BUFSIZE >= MAXPICSIZE
			0 < QUANTIF_NSIGMA <= 10
			0 < QUANTIF_NSIGMA <= 10
@@ -61,7 +64,7 @@ void backhisto(backstruct *, backstruct *, PIXTYPE *, PIXTYPE *,
		copyback(picstruct *infield, picstruct *outfield),
		copyback(picstruct *infield, picstruct *outfield),
		endback(picstruct *),
		endback(picstruct *),
		filterback(picstruct *),
		filterback(picstruct *),
		makeback(picstruct *, picstruct *),
		makeback(picstruct *, picstruct *, int),
		subbackline(picstruct *, int, PIXTYPE *);
		subbackline(picstruct *, int, PIXTYPE *);


float		backguess(backstruct *, float *, float *),
float		backguess(backstruct *, float *, float *),
+2 −3
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
*
*
*	This file part of:	SExtractor
*	This file part of:	SExtractor
*
*
*	Copyright:		(C) 1993-2010 Emmanuel Bertin -- IAP/CNRS/UPMC
*	Copyright:		(C) 1993-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
*
*
*	License:		GNU General Public License
*	License:		GNU General Public License
*
*
@@ -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/02/2010
*	Last modified:		11/03/2011
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/


@@ -405,7 +405,6 @@ Finish current check-image.
void	reendcheck(picstruct *field, checkstruct *check)
void	reendcheck(picstruct *field, checkstruct *check)
  {
  {
   catstruct	*cat;
   catstruct	*cat;
   char		*buf;


  cat = check->cat;
  cat = check->cat;
  switch(check->type)
  switch(check->type)
+4 −4
Original line number Original line Diff line number Diff line
@@ -5,7 +5,7 @@
*
*
*	This file part of:	AstrOmatic software
*	This file part of:	AstrOmatic software
*
*
*	Copyright:		(C) 2007-2010 Emmanuel Bertin -- IAP/CNRS/UPMC
*	Copyright:		(C) 2007-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
*				(C) 2004 Manolis Lourakis (original version)
*				(C) 2004 Manolis Lourakis (original version)
*
*
*	Licenses:		GNU General Public License
*	Licenses:		GNU General Public License
@@ -22,7 +22,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:		25/10/2010
*	Last modified:		11/03/2011
*
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
@@ -861,7 +861,7 @@ OUTPUT Matrix rank.
NOTES	Based on algorithm described in Numerical Recipes in C, 2nd Ed.(p. 671).
NOTES	Based on algorithm described in Numerical Recipes in C, 2nd Ed.(p. 671).
	The a and v matrices are transposed with respect to the N.R. convention.
	The a and v matrices are transposed with respect to the N.R. convention.
AUTHOR	E. Bertin (IAP)
AUTHOR	E. Bertin (IAP)
VERSION	02/09/2010
VERSION	11/03/2011
 ***/
 ***/


static int SVDINV(LM_REAL *a, LM_REAL *b, int m)
static int SVDINV(LM_REAL *a, LM_REAL *b, int m)
@@ -884,7 +884,7 @@ static int SVDINV(LM_REAL *a, LM_REAL *b, int m)
                        thresh, wmax, tol,tanorm;
                        thresh, wmax, tol,tanorm;
  anorm = g = scale = 0.0;
  anorm = g = scale = 0.0;


  tol = sizeof(anorm)>4? 1.0e-9 : 1.0e-6;
  tanorm = tol = sizeof(anorm)>4? 1.0e-9 : 1.0e-6;


  rv1=(LM_REAL *)malloc(m*sizeof(LM_REAL));
  rv1=(LM_REAL *)malloc(m*sizeof(LM_REAL));
  tmp=(LM_REAL *)malloc(m*sizeof(LM_REAL));
  tmp=(LM_REAL *)malloc(m*sizeof(LM_REAL));
Loading