Changeset 32334
- Timestamp:
- Sep 6, 2011, 10:54:23 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110710/psphot/src
- Files:
-
- 3 edited
-
psphotFindFootprints.c (modified) (1 diff)
-
psphotKronIterate.c (modified) (4 diffs)
-
psphotSetThreads.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/psphot/src/psphotFindFootprints.c
r32238 r32334 59 59 detections->peaks = pmFootprintArrayToPeaks(detections->footprints); 60 60 61 psphotFootprintSaddles (readout, detections->footprints);62 63 int nSaddle = 0;64 for (int i = 0; i < detections->peaks->n; i++) {65 pmPeak *peak = detections->peaks->data[i];66 67 if (peak->saddlePoints) nSaddle += peak->saddlePoints->n;68 }61 // psphotFootprintSaddles (readout, detections->footprints); 62 // 63 // int nSaddle = 0; 64 // for (int i = 0; i < detections->peaks->n; i++) { 65 // pmPeak *peak = detections->peaks->data[i]; 66 // 67 // if (peak->saddlePoints) nSaddle += peak->saddlePoints->n; 68 // } 69 69 // fprintf (stderr, "%d saddle points for %ld peaks\n", nSaddle, detections->peaks->n); 70 70 -
branches/eam_branches/ipp-20110710/psphot/src/psphotKronIterate.c
r32307 r32334 84 84 MIN_KRON_RADIUS = 0.25*RADIUS; 85 85 } 86 87 float EXT_FIT_MAX_RADIUS = psMetadataLookupF32 (&status, recipe, "EXT_FIT_MAX_RADIUS");88 86 89 87 // bit-masks to test for good/bad pixels … … 145 143 PS_ARRAY_ADD_SCALAR(job->args, RADIUS, PS_TYPE_F32); 146 144 PS_ARRAY_ADD_SCALAR(job->args, MIN_KRON_RADIUS, PS_TYPE_F32); 147 PS_ARRAY_ADD_SCALAR(job->args, EXT_FIT_MAX_RADIUS, PS_TYPE_F32);148 145 149 146 // set this to 0 to run without threading … … 194 191 float RADIUS = PS_SCALAR_VALUE(job->args->data[5],F32); 195 192 float MIN_KRON_RADIUS = PS_SCALAR_VALUE(job->args->data[6],F32); 196 float EXT_FIT_MAX_RADIUS = PS_SCALAR_VALUE(job->args->data[7],F32);197 193 198 194 for (int j = 0; j < 5; j++) { … … 212 208 } 213 209 210 // use S/N to control max window size 211 float kronSN = source->moments->KronFlux / source->moments->KronFluxErr; 212 213 // maxWindow -> 1.5*RADIUS for kronSN = 5.0, keeping S.B. constant (kronSN ~ flux) 214 // (kronSN / maxWindow^2) = (5.0 / (1.5 RADIUS)^2) 215 // maxWindow = 1.5 * RADIUS * sqrt(kronSN / 5.0) 216 float maxWindow = (isfinite(kronSN) && (kronSN > 5.0)) ? 1.5 * RADIUS * sqrt(kronSN / 5.0) : 1.5*RADIUS; 217 214 218 // iterate to the window radius 215 float windowRadius = PS_MIN(PS_MAX(RADIUS, 4.0*source->moments->Mrf), EXT_FIT_MAX_RADIUS);219 float windowRadius = PS_MIN(PS_MAX(RADIUS, 4.0*source->moments->Mrf), maxWindow); 216 220 217 221 // re-allocate image, weight, mask arrays for each peak with box big enough to fit BIG_RADIUS 218 222 pmSourceRedefinePixels (source, readout, source->peak->x, source->peak->y, windowRadius + 2); 223 psAssert (source->pixels, "WTF?"); 219 224 220 225 // clear the window function for this source based on the moments -
branches/eam_branches/ipp-20110710/psphot/src/psphotSetThreads.c
r32322 r32334 30 30 psFree(task); 31 31 32 task = psThreadTaskAlloc("PSPHOT_KRON_ITERATE", 8);32 task = psThreadTaskAlloc("PSPHOT_KRON_ITERATE", 7); 33 33 task->function = &psphotKronIterate_Threaded; 34 34 psThreadTaskAdd(task);
Note:
See TracChangeset
for help on using the changeset viewer.
