Commit b066fc4b authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Fixed crash with model fitting on small objects

parent 25eb7877
.TH SEXTRACTOR "1" "November 2008" "SWarp 2.8.2" "User Commands"
.TH SEXTRACTOR "1" "January 2009" "SWarp 2.8.2" "User Commands"
.SH NAME
sex \- extract a source catalog from an astronomical FITS image
.SH SYNOPSIS
......
......@@ -9,7 +9,7 @@
*
* Contents: Fit an arbitrary profile combination to a detection.
*
* Last modify: 20/11/2008
* Last modify: 29/01/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -168,7 +168,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 20/11/2008
VERSION 29/01/2009
***/
void profit_fit(profitstruct *profit,
picstruct *field, picstruct *wfield,
......@@ -217,6 +217,7 @@ void profit_fit(profitstruct *profit,
profit->nresi = profit_copyobjpix(profit, field, wfield);
if (profit->nresi < nparam)
{
if (FLAG(obj2.prof_vector))
for (p=0; p<nparam; p++)
obj2->prof_vector[p] = 0.0;
obj2->prof_niter = 0;
......
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