- Timestamp:
- Feb 19, 2011, 10:40:50 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphotExtendedSourceFits.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psphot
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20110213/psphot/src/psphotExtendedSourceFits.c
r30624 r30707 178 178 PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfain 179 179 180 if (false && !psThreadJobAddPending(job)) { 180 // set this to 0 to run without threading 181 # if (1) 182 if (!psThreadJobAddPending(job)) { 181 183 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); 182 184 psFree(AnalysisRegion); 183 185 return false; 184 } else { 185 if (!psphotExtendedSourceFits_Threaded(job)) { 186 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); 187 psFree(AnalysisRegion); 188 return false; 189 } 190 psScalar *scalar = NULL; 191 scalar = job->args->data[7]; 192 Next += scalar->data.S32; 193 scalar = job->args->data[8]; 194 Nconvolve += scalar->data.S32; 195 scalar = job->args->data[9]; 196 NconvolvePass += scalar->data.S32; 197 scalar = job->args->data[10]; 198 Nplain += scalar->data.S32; 199 scalar = job->args->data[11]; 200 NplainPass += scalar->data.S32; 201 scalar = job->args->data[12]; 202 Nfaint += scalar->data.S32; 203 psFree(job); 186 } 187 # else 188 if (!psphotExtendedSourceFits_Threaded(job)) { 189 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); 190 psFree(AnalysisRegion); 191 return false; 204 192 } 205 } 193 psScalar *scalar = NULL; 194 scalar = job->args->data[7]; 195 Next += scalar->data.S32; 196 scalar = job->args->data[8]; 197 Nconvolve += scalar->data.S32; 198 scalar = job->args->data[9]; 199 NconvolvePass += scalar->data.S32; 200 scalar = job->args->data[10]; 201 Nplain += scalar->data.S32; 202 scalar = job->args->data[11]; 203 NplainPass += scalar->data.S32; 204 scalar = job->args->data[12]; 205 Nfaint += scalar->data.S32; 206 psFree(job); 207 # endif 208 } 206 209 207 210 // wait for the threads to finish and manage results … … 268 271 psImageMaskType markVal = PS_SCALAR_VALUE(job->args->data[6],PS_TYPE_IMAGE_MASK_DATA); 269 272 273 pthread_t tid = pthread_self(); // Thread identifier 274 270 275 // Define source fitting parameters for extended source fits 271 276 pmSourceFitOptions *fitOptions = pmSourceFitOptionsAlloc(); 272 277 fitOptions->mode = PM_SOURCE_FIT_EXT; 278 fitOptions->saveCovariance = true; // XXX make this a user option? 279 273 280 // XXX for now, use the defaults for the rest: 274 281 // fitOptions->nIter = fitIter; … … 296 303 // XXX use the parameters guessed from moments 297 304 // if (source->modelEXT == NULL) continue; 305 306 fprintf (stderr, "fit %d,%d in thread %d\n", source->peak->x, source->peak->y, (int) tid); 298 307 299 308 // replace object in image
Note:
See TracChangeset
for help on using the changeset viewer.
