Commit 882ad557 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Fixed MODELS check-image.

Fixed X/YMODEL_WORLD issue.
Increased CLEANing margin for model-fitting.
parent dd49b374
...@@ -210,7 +210,7 @@ void addcleanobj(objstruct *objin) ...@@ -210,7 +210,7 @@ void addcleanobj(objstruct *objin)
hh1 = hh1 > 0.0 ? 1/sqrt(3*hh1) : 0.0; hh1 = hh1 > 0.0 ? 1/sqrt(3*hh1) : 0.0;
/* ... then from the isophotal limit, which should not be TOO different... */ /* ... then from the isophotal limit, which should not be TOO different... */
hh2 = (objin->ymax-objin->ymin+1.0); hh2 = (objin->ymax-objin->ymin+1.0);
margin = (int)((hh1>hh2?hh1:hh2)*MARGIN_SCALE+1.49999); margin = (int)((hh1>hh2?hh1:hh2)*MARGIN_SCALE+MARGIN_OFFSET+0.49999);
objin->ycmax = objin->ymax+margin; objin->ycmax = objin->ymax+margin;
/* ... and finally compare with the predefined margin */ /* ... and finally compare with the predefined margin */
if ((y=(int)(objin->my+0.49999)+prefs.cleanmargin)>objin->ycmax) if ((y=(int)(objin->my+0.49999)+prefs.cleanmargin)>objin->ycmax)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* Contents: global definitions. * Contents: global definitions.
* *
* Last modify: 02/10/2009 * Last modify: 12/10/2009
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/ */
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#define LESSBIG 1e+25 /* a somewhat smaller number */ #define LESSBIG 1e+25 /* a somewhat smaller number */
#define DATA_BUFSIZE 262144 /* data buffer size */ #define DATA_BUFSIZE 262144 /* data buffer size */
#define MARGIN_SCALE 2.0 /* Margin / object height */ #define MARGIN_SCALE 2.0 /* Margin / object height */
#define MARGIN_OFFSET 4.0 /* Margin offset (pixels) */
#define MAXCHAR 512 /* max. number of characters */ #define MAXCHAR 512 /* max. number of characters */
#define MAXCHARL 16384 /* max.nb of chars in strlist*/ #define MAXCHARL 16384 /* max.nb of chars in strlist*/
#define MAXDEBAREA 3 /* max. area for deblending */ #define MAXDEBAREA 3 /* max. area for deblending */
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* Contents: Model-fitting parameter list for catalog data. * Contents: Model-fitting parameter list for catalog data.
* *
* Last modify: 29/09/2009 * Last modify: 12/10/2009
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/ */
...@@ -73,10 +73,10 @@ ...@@ -73,10 +73,10 @@
&outobj2.y_prof, H_FLOAT, T_FLOAT, "%10.3f", "pixel", &outobj2.y_prof, H_FLOAT, T_FLOAT, "%10.3f", "pixel",
"pos.cartesian.y;stat.fit.param;instr.det;meta.main", "pix"}, "pos.cartesian.y;stat.fit.param;instr.det;meta.main", "pix"},
{"XMODEL_WORLD", "Fitted position along focal-plane x axis", {"XFOCAL_WORLD", "Fitted position along focal-plane x axis",
&outobj2.xf_prof, H_FLOAT, T_DOUBLE, "%18.10e", "", &outobj2.xf_prof, H_FLOAT, T_DOUBLE, "%18.10e", "",
"pos.cartesian.x;stat.fit.param", ""}, "pos.cartesian.x;stat.fit.param", ""},
{"YMODEL_WORLD", "Fitted position along focal-plane y axis", {"YFOCAL_WORLD", "Fitted position along focal-plane y axis",
&outobj2.yf_prof, H_FLOAT, T_DOUBLE, "%18.10e", "", &outobj2.yf_prof, H_FLOAT, T_DOUBLE, "%18.10e", "",
"pos.cartesian.y;stat.fit.param", ""}, "pos.cartesian.y;stat.fit.param", ""},
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* Contents: Fit an arbitrary profile combination to a detection. * Contents: Fit an arbitrary profile combination to a detection.
* *
* Last modify: 09/10/2009 * Last modify: 19/10/2009
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/ */
...@@ -173,7 +173,7 @@ OUTPUT Pointer to an allocated fit structure (containing details about the ...@@ -173,7 +173,7 @@ OUTPUT Pointer to an allocated fit structure (containing details about the
fit). fit).
NOTES It is a modified version of the lm_minimize() of lmfit. NOTES It is a modified version of the lm_minimize() of lmfit.
AUTHOR E. Bertin (IAP) AUTHOR E. Bertin (IAP)
VERSION 09/10/2009 VERSION 19/10/2009
***/ ***/
void profit_fit(profitstruct *profit, void profit_fit(profitstruct *profit,
picstruct *field, picstruct *wfield, picstruct *field, picstruct *wfield,
...@@ -218,9 +218,7 @@ void profit_fit(profitstruct *profit, ...@@ -218,9 +218,7 @@ void profit_fit(profitstruct *profit,
if (profit->objnaxisn[0]>PROFIT_MAXOBJSIZE) if (profit->objnaxisn[0]>PROFIT_MAXOBJSIZE)
{ {
profit->subsamp = ceil((float)profit->objnaxisn[0]/PROFIT_MAXOBJSIZE); profit->subsamp = ceil((float)profit->objnaxisn[0]/PROFIT_MAXOBJSIZE);
// profit->fluxfac *= profit->subsamp*profit->subsamp;
profit->objnaxisn[1] = (profit->objnaxisn[0] /= (int)profit->subsamp); profit->objnaxisn[1] = (profit->objnaxisn[0] /= (int)profit->subsamp);
// profit->pixstep *= profit->subsamp;
obj2->prof_flag |= PROFLAG_OBJSUB; obj2->prof_flag |= PROFLAG_OBJSUB;
} }
else else
......
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