Changeset 23989
- Timestamp:
- Apr 28, 2009, 11:21:56 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 36 edited
-
ppImage/src/ppImageMeasureCrosstalk.c (modified) (1 diff)
-
ppStats/src/ppStatsFromMetadataStats.c (modified) (1 diff)
-
ppStats/src/ppStatsReadout.c (modified) (1 diff)
-
psLib/src/imageops/psImageGeomManip.c (modified) (3 diffs)
-
psLib/src/imageops/psImageMap.c (modified) (1 diff)
-
psLib/src/imageops/psImageMapFit.c (modified) (1 diff)
-
psLib/src/imageops/psImagePixelExtract.c (modified) (4 diffs)
-
psLib/src/imageops/psImageStats.c (modified) (1 diff)
-
psModules/src/astrom/pmAstrometryDistortion.c (modified) (1 diff)
-
psModules/src/camera/pmFPAMaskWeight.c (modified) (1 diff)
-
psModules/src/detrend/pmFringeStats.c (modified) (2 diffs)
-
psModules/src/detrend/pmOverscan.c (modified) (4 diffs)
-
psModules/src/detrend/pmRemnance.c (modified) (1 diff)
-
psModules/src/detrend/pmShutterCorrection.c (modified) (1 diff)
-
psModules/src/extras/pmVisual.c (modified) (1 diff)
-
psModules/src/imcombine/pmImageCombine.c (modified) (3 diffs)
-
psModules/src/imcombine/pmReadoutCombine.c (modified) (1 diff)
-
psModules/src/imcombine/pmSubtraction.c (modified) (1 diff)
-
psModules/src/imcombine/pmSubtractionMatch.c (modified) (1 diff)
-
psModules/src/objects/models/pmModel_SGAUSS.c (modified) (1 diff)
-
psModules/src/objects/pmGrowthCurveGenerate.c (modified) (2 diffs)
-
psModules/src/objects/pmPSFtry.c (modified) (5 diffs)
-
psModules/src/objects/pmSource.c (modified) (3 diffs)
-
psModules/src/objects/pmSourceFitModel.c (modified) (1 diff)
-
psModules/src/objects/pmSourceMatch.c (modified) (1 diff)
-
psastro/src/psastroAstromGuess.c (modified) (1 diff)
-
psastro/src/psastroFixChipsTest.c (modified) (3 diffs)
-
psastro/src/psastroModelAnalysis.c (modified) (1 diff)
-
psastro/src/psastroModelFitBoresite.c (modified) (1 diff)
-
psastro/src/psastroZeroPoint.c (modified) (1 diff)
-
psphot/src/psphotApResid.c (modified) (2 diffs)
-
psphot/src/psphotChoosePSF.c (modified) (2 diffs)
-
psphot/src/psphotDiagnosticPlots.c (modified) (3 diffs)
-
psphot/src/psphotImageQuality.c (modified) (1 diff)
-
psphot/src/psphotMakeResiduals.c (modified) (2 diffs)
-
psphot/src/psphotRoughClass.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageMeasureCrosstalk.c
r23903 r23989 149 149 150 150 psStatsInit (stats); 151 psVectorStats (stats, vector, NULL, NULL, 0); 151 if (!psVectorStats (stats, vector, NULL, NULL, 0)) { 152 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 153 return false; 154 } 152 155 153 156 float background = psMetadataLookupF32 (&status, cell->analysis, "XTALK.REF"); -
trunk/ppStats/src/ppStatsFromMetadataStats.c
r20888 r23989 38 38 39 39 psStats *stats = psStatsAlloc(option); 40 psVectorStats(stats, entry->vector, NULL, NULL, 0); 40 if (!psVectorStats(stats, entry->vector, NULL, NULL, 0)) { 41 psError(PS_ERR_UNKNOWN, false, "failure to measure stats for %s", entry->statistic); 42 continue; 43 } 41 44 42 45 double value; -
trunk/ppStats/src/ppStatsReadout.c
r21183 r23989 92 92 } 93 93 if (!psVectorStats(data->stats, sampleValues, NULL, sampleMask, 1)) { 94 psWarning("Unable to perform statistics on readout %s.\n", readoutName);95 psErrorClear(); 96 } 94 psError(PS_ERR_UNKNOWN, false, "failure to measure stats for readout %s", readoutName); 95 } 96 // XXX raise if we get a NAN? psWarning("Unable to perform statistics on readout %s.\n", readoutName); 97 97 psFree(sampleValues); 98 98 psFree(sampleMask); -
trunk/psLib/src/imageops/psImageGeomManip.c
r21183 r23989 110 110 out = psImageRecycle(out, outCols, outRows, in->type.type); 111 111 112 #define PS_IMAGE_REBIN_CASE(TYPE)\113 case PS_TYPE_##TYPE: {\114 ps##TYPE *outRowData; \115 ps##TYPE *vecData = vec->data.TYPE; \116 psImageMaskType *inRowMask = NULL; \117 for (psS32 row = 0; row < outRows; row++) { \118 outRowData = out->data.TYPE[row]; \119 psS32 inCurrentRow = row * scale; \120 psS32 inNextRow = (row + 1) * scale; \121 for (psS32 col = 0; col < outCols; col++) { \122 psS32 inCurrentCol = col * scale; \123 psS32 inNextCol = (col + 1) * scale; \124 psS32 n = 0; \112 #define PS_IMAGE_REBIN_CASE(TYPE) \ 113 case PS_TYPE_##TYPE: { \ 114 ps##TYPE *outRowData; \ 115 ps##TYPE *vecData = vec->data.TYPE; \ 116 psImageMaskType *inRowMask = NULL; \ 117 for (psS32 row = 0; row < outRows; row++) { \ 118 outRowData = out->data.TYPE[row]; \ 119 psS32 inCurrentRow = row * scale; \ 120 psS32 inNextRow = (row + 1) * scale; \ 121 for (psS32 col = 0; col < outCols; col++) { \ 122 psS32 inCurrentCol = col * scale; \ 123 psS32 inNextCol = (col + 1) * scale; \ 124 psS32 n = 0; \ 125 125 for (psS32 inRow = inCurrentRow; inRow < inNextRow && inRow < inRows; inRow++) { \ 126 ps##TYPE* inRowData = in->data.TYPE[inRow]; \127 if (mask != NULL) { \126 ps##TYPE* inRowData = in->data.TYPE[inRow]; \ 127 if (mask != NULL) { \ 128 128 inRowMask = mask->data.PS_TYPE_IMAGE_MASK_DATA[inRow]; \ 129 } \129 } \ 130 130 for (psS32 inCol = inCurrentCol; inCol < inNextCol && inCol < inCols; inCol++) { \ 131 if (maskData != NULL) { \131 if (maskData != NULL) { \ 132 132 maskData[n] = (inRowMask[inCol] & maskVal); \ 133 } \ 134 vecData[n++] = inRowData[inCol]; \ 135 } \ 136 } \ 137 vec->n = n; \ 138 if (maskVec) { \ 139 maskVec->n = n; \ 140 } \ 141 psVectorStats(myStats, vec, NULL, maskVec, 0xff); /* the mask vector has only 0 or 1 */ \ 142 outRowData[col] = (ps##TYPE)psStatsGetValue(myStats, statistic); \ 143 } \ 144 } \ 145 } \ 133 } \ 134 vecData[n++] = inRowData[inCol]; \ 135 } \ 136 } \ 137 vec->n = n; \ 138 if (maskVec) { \ 139 maskVec->n = n; \ 140 } \ 141 if (!psVectorStats(myStats, vec, NULL, maskVec, 0xff)) { /* the mask vector has only 0 or 1 */ \ 142 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); \ 143 psFree(out); \ 144 out = NULL; \ 145 goto escape; \ 146 } \ 147 outRowData[col] = (ps##TYPE)psStatsGetValue(myStats, statistic); \ 148 } \ 149 } \ 150 } \ 146 151 break; 147 152 … … 161 166 char* typeStr; 162 167 PS_TYPE_NAME(typeStr,in->type.type); 163 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 164 _("Specified psImage type, %s, is not supported."), 165 typeStr); 168 psError(PS_ERR_BAD_PARAMETER_TYPE, true, _("Specified psImage type, %s, is not supported."), typeStr); 166 169 psFree(out); 167 170 out = NULL; … … 169 172 } 170 173 174 escape: 171 175 psFree(vec); 172 176 psFree(maskVec); -
trunk/psLib/src/imageops/psImageMap.c
r21183 r23989 211 211 // XXX need to supply a mask and skip the masked pixels when calculating the centroid 212 212 // this will not in general be properly weighted... 213 if (psVectorStats (map->stats, fCell, dfCell, NULL, 0)) { 213 if (!psVectorStats (map->stats, fCell, dfCell, NULL, 0)) { 214 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 215 return false; 216 } 217 218 // XXX ensure only one option is selected, or save both position and width 219 map->map->data.F32[iy][ix] = psStatsGetValue (map->stats, map->stats->options); 220 221 if (isnan(map->map->data.F32[iy][ix])) { 222 mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] = 1; 223 } else { 214 224 mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] = 0; 215 // XXX ensure only one option is selected, or save both position and width216 map->map->data.F32[iy][ix] = psStatsGetValue (map->stats, map->stats->options);217 225 218 226 // calculate the mean position and save: 219 227 psStatsInit (meanStat); 220 psVectorStats (meanStat, xCell, NULL, NULL, 0); 228 if (!psVectorStats (meanStat, xCell, NULL, NULL, 0)) { 229 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 230 return false; 231 } 221 232 xCoord->data.F32[iy][ix] = psStatsGetValue (meanStat, meanStat->options); 222 233 psStatsInit (meanStat); 223 psVectorStats (meanStat, yCell, NULL, NULL, 0); 234 if (!psVectorStats (meanStat, yCell, NULL, NULL, 0)) { 235 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 236 return false; 237 } 224 238 yCoord->data.F32[iy][ix] = psStatsGetValue (meanStat, meanStat->options); 225 } else {226 mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] = 1;227 239 } 228 240 -
trunk/psLib/src/imageops/psImageMapFit.c
r21183 r23989 73 73 74 74 // XXX does ROBUST_MEDIAN work with weight? 75 psVectorStats(map->stats, f, NULL, mask, maskValue); 75 if (!psVectorStats(map->stats, f, NULL, mask, maskValue)) { 76 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 77 return false; 78 } 76 79 77 80 map->map->data.F32[0][0] = psStatsGetValue(map->stats, mean); -
trunk/psLib/src/imageops/psImagePixelExtract.c
r21183 r23989 419 419 } 420 420 421 #define PSIMAGE_CUT_VERTICAL(TYPE) \422 case PS_TYPE_##TYPE: {\423 psVectorMaskType* maskVecData = NULL; \424 for (psS32 c = col0; c < col1; c++) { \425 ps##TYPE *imgData = input->data.TYPE[row0] + c; \426 ps##TYPE *imgVecData = imgVec->data.TYPE; \427 if (maskVec != NULL) { \421 #define PSIMAGE_CUT_VERTICAL(TYPE) \ 422 case PS_TYPE_##TYPE: { \ 423 psVectorMaskType* maskVecData = NULL; \ 424 for (psS32 c = col0; c < col1; c++) { \ 425 ps##TYPE *imgData = input->data.TYPE[row0] + c; \ 426 ps##TYPE *imgVecData = imgVec->data.TYPE; \ 427 if (maskVec != NULL) { \ 428 428 maskVecData = maskVec->data.PS_TYPE_VECTOR_MASK_DATA; \ 429 429 maskData = &mask->data.PS_TYPE_IMAGE_MASK_DATA[row0][c]; /* XXX double check this... */ \ 430 430 /** old entry: maskData = (psMaskType* )(mask->data.PS_TYPE_IMAGE_MASK_DATA[row0]) + c; */ \ 431 } \ 432 for (psS32 r = row0; r < row1; r++) { \ 433 *imgVecData = *imgData; \ 434 imgVecData ++; \ 435 imgData += inCols; \ 436 if (maskVecData != NULL) { \ 437 *maskVecData = (*maskData & maskVal); \ 438 maskVecData ++; \ 439 maskData += inCols; \ 440 } \ 441 } \ 442 psVectorStats(myStats, imgVec, NULL, maskVec, 0xff); \ 443 *outData = psStatsGetValue(myStats, statistic); \ 444 if (outPosition != NULL) { \ 445 outPosition->x = c; \ 446 outPosition->y = row0; \ 447 outPosition += delta; \ 448 } \ 449 outData += delta; \ 450 } \ 451 break; \ 431 } \ 432 for (psS32 r = row0; r < row1; r++) { \ 433 *imgVecData = *imgData; \ 434 imgVecData ++; \ 435 imgData += inCols; \ 436 if (maskVecData != NULL) { \ 437 *maskVecData = (*maskData & maskVal); \ 438 maskVecData ++; \ 439 maskData += inCols; \ 440 } \ 441 } \ 442 if (!psVectorStats(myStats, imgVec, NULL, maskVec, 0xff)) { \ 443 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); \ 444 psFree(out); \ 445 out = NULL; \ 446 break; \ 447 } \ 448 *outData = psStatsGetValue(myStats, statistic); \ 449 if (outPosition != NULL) { \ 450 outPosition->x = c; \ 451 outPosition->y = row0; \ 452 outPosition += delta; \ 453 } \ 454 outData += delta; \ 455 } \ 456 break; \ 452 457 } 453 458 … … 466 471 char* typeStr; 467 472 PS_TYPE_NAME(typeStr,type); 468 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 469 _("Specified psImage type, %s, is not supported."), 470 typeStr); 473 psError(PS_ERR_BAD_PARAMETER_TYPE, true, _("Specified psImage type, %s, is not supported."), typeStr); 471 474 psFree(out); 472 475 out = NULL; … … 534 537 } 535 538 536 psVectorStats(myStats, imgVec, NULL, maskVec, 0xff); 539 if (!psVectorStats(myStats, imgVec, NULL, maskVec, 0xff)) { 540 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 541 psFree (out); 542 out = NULL; 543 break; 544 } 537 545 *outData = psStatsGetValue(myStats, statistic); 538 546 if (outPosition != NULL) { … … 933 941 934 942 for (psS32 r = 0; r < numOut; r++) { 935 psVectorStats(myStats, buffer[r], NULL, bufferMask[r], 0xff); 943 if (!psVectorStats(myStats, buffer[r], NULL, bufferMask[r], 0xff)){ 944 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 945 psFree(out); 946 out = NULL; 947 break; 948 } 936 949 outData[r] = psStatsGetValue(myStats, statistic); 937 950 } -
trunk/psLib/src/imageops/psImageStats.c
r21183 r23989 104 104 } 105 105 106 psVectorStats(stats, junkData, NULL, junkMask, 0xff); 106 if (!psVectorStats(stats, junkData, NULL, junkMask, 0xff)) { 107 psFree(junkMask); 108 psFree(junkData); 109 return false; 110 } 107 111 108 112 psFree(junkMask); -
trunk/psModules/src/astrom/pmAstrometryDistortion.c
r23487 r23989 151 151 152 152 // also measure the L and M median positions as a representative coordinate 153 psVectorStats (stats, L, NULL, NULL, 0); 153 if (!psVectorStats (stats, L, NULL, NULL, 0)) { 154 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 155 goto skip; 156 } 154 157 grad->FP.x = stats->sampleMedian; 155 158 156 psVectorStats (stats, M, NULL, NULL, 0); 159 if (!psVectorStats (stats, M, NULL, NULL, 0)) { 160 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 161 goto skip; 162 } 157 163 grad->FP.y = stats->sampleMedian; 158 164 -
trunk/psModules/src/camera/pmFPAMaskWeight.c
r23259 r23989 482 482 return false; 483 483 } 484 float stdev = psStatsGetValue(stdevStats, stdevStat); // Sta dard deviation of fluxes484 float stdev = psStatsGetValue(stdevStats, stdevStat); // Standard deviation of fluxes 485 485 psFree(stdevStats); 486 486 psFree(noise); -
trunk/psModules/src/detrend/pmFringeStats.c
r23259 r23989 882 882 883 883 psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_QUARTILE); // Statistics 884 psVectorStats(stats, diffs, NULL, mask, 1); 884 if (!psVectorStats(stats, diffs, NULL, mask, 1)) { 885 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 886 return 0; 887 } 885 888 float middle = stats->sampleMedian; // The middle of the distribution 886 889 float thresh = rej * 0.74 * (stats->sampleUQ - stats->sampleLQ); // The rejection threshold … … 969 972 970 973 // Get rid of the extreme outliers by assuming most of the points are somewhat clustered 971 psVectorStats(median, science->f, NULL, NULL, 0); 974 if (!psVectorStats(median, science->f, NULL, NULL, 0)) { 975 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 976 return NULL; 977 } 972 978 scale->coeff->data.F32[0] = median->sampleMedian; 973 979 for (int i = 0; i < fringes->n; i++) { 974 980 pmFringeStats *fringe = fringes->data[i]; // The fringe of interest 975 psVectorStats(median, fringe->f, NULL, NULL, 0); 981 if (!psVectorStats(median, fringe->f, NULL, NULL, 0)) { 982 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 983 return NULL; 984 } 976 985 scale->coeff->data.F32[0] -= median->sampleMedian; 977 986 scale->coeff->data.F32[i] = 0.0; -
trunk/psModules/src/detrend/pmOverscan.c
r23826 r23989 74 74 mask->data.PS_TYPE_VECTOR_MASK_DATA[i] = 0; 75 75 ordinate->data.F32[i] = 2.0*(float)i/(float)pixels->n - 1.0; // Scale to [-1,1] 76 psVectorStats(myStats, values, NULL, NULL, 0); 76 if (!psVectorStats(myStats, values, NULL, NULL, 0)) { 77 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 78 return false; 79 } 77 80 reduced->data.F32[i] = psStatsGetValue(myStats, statistic); 78 81 } else if (overscanOpts->fitType == PM_FIT_NONE) { … … 275 278 psFree(iter); 276 279 277 (void)psVectorStats(stats, pixels, NULL, NULL, 0); 280 if (!psVectorStats(stats, pixels, NULL, NULL, 0)) { 281 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 282 return false; 283 } 278 284 psFree(pixels); 279 285 double reduced = psStatsGetValue(stats, statistic); // Result of statistics … … 349 355 psString comment = NULL; // Comment to add 350 356 psStats *vectorStats = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV); 351 psVectorStats (vectorStats, reduced, NULL, NULL, 0); 357 if (!psVectorStats (vectorStats, reduced, NULL, NULL, 0)) { 358 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 359 return false; 360 } 352 361 psStringAppend(&comment, "Mean Overscan value: %f", vectorStats->sampleMean); 353 362 psMetadataAddStr(hdu->header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, comment, ""); … … 412 421 psString comment = NULL; // Comment to add 413 422 psStats *vectorStats = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV); 414 psVectorStats (vectorStats, reduced, NULL, NULL, 0); 423 if (!psVectorStats (vectorStats, reduced, NULL, NULL, 0)) { 424 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 425 return false; 426 } 415 427 psStringAppend(&comment, "Mean Overscan value: %f", vectorStats->sampleMean); 416 428 psMetadataAddStr(hdu->header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, comment, ""); -
trunk/psModules/src/detrend/pmRemnance.c
r23259 r23989 66 66 values->n = numValues; 67 67 if (!psVectorStats(stats, values, NULL, NULL, 0)) { 68 // Can't do anything about it 69 psErrorClear(); 68 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 69 return false; 70 } 71 if (isnan(stats->sampleMedian)) { 70 72 maxMask = max; 71 73 continue; -
trunk/psModules/src/detrend/pmShutterCorrection.c
r23487 r23989 350 350 psStats *rawStats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); 351 351 psStats *resStats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); 352 psVectorStats (rawStats, counts, NULL, NULL, 0); 353 psVectorStats (resStats, resid, NULL, NULL, 0); 352 if (!psVectorStats (rawStats, counts, NULL, NULL, 0)) { 353 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 354 return NULL; 355 } 356 if (!psVectorStats (resStats, resid, NULL, NULL, 0)) { 357 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 358 return NULL; 359 } 354 360 355 361 // XXX temporary hard-wired minimum stdev improvement factor 356 362 psTrace("psModules.detrend", 3, "raw scatter %f vs res scatter %f\n", rawStats->sampleStdev, resStats->sampleStdev); 357 363 if (rawStats->sampleStdev / resStats->sampleStdev < 1.5) corr->valid = false; 364 if (isnan(rawStats->sampleStdev) || isnan(resStats->sampleStdev)) corr->valid = false; 358 365 359 366 psFree (rawStats); -
trunk/psModules/src/extras/pmVisual.c
r23242 r23989 281 281 psStats *statsX = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); 282 282 psStats *statsY = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); 283 psVectorStats (statsX, xVec, NULL, NULL, 0); 284 psVectorStats (statsY, yVec, NULL, NULL, 0); 283 if (!psVectorStats (statsX, xVec, NULL, NULL, 0)) { 284 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 285 return false; 286 } 287 if (!psVectorStats (statsY, yVec, NULL, NULL, 0)) { 288 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 289 return false; 290 } 285 291 286 292 float xhi = statsX->sampleMedian + 3 *statsX->sampleStdev; -
trunk/psModules/src/imcombine/pmImageCombine.c
r21183 r23989 132 132 // Combine all the pixels, using the specified stat. 133 133 if (!psVectorStats(stats, pixelData, pixelErrors, pixelMasks, 0xff)) { 134 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 135 return false; 136 } 137 if (isnan(stats->sampleMean)) { 134 138 combine->data.F32[y][x] = NAN; 135 139 psFree(buffer); … … 137 141 } 138 142 float combinedPixel = stats->sampleMean; // Value of the combination 139 143 140 144 if (iter == 0) { 141 145 // Save the value produced with no rejection, since it may be useful later … … 364 368 // Get the median 365 369 psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN); 366 psVectorStats(stats, pixels, NULL, mask, 1); 370 if (!psVectorStats(stats, pixels, NULL, mask, 1)) { 371 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 372 } 367 373 float median = stats->sampleMedian; 368 374 psFree(stats); -
trunk/psModules/src/imcombine/pmReadoutCombine.c
r21363 r23989 384 384 // Combination 385 385 if (!psVectorStats(stats, pixels, errors, mask, 1)) { 386 // Can't do much about it, but it's not worth worrying about 387 psErrorClear(); 386 psError(PS_ERR_UNKNOWN, false, "error in pixel stats"); 387 return false; 388 } 389 390 outputImage[yOut][xOut] = psStatsGetValue(stats, params->combine); 391 392 if (isnan(outputImage[yOut][xOut])) { 388 393 outputImage[yOut][xOut] = NAN; 389 394 outputMask[yOut][xOut] = params->blank; 395 sigma->data.F32[yOut][xOut] = NAN; 390 396 if (params->variances) { 391 397 outputVariance[yOut][xOut] = NAN; 392 398 } 393 sigma->data.F32[yOut][xOut] = NAN; 394 } else { 395 outputImage[yOut][xOut] = psStatsGetValue(stats, params->combine); 396 outputMask[yOut][xOut] = isfinite(outputImage[yOut][xOut]) ? 0 : params->blank; 397 if (params->variances) { 398 float stdev = psStatsGetValue(stats, combineStdev); 399 outputVariance[yOut][xOut] = PS_SQR(stdev); // Variance 400 // XXXX this is not the correct formal error. 401 // also, the weighted mean is not obviously the correct thing here 402 } 403 sigma->data.F32[yOut][xOut] = psStatsGetValue(stats, combineStdev); 404 } 399 continue; 400 } 401 outputMask[yOut][xOut] = 0; 402 sigma->data.F32[yOut][xOut] = psStatsGetValue(stats, combineStdev); 403 if (params->variances) { 404 float stdev = psStatsGetValue(stats, combineStdev); 405 outputVariance[yOut][xOut] = PS_SQR(stdev); // Variance 406 // XXXX this is not the correct formal error. 407 // also, the weighted mean is not obviously the correct thing here 408 } 405 409 } 406 410 } -
trunk/psModules/src/imcombine/pmSubtraction.c
r23839 r23989 822 822 psFree(mask); 823 823 824 // XXX raise an error? 825 if (isnan(stats->sampleMean)) { 826 psFree(stats); 827 return -1; 828 } 829 824 830 double mean, rms; // Mean and RMS of deviations 825 831 if (numStamps < MIN_SAMPLE_STATS) { -
trunk/psModules/src/imcombine/pmSubtractionMatch.c
r23944 r23989 830 830 psFree(mask); 831 831 832 // XXX raise an error here or not? 833 if (isnan(stats->robustMedian)) { 834 psFree(stats); 835 return PM_SUBTRACTION_MODE_ERR; 836 } 837 832 838 psLogMsg("psModules.imcombine", PS_LOG_INFO, "Median width ratio: %lf", stats->robustMedian); 833 839 pmSubtractionMode mode = (stats->robustMedian <= 1.0 ? PM_SUBTRACTION_MODE_1 : PM_SUBTRACTION_MODE_2); 834 840 psFree(stats); 835 841 836 // XXX EAM : I think Paul left some test code in here. I've commented these lines out837 // return PM_SUBTRACTION_MODE_2;838 // exit(1);839 840 842 return mode; 841 843 } -
trunk/psModules/src/objects/models/pmModel_SGAUSS.c
r15834 r23989 325 325 326 326 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN); 327 psVectorStats (stats, contour, NULL, NULL, 0); 327 if (!psVectorStats (stats, contour, NULL, NULL, 0)) { 328 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 329 return false; 330 } 328 331 value = stats->sampleMedian; 329 332 -
trunk/psModules/src/objects/pmGrowthCurveGenerate.c
r21183 r23989 89 89 psVectorAppend (values, growth->fitMag); 90 90 } 91 psVectorStats (stats, values, NULL, NULL, 0); 91 if (!psVectorStats (stats, values, NULL, NULL, 0)) { 92 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 93 return false; 94 } 92 95 psf->growth->fitMag = stats->sampleMedian; 93 96 … … 104 107 psVectorAppend (values, growth->apMag->data.F32[i]); 105 108 } 106 psVectorStats (stats, values, NULL, NULL, 0); 109 if (!psVectorStats (stats, values, NULL, NULL, 0)) { 110 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 111 return false; 112 } 107 113 psf->growth->apMag->data.F32[i] = stats->sampleMedian; 108 114 } -
trunk/psModules/src/objects/pmPSFtry.c
r21183 r23989 211 211 212 212 if (Next == 0) { 213 psError(PS_ERR_UNKNOWN, true, "No sources with good extended fits from which to determine PSF.");213 psError(PS_ERR_UNKNOWN, false, "No sources with good extended fits from which to determine PSF."); 214 214 psFree(psfTry); 215 215 return NULL; … … 282 282 283 283 if (Npsf == 0) { 284 psError(PS_ERR_UNKNOWN, true, "No sources with good PSF fits after model is built.");284 psError(PS_ERR_UNKNOWN, false, "No sources with good PSF fits after model is built."); 285 285 psFree(psfTry); 286 286 return NULL; … … 643 643 } 644 644 if (entryMin == -1) { 645 psError (PS_ERR_UNKNOWN, true, "failed to find image map for shape params");645 psError (PS_ERR_UNKNOWN, false, "failed to find image map for shape params"); 646 646 return false; 647 647 } … … 958 958 float dEsquare = 0.0; 959 959 psStatsInit (stats); 960 psVectorStats (stats, e0res, NULL, mask, maskValue); 960 if (!psVectorStats (stats, e0res, NULL, mask, maskValue)) { 961 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 962 return false; 963 } 961 964 dEsquare += PS_SQR(psStatsGetValue(stats, stdevOpt)); 962 965 963 966 psStatsInit (stats); 964 psVectorStats (stats, e1res, NULL, mask, maskValue); 967 if (!psVectorStats (stats, e1res, NULL, mask, maskValue)) { 968 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 969 return false; 970 } 965 971 dEsquare += PS_SQR(psStatsGetValue(stats, stdevOpt)); 966 972 967 973 psStatsInit (stats); 968 psVectorStats (stats, e2res, NULL, mask, maskValue); 974 if (!psVectorStats (stats, e2res, NULL, mask, maskValue)) { 975 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 976 return false; 977 } 969 978 dEsquare += PS_SQR(psStatsGetValue(stats, stdevOpt)); 970 979 … … 1018 1027 float dEsquare = 0.0; 1019 1028 psStatsInit (statsS); 1020 psVectorStats (statsS, dE0subset, NULL, mkSubset, 0xff); 1029 if (!psVectorStats (statsS, dE0subset, NULL, mkSubset, 0xff)) { 1030 } 1021 1031 dEsquare += PS_SQR(psStatsGetValue(statsS, stdevOpt)); 1022 1032 1023 1033 psStatsInit (statsS); 1024 psVectorStats (statsS, dE1subset, NULL, mkSubset, 0xff); 1025 dEsquare += PS_SQR(psStatsGetValue(statsS, stdevOpt)); 1034 if (!psVectorStats (statsS, dE1subset, NULL, mkSubset, 0xff)) { 1035 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 1036 return false; 1037 } 1038 dEsquare += PS_SQR(psStatsGetValue(statsS, stdevOpt)); 1026 1039 1027 1040 psStatsInit (statsS); 1028 psVectorStats (statsS, dE2subset, NULL, mkSubset, 0xff); 1041 if (!psVectorStats (statsS, dE2subset, NULL, mkSubset, 0xff)) { 1042 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 1043 return false; 1044 } 1029 1045 dEsquare += PS_SQR(psStatsGetValue(statsS, stdevOpt)); 1030 1046 -
trunk/psModules/src/objects/pmSource.c
r23187 r23989 479 479 stats = psStatsAlloc (PS_STAT_CLIPPED_MEAN | PS_STAT_CLIPPED_STDEV); 480 480 481 psVectorStats (stats, tmpSx, NULL, NULL, 0); 481 if (!psVectorStats (stats, tmpSx, NULL, NULL, 0)) { 482 psError(PS_ERR_UNKNOWN, false, "failed to measure Sx stats"); 483 return (emptyClump); 484 } 482 485 psfClump.X = stats->clippedMean; 483 486 psfClump.dX = stats->clippedStdev; 484 487 485 psVectorStats (stats, tmpSy, NULL, NULL, 0); 488 if (!psVectorStats (stats, tmpSy, NULL, NULL, 0)) { 489 psError(PS_ERR_UNKNOWN, false, "failed to measure Sy stats"); 490 return (emptyClump); 491 } 486 492 psfClump.Y = stats->clippedMean; 487 493 psfClump.dY = stats->clippedStdev; … … 636 642 637 643 if (!psVectorStats (stats, starsn_moments, NULL, NULL, 0)) { 638 // Don't care about this error 639 psErrorClear(); 644 psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats"); 645 psFree (stats); 646 psFree (starsn_peaks); 647 return false; 640 648 } 641 649 psLogMsg ("pmObjects", 3, "SN range (moments): %f - %f\n", stats->min, stats->max); … … 648 656 stats = psStatsAlloc (PS_STAT_MIN | PS_STAT_MAX); 649 657 if (!psVectorStats (stats, starsn_peaks, NULL, NULL, 0)) { 650 // Don't care about this error 651 psErrorClear(); 658 psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats"); 659 psFree (stats); 660 psFree (starsn_peaks); 661 return false; 652 662 } 653 663 psLogMsg ("psModules.objects", 3, "SN range (peaks) : %f - %f (%ld)\n", -
trunk/psModules/src/objects/pmSourceFitModel.c
r23187 r23989 172 172 fitStatus = psMinimizeLMChi2(myMin, covar, params, constraint, x, y, yErr, model->modelFunc); 173 173 for (int i = 0; i < dparams->n; i++) { 174 if (psTraceGetLevel("psModules.objects") >= 4) {175 fprintf (stderr, "%f ", params->data.F32[i]);176 }177 174 if ((constraint->paramMask != NULL) && constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) 178 175 continue; 179 176 dparams->data.F32[i] = sqrt(covar->data.F32[i][i]); 177 if (psTraceGetLevel("psModules.objects") >= 4) { 178 fprintf (stderr, "%f +/- %f\n", params->data.F32[i], dparams->data.F32[i]); 179 } 180 180 } 181 181 psTrace ("psModules.objects", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value); -
trunk/psModules/src/objects/pmSourceMatch.c
r23241 r23989 473 473 return -1; 474 474 } 475 // XXX handle this case better: 476 if (isnan(stats->clippedMean)) { 477 psError(PS_ERR_UNKNOWN, false, "Unable to perform statistics on transparencies."); 478 psFree(stats); 479 return -1; 480 } 475 481 476 482 float thresh = stats->clippedMean + photoLevel * stats->clippedStdev; // Threshold for clouds -
trunk/psastro/src/psastroAstromGuess.c
r21422 r23989 382 382 psStats *statsQ = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV); 383 383 384 psVectorStats (statsP, cornerPd, NULL, cornerMK, 1); 385 psVectorStats (statsQ, cornerQd, NULL, cornerMK, 1); 384 if (!psVectorStats (statsP, cornerPd, NULL, cornerMK, 1)) { 385 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 386 return false; 387 } 388 if (!psVectorStats (statsQ, cornerQd, NULL, cornerMK, 1)) { 389 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 390 return false; 391 } 386 392 387 393 float angle = atan2 (map->y->coeff[1][0], map->x->coeff[1][0]); -
trunk/psastro/src/psastroFixChipsTest.c
r21409 r23989 140 140 psStats *stats; 141 141 stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 142 psVectorStats (stats, dX, NULL, NULL, 0); 142 if (!psVectorStats (stats, dX, NULL, NULL, 0)) { 143 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 144 return false; 145 } 143 146 Xo = stats->robustMedian; 144 147 fprintf (stderr, "offset x: %f +/- %f\n", stats->robustMedian, stats->robustStdev); … … 146 149 147 150 stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 148 psVectorStats (stats, dY, NULL, NULL, 0); 151 if (!psVectorStats (stats, dY, NULL, NULL, 0)) { 152 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 153 return false; 154 } 149 155 Yo = stats->robustMedian; 150 156 fprintf (stderr, "offset y: %f +/- %f\n", stats->robustMedian, stats->robustStdev); … … 168 174 } 169 175 stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 170 psVectorStats (stats, dT, NULL, NULL, 0); 176 if (!psVectorStats (stats, dT, NULL, NULL, 0)) { 177 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 178 return false; 179 } 171 180 float To = stats->robustMedian; 172 181 fprintf (stderr, "offset t: %f +/- %f\n", stats->robustMedian, stats->robustStdev); -
trunk/psastro/src/psastroModelAnalysis.c
r21409 r23989 153 153 154 154 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); 155 psVectorStats (stats, posZero, NULL, NULL, 0); 155 if (!psVectorStats (stats, posZero, NULL, NULL, 0)) { 156 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 157 return false; 158 } 156 159 157 160 fprintf (outfile, "# pos zero %f +/- %f\n", stats->sampleMedian, stats->sampleStdev); -
trunk/psastro/src/psastroModelFitBoresite.c
r21409 r23989 62 62 63 63 // center (Xo) = mean(Xo), RX = range / 2 64 psVectorStats (stats, Xo, NULL, NULL, 0); 64 if (!psVectorStats (stats, Xo, NULL, NULL, 0)) { 65 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 66 return NULL; 67 } 65 68 params->data.F32[PAR_X0] = stats->sampleMean; 66 69 params->data.F32[PAR_RX] = (stats->max - stats->min) / 2.0; 67 70 68 71 // center (Yo) = mean(Yo), RY = range / 2 69 psVectorStats (stats, Yo, NULL, NULL, 0); 72 if (!psVectorStats (stats, Yo, NULL, NULL, 0)) { 73 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 74 return NULL; 75 } 70 76 params->data.F32[PAR_Y0] = stats->sampleMean; 71 77 params->data.F32[PAR_RY] = (stats->max - stats->min) / 2.0; -
trunk/psastro/src/psastroZeroPoint.c
r21409 r23989 126 126 // this analysis has too few data points to use the robust median method 127 127 psStats *stats = psStatsAlloc (PS_STAT_CLIPPED_MEAN | PS_STAT_CLIPPED_STDEV); 128 psVectorStats (stats, dMag, NULL, NULL, 0); 128 if (!psVectorStats (stats, dMag, NULL, NULL, 0)) { 129 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 130 return false; 131 } 129 132 fprintf (stderr, "zero point %f +/- %f using %d stars; transparency %f\n", stats->clippedMean, stats->clippedStdev, Npts, zeropt - stats->clippedMean); 130 133 -
trunk/psphot/src/psphotApResid.c
r21519 r23989 355 355 356 356 if (j > 2) { 357 bool status = true; 358 status &= psVectorStats (statsS, dASubset, NULL, mkSubset, 0xff); 359 status &= psVectorStats (statsM, dMSubset, NULL, mkSubset, 0xff); 360 if (!status) { psErrorClear (); } 357 if (!psVectorStats (statsS, dASubset, NULL, mkSubset, 0xff)) { 358 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 359 return false; 360 } 361 if (!psVectorStats (statsM, dMSubset, NULL, mkSubset, 0xff)) { 362 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 363 return false; 364 } 361 365 dSo->data.F32[i] = statsS->robustStdev; 362 366 dMo->data.F32[i] = statsM->sampleMean; 363 367 dRo->data.F32[i] = statsS->robustStdev / statsM->sampleMean; 364 // fprintf (stderr, "%d (%d) : sys: %f, phot: %f, rat: %f\n", i, j, dSo->data.F32[i], dMo->data.F32[i], dRo->data.F32[i]);365 368 } else { 366 369 dSo->data.F32[i] = NAN; … … 375 378 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN); 376 379 if (!psVectorStats (stats, dRo, NULL, NULL, 0)) { 377 // XXX better testing of raised error 378 psErrorClear();380 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 381 return false; 379 382 } 380 383 -
trunk/psphot/src/psphotChoosePSF.c
r21183 r23989 361 361 362 362 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV | PS_STAT_SAMPLE_QUARTILE); 363 psVectorStats (stats, fwhmMajor, NULL, NULL, 0); 363 if (!psVectorStats (stats, fwhmMajor, NULL, NULL, 0)) { 364 psError(PS_ERR_UNKNOWN, false, "failure to measure stats for FWHM MAJOR"); 365 return false; 366 } 367 364 368 psMetadataAddF32 (recipe, PS_LIST_TAIL, "FWHM_MAJ", PS_META_REPLACE, "PSF FWHM Major axis (mean)", stats->sampleMean); 365 369 psMetadataAddF32 (recipe, PS_LIST_TAIL, "FW_MJ_SG", PS_META_REPLACE, "PSF FWHM Major axis (sigma)", stats->sampleStdev); … … 367 371 psMetadataAddF32 (recipe, PS_LIST_TAIL, "FW_MJ_UQ", PS_META_REPLACE, "PSF FWHM Major axis (upper quartile)", stats->sampleUQ); 368 372 369 psVectorStats (stats, fwhmMinor, NULL, NULL, 0); 373 if (!psVectorStats (stats, fwhmMinor, NULL, NULL, 0)) { 374 psError(PS_ERR_UNKNOWN, false, "failure to measure stats for FWHM MINOR"); 375 return false; 376 } 370 377 psMetadataAddF32 (recipe, PS_LIST_TAIL, "FWHM_MIN", PS_META_REPLACE, "PSF FWHM Minor axis (mean)", stats->sampleMean); 371 378 psMetadataAddF32 (recipe, PS_LIST_TAIL, "FW_MN_SG", PS_META_REPLACE, "PSF FWHM Minor axis (sigma)", stats->sampleStdev); -
trunk/psphot/src/psphotDiagnosticPlots.c
r21108 r23989 40 40 41 41 psStats *stats = psStatsAlloc (PS_STAT_MAX | PS_STAT_MIN); 42 psVectorStats (stats, values, NULL, NULL, 0); 42 if (!psVectorStats (stats, values, NULL, NULL, 0)) { 43 psError(PS_ERR_UNKNOWN, false, "failure to measure stats for histogram"); 44 return false; 45 } 43 46 44 47 psHistogram *histogram = psHistogramAlloc (stats->min, stats->max, 1000); … … 63 66 psStatsInit (stats); 64 67 stats->options = PS_STAT_MAX | PS_STAT_MIN; 65 psVectorStats (stats, histogram->nums, NULL, NULL, 0); 68 if (!psVectorStats (stats, histogram->nums, NULL, NULL, 0)) { 69 psError(PS_ERR_UNKNOWN, false, "failure to measure stats for histogram"); 70 return false; 71 } 66 72 67 73 // scale the plot to hold the histogram … … 100 106 psStatsInit (stats); 101 107 stats->options = PS_STAT_MAX | PS_STAT_MIN; 102 psVectorStats (stats, histogram->nums, NULL, NULL, 0); 108 if (!psVectorStats (stats, histogram->nums, NULL, NULL, 0)) { 109 psError(PS_ERR_UNKNOWN, false, "failure to measure stats for histogram"); 110 return false; 111 } 103 112 104 113 // scale the plot to hold the histogram -
trunk/psphot/src/psphotImageQuality.c
r20471 r23989 88 88 "Number of stars used for IQ measurements", M2->n); 89 89 90 // XXX make this a recipe option 90 91 #if (USE_SAMPLE) 91 92 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV | PS_STAT_SAMPLE_QUARTILE); -
trunk/psphot/src/psphotMakeResiduals.c
r21366 r23989 200 200 // measure the robust median to determine a baseline reference value 201 201 *fluxClip = *fluxClipDef; 202 psVectorStats (fluxClip, fluxes, NULL, fmasks, fmaskVal); 203 psErrorClear(); // clear (ignore) any outstanding errors 202 if (!psVectorStats (fluxClip, fluxes, NULL, fmasks, fmaskVal)) { 203 psError(PSPHOT_ERR_CONFIG, false, "Error calculating residual stats"); 204 return false; 205 } 206 if (isnan(fluxClip->robustMedian)) { 207 resid->Ro->data.F32[oy][ox] = 0.0; 208 resid->Rx->data.F32[oy][ox] = 0.0; 209 resid->Ry->data.F32[oy][ox] = 0.0; 210 resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = badMask; 211 continue; 212 } 204 213 205 214 // mark input pixels which are more than N sigma from the median … … 220 229 // measure the desired statistic on the unclipped pixels 221 230 *fluxStats = *fluxStatsDef; 222 psVectorStats (fluxStats, fluxes, NULL, fmasks, fmaskVal); 223 psErrorClear(); // clear (ignore) any outstanding errors 231 if (!psVectorStats (fluxStats, fluxes, NULL, fmasks, fmaskVal)) { 232 psError(PSPHOT_ERR_CONFIG, false, "Error calculating residual stats"); 233 return false; 234 } 224 235 225 236 resid->Ro->data.F32[oy][ox] = psStatsGetValue(fluxStats, statOption); 226 237 resid->Rx->data.F32[oy][ox] = resid->Ry->data.F32[oy][ox] = 0.0; 227 //resid->variance->data.F32[oy][ox] = fluxStats->sampleStdev; 238 239 if (isnan(resid->Ro->data.F32[oy][ox])) { 240 resid->Ro->data.F32[oy][ox] = 0.0; 241 resid->Rx->data.F32[oy][ox] = 0.0; 242 resid->Ry->data.F32[oy][ox] = 0.0; 243 resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = badMask; 244 continue; 245 } 228 246 229 247 if (fabs(resid->Ro->data.F32[oy][ox]) < pixelSN*fluxStats->sampleStdev/sqrt(nKeep)) { -
trunk/psphot/src/psphotRoughClass.c
r21183 r23989 91 91 return false; 92 92 } 93 if (!psfClump.X || !psfClump.Y ) {93 if (!psfClump.X || !psfClump.Y || isnan(psfClump.X) || isnan(psfClump.Y)) { 94 94 psLogMsg ("psphot", 4, "Failed to find a valid PSF clump for region %f,%f - %f,%f\n", region->x0, region->y0, region->x1, region->y1); 95 95 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
