Changeset 33612
- Timestamp:
- Mar 25, 2012, 8:47:52 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/psphot/src
- Files:
-
- 2 edited
-
psphotKronIterate.c (modified) (5 diffs)
-
psphotSetThreads.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/psphot/src/psphotKronIterate.c
r32850 r33612 83 83 if (!status) { 84 84 MIN_KRON_RADIUS = 0.25*RADIUS; 85 } 86 87 int KRON_ITERATIONS = psMetadataLookupS32 (&status, recipe, "KRON_ITERATIONS"); 88 if (!status) { 89 KRON_ITERATIONS = 2; 85 90 } 86 91 … … 140 145 PS_ARRAY_ADD_SCALAR(job->args, RADIUS, PS_TYPE_F32); 141 146 PS_ARRAY_ADD_SCALAR(job->args, MIN_KRON_RADIUS, PS_TYPE_F32); 147 PS_ARRAY_ADD_SCALAR(job->args, KRON_ITERATIONS, PS_TYPE_S32); 142 148 143 149 // set this to 0 to run without threading 144 # if ( 1)150 # if (0) 145 151 if (!psThreadJobAddPending(job)) { 146 152 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); … … 150 156 if (!psphotKronIterate_Threaded(job)) { 151 157 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); 152 psFree(AnalysisRegion);153 158 return false; 154 159 } … … 188 193 float RADIUS = PS_SCALAR_VALUE(job->args->data[5],F32); 189 194 float MIN_KRON_RADIUS = PS_SCALAR_VALUE(job->args->data[6],F32); 195 int KRON_ITERATIONS = PS_SCALAR_VALUE(job->args->data[7],S32); 190 196 191 197 // XXX TEST : set iteration to 1 192 for (int j = 0; j < 1; j++) {198 for (int j = 0; j < KRON_ITERATIONS; j++) { 193 199 for (int i = 0; i < sources->n; i++) { 194 200 … … 217 223 // XXX float windowRadius = PS_MIN(PS_MAX(RADIUS, 4.0*source->moments->Mrf), maxWindow); 218 224 225 // Sextractor apparently takes something like the skyRadius window, measures the moments inside that window, 226 // then uses an elliptical outline based on the 2nd moments, but 6x the size 227 219 228 // XXX TEST : use a window based on the radial profile numbers: max is skyRadius, min is RADIUS 220 229 // if we lack the skyRadius (eg MATCHED sources), go to the default value 221 float maxWindow = isfinite(source->skyRadius) ? source->skyRadius : RADIUS; 222 float windowRadius = PS_MAX(RADIUS, maxWindow); 230 float maxWindow, windowRadius; 231 232 if (j == 0) { 233 maxWindow = isfinite(source->skyRadius) ? source->skyRadius : RADIUS; 234 windowRadius = PS_MAX(RADIUS, maxWindow); 235 } else { 236 maxWindow = isfinite(source->moments->Mrf) ? 6.0*source->moments->Mrf : RADIUS; 237 windowRadius = PS_MAX(RADIUS, maxWindow); 238 } 223 239 224 240 // re-allocate image, weight, mask arrays for each peak with box big enough to fit BIG_RADIUS -
branches/eam_branches/ipp-20111122/psphot/src/psphotSetThreads.c
r32633 r33612 30 30 psFree(task); 31 31 32 task = psThreadTaskAlloc("PSPHOT_KRON_ITERATE", 7);32 task = psThreadTaskAlloc("PSPHOT_KRON_ITERATE", 8); 33 33 task->function = &psphotKronIterate_Threaded; 34 34 psThreadTaskAdd(task);
Note:
See TracChangeset
for help on using the changeset viewer.
