Changeset 28643 for branches/eam_branches/ipp-20100621/psphot
- Timestamp:
- Jul 9, 2010, 10:56:32 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621/psphot/src
- Files:
-
- 12 edited
-
psphot.h (modified) (2 diffs)
-
psphotBlendFit.c (modified) (12 diffs)
-
psphotChoosePSF.c (modified) (2 diffs)
-
psphotExtendedSourceFits.c (modified) (3 diffs)
-
psphotFindDetections.c (modified) (1 diff)
-
psphotFitSet.c (modified) (1 diff)
-
psphotReadout.c (modified) (1 diff)
-
psphotSetThreads.c (modified) (1 diff)
-
psphotSourceFits.c (modified) (14 diffs)
-
psphotSourceSize.c (modified) (3 diffs)
-
psphotSourceStats.c (modified) (3 diffs)
-
psphotVisual.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/psphot/src/psphot.h
r28013 r28643 211 211 bool psphotInitLimitsPSF (psMetadata *recipe, pmReadout *readout); 212 212 bool psphotInitLimitsEXT (psMetadata *recipe); 213 bool psphotFitBlend (pmReadout *readout, pmSource *source, pmPSF *psf, p sImageMaskType maskVal, psImageMaskType markVal);214 bool psphotFitBlob (pmReadout *readout, pmSource *source, psArray *sources, pmPSF *psf, p sImageMaskType maskVal, psImageMaskType markVal);215 bool psphotFitPSF (pmReadout *readout, pmSource *source, pmPSF *psf, p sImageMaskType maskVal, psImageMaskType markVal);216 pmModel *psphotFitEXT (pmReadout *readout, pmSource *source, pm ModelType modelType, psImageMaskType maskVal, psImageMaskType markVal);217 psArray *psphotFitDBL (pmReadout *readout, pmSource *source, p sImageMaskType maskVal, psImageMaskType markVal);213 bool psphotFitBlend (pmReadout *readout, pmSource *source, pmPSF *psf, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal); 214 bool psphotFitBlob (pmReadout *readout, pmSource *source, psArray *sources, pmPSF *psf, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal); 215 bool psphotFitPSF (pmReadout *readout, pmSource *source, pmPSF *psf, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal); 216 pmModel *psphotFitEXT (pmReadout *readout, pmSource *source, pmSourceFitOptions *fitOptions, pmModelType modelType, psImageMaskType maskVal, psImageMaskType markVal); 217 psArray *psphotFitDBL (pmReadout *readout, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal); 218 218 219 219 // functions to support simultaneous multi-source fitting … … 252 252 bool psphotVisualShowBackground (pmConfig *config, const pmFPAview *view, pmReadout *readout); 253 253 bool psphotVisualShowSignificance (psImage *image, float min, float max); 254 bool psphotVisualShowLogSignificance (psImage *image, float min, float max); 254 255 bool psphotVisualShowPeaks (pmDetections *detections); 255 256 bool psphotVisualShowFootprints (pmDetections *detections); -
branches/eam_branches/ipp-20100621/psphot/src/psphotBlendFit.c
r28405 r28643 75 75 76 76 // Define source fitting parameters for extended source fits 77 pmSourceFitModelInit(fitIter, fitTol, PS_SQR(skySig), poisson); 77 pmSourceFitOptions *fitOptions = pmSourceFitOptionsAlloc(); 78 fitOptions->nIter = fitIter; 79 fitOptions->tol = fitTol; 80 fitOptions->poissonErrors = poisson; 81 fitOptions->weight = PS_SQR(skySig); 82 fitOptions->mode = PM_SOURCE_FIT_PSF; 78 83 79 84 psphotInitLimitsPSF (recipe, readout); … … 88 93 if (!sources->n) { 89 94 psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping blend"); 95 psFree (fitOptions); 90 96 return true; 91 97 } … … 112 118 psArrayAdd(job->args, 1, psf); 113 119 psArrayAdd(job->args, 1, newSources); // return for new sources 120 psArrayAdd(job->args, 1, fitOptions); // default fit options 114 121 psFree (newSources); 115 122 … … 121 128 if (!psThreadJobAddPending(job)) { 122 129 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); 130 psFree (fitOptions); 123 131 return NULL; 124 132 } 125 126 # if (0)127 {128 int nfit = 0;129 int npsf = 0;130 int next = 0;131 int nfail = 0;132 psArray *newSources = psArrayAllocEmpty(16);133 134 if (!psphotBlendFit_Unthreaded (&nfit, &npsf, &next, &nfail, readout, recipe, cells->data[j], psf, newSources)) {135 psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");136 return NULL;137 }138 Nfit += nfit;139 Npsf += npsf;140 Next += next;141 Nfail += nfail;142 143 // add these back onto sources144 for (int k = 0; k < newSources->n; k++) {145 psArrayAdd (sources, 16, newSources->data[k]);146 }147 psFree (newSources);148 }149 # endif150 133 } 151 134 … … 153 136 if (!psThreadPoolWait (false)) { 154 137 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); 138 psFree (fitOptions); 155 139 return NULL; 156 140 } … … 163 147 } else { 164 148 psScalar *scalar = NULL; 165 scalar = job->args->data[ 5];149 scalar = job->args->data[6]; 166 150 Nfit += scalar->data.S32; 167 scalar = job->args->data[ 6];151 scalar = job->args->data[7]; 168 152 Npsf += scalar->data.S32; 169 scalar = job->args->data[ 7];153 scalar = job->args->data[8]; 170 154 Next += scalar->data.S32; 171 scalar = job->args->data[ 8];155 scalar = job->args->data[9]; 172 156 Nfail += scalar->data.S32; 173 157 … … 186 170 psphotSaveImage (NULL, readout->image, "image.v2.fits"); 187 171 } 172 psFree (fitOptions); 188 173 189 174 psLogMsg ("psphot.psphotBlendFit", PS_LOG_INFO, "fit models: %f sec for %d objects (%d psf, %d ext, %d failed, %ld skipped)\n", psTimerMark ("psphot.fit.nonlinear"), Nfit, Npsf, Next, Nfail, sources->n - Nfit); … … 204 189 psScalar *scalar = NULL; 205 190 206 pmReadout *readout = job->args->data[0]; 207 psMetadata *recipe = job->args->data[1]; 208 psArray *sources = job->args->data[2]; 209 pmPSF *psf = job->args->data[3]; 210 psArray *newSources = job->args->data[4]; 191 pmReadout *readout = job->args->data[0]; 192 psMetadata *recipe = job->args->data[1]; 193 psArray *sources = job->args->data[2]; 194 pmPSF *psf = job->args->data[3]; 195 psArray *newSources = job->args->data[4]; 196 pmSourceFitOptions *fitOptions = job->args->data[5]; 211 197 212 198 // bit-masks to test for good/bad pixels … … 269 255 Nfit ++; 270 256 257 if (0) { 258 psF32 Mxx = source->moments->Mxx; 259 psF32 Myy = source->moments->Myy; 260 fprintf (stderr, "1: Mxx: %f, Myy: %f\n", Mxx, Myy); 261 } 262 271 263 // try fitting PSFs or extended sources depending on source->mode 272 264 // these functions subtract the resulting fitted source 273 265 if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) { 274 if (psphotFitBlob (readout, source, newSources, psf, maskVal, markVal)) {266 if (psphotFitBlob (readout, source, newSources, psf, fitOptions, maskVal, markVal)) { 275 267 source->type = PM_SOURCE_TYPE_EXTENDED; 276 268 psTrace ("psphot", 5, "source at %7.1f, %7.1f is ext", source->peak->xf, source->peak->yf); … … 280 272 } 281 273 } else { 282 if (psphotFitBlend (readout, source, psf, maskVal, markVal)) {274 if (psphotFitBlend (readout, source, psf, fitOptions, maskVal, markVal)) { 283 275 source->type = PM_SOURCE_TYPE_STAR; 284 276 psTrace ("psphot", 5, "source at %7.1f, %7.1f is psf", source->peak->xf, source->peak->yf); … … 289 281 } 290 282 283 if (0) { 284 psF32 Mxx = source->moments->Mxx; 285 psF32 Myy = source->moments->Myy; 286 fprintf (stderr, "2: Mxx: %f, Myy: %f\n", Mxx, Myy); 287 } 288 291 289 psTrace ("psphot", 5, "source at %7.1f, %7.1f failed", source->peak->xf, source->peak->yf); 292 290 Nfail ++; … … 298 296 299 297 // change the value of a scalar on the array (wrap this and put it in psArray.h) 300 scalar = job->args->data[ 5];298 scalar = job->args->data[6]; 301 299 scalar->data.S32 = Nfit; 302 300 303 scalar = job->args->data[ 6];301 scalar = job->args->data[7]; 304 302 scalar->data.S32 = Npsf; 305 303 306 scalar = job->args->data[ 7];304 scalar = job->args->data[8]; 307 305 scalar->data.S32 = Next; 308 306 309 scalar = job->args->data[ 8];307 scalar = job->args->data[9]; 310 308 scalar->data.S32 = Nfail; 311 309 -
branches/eam_branches/ipp-20100621/psphot/src/psphotChoosePSF.c
r28013 r28643 74 74 75 75 // structure to store user options defining the psf 76 pmPSFOptions *options = pmPSFOptionsAlloc ();76 pmPSFOptions *options = pmPSFOptionsAlloc(); 77 77 78 78 // load user options from the recipe. no need to check existence -- they are … … 143 143 return false; 144 144 } 145 pmSourceFitModelInit(fitIter, fitTol, PS_SQR(SKY_SIG), options->poissonErrorsPhotLMM); 146 145 146 // options which modify the behavior of the model fitting 147 options->fitOptions = pmSourceFitOptionsAlloc(); 148 options->fitOptions->nIter = fitIter; 149 options->fitOptions->tol = fitTol; 150 options->fitOptions->poissonErrors = options->poissonErrorsPhotLMM; 151 options->fitOptions->weight = PS_SQR(SKY_SIG); 152 options->fitOptions->mode = PM_SOURCE_FIT_PSF; 153 147 154 psArray *stars = psArrayAllocEmpty (sources->n); 148 155 -
branches/eam_branches/ipp-20100621/psphot/src/psphotExtendedSourceFits.c
r28013 r28643 129 129 sources = psArraySort (sources, pmSourceSortBySN); 130 130 131 // Define source fitting parameters for extended source fits 132 pmSourceFitOptions *fitOptions = pmSourceFitOptionsAlloc(); 133 fitOptions->mode = PM_SOURCE_FIT_EXT; 134 // XXX for now, use the defaults for the rest: 135 // fitOptions->nIter = fitIter; 136 // fitOptions->tol = fitTol; 137 // fitOptions->poissonErrors = poisson; 138 // fitOptions->weight = PS_SQR(skySig); 139 131 140 // choose the sources of interest 132 141 for (int i = 0; i < sources->n; i++) { … … 215 224 psFree (source->modelFlux); 216 225 source->modelFlux = NULL; 217 modelFit = psphotFitEXT (readout, source, modelType, maskVal, markVal);226 modelFit = psphotFitEXT (readout, source, fitOptions, modelType, maskVal, markVal); 218 227 if (!modelFit) { 219 228 psTrace ("psphot", 5, "failed to fit plain model for object at %f, %f", source->moments->Mx, source->moments->My); … … 311 320 } 312 321 } 322 psFree (fitOptions); 313 323 314 324 psLogMsg ("psphot", PS_LOG_INFO, "extended source analysis: %f sec for %d objects\n", psTimerMark ("psphot"), Next); -
branches/eam_branches/ipp-20100621/psphot/src/psphotFindDetections.c
r28013 r28643 90 90 psphotVisualShowSignificance (significance, -1.0, PS_SQR(3.0*NSIGMA_PEAK)); 91 91 92 // XXX getting some strange results from significance image 93 if (0) { 94 psImage *lsig = (psImage *) psUnaryOp (NULL, significance, "log"); 95 psphotVisualShowSignificance (lsig, 0.0, 4.0); 96 psFree (lsig); 97 } 92 // display the log significance image 93 psphotVisualShowLogSignificance (significance, 0.0, 4.5); 98 94 99 95 // detect the peaks in the significance image -
branches/eam_branches/ipp-20100621/psphot/src/psphotFitSet.c
r21183 r28643 24 24 } 25 25 26 // Define source fitting parameters for extended source fits 27 pmSourceFitOptions *fitOptions = pmSourceFitOptionsAlloc(); 28 fitOptions->mode = PM_SOURCE_FIT_EXT; 29 // XXX for now, use the defaults for the rest: 30 // fitOptions->nIter = fitIter; 31 // fitOptions->tol = fitTol; 32 // fitOptions->poissonErrors = poisson; 33 // fitOptions->weight = PS_SQR(skySig); 34 26 35 // XXX pmSourceFitSet must cache the modelFlux? 27 pmSourceFitSet (source, modelSet, mode, maskVal);36 pmSourceFitSet (source, modelSet, fitOptions, maskVal); 28 37 29 38 // write out positive object -
branches/eam_branches/ipp-20100621/psphot/src/psphotReadout.c
r28398 r28643 53 53 } 54 54 55 // load the psf model, if suppled. FWHM_X,FWHM_Y,etc are determined and saved on 56 // readout->analysis XXX this function currently only works with a single PSPHOT.INPUT 55 // load the psf model, if suppled. FWHM_MAJ,FWHM_MIN,etc are determined and saved on 56 // readout->analysis. XXX Note: this function currently only works with a single 57 // PSPHOT.INPUT 57 58 if (!psphotLoadPSF (config, view)) { // ??? need to supply 2 ? 58 59 psError (PSPHOT_ERR_UNKNOWN, false, "error loading psf model"); -
branches/eam_branches/ipp-20100621/psphot/src/psphotSetThreads.c
r26894 r28643 30 30 psFree(task); 31 31 32 task = psThreadTaskAlloc("PSPHOT_BLEND_FIT", 9);32 task = psThreadTaskAlloc("PSPHOT_BLEND_FIT", 10); 33 33 task->function = &psphotBlendFit_Threaded; 34 34 psThreadTaskAdd(task); -
branches/eam_branches/ipp-20100621/psphot/src/psphotSourceFits.c
r26894 r28643 2 2 3 3 // given a source with an existing modelPSF, attempt a full PSF fit, subtract if successful 4 // XXX this function does not call pmSourceFitModelInit : fix this?5 4 6 5 static int NfitPSF = 0; … … 22 21 } 23 22 24 bool psphotFitBlend (pmReadout *readout, pmSource *source, pmPSF *psf, p sImageMaskType maskVal, psImageMaskType markVal) {23 bool psphotFitBlend (pmReadout *readout, pmSource *source, pmPSF *psf, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal) { 25 24 26 25 float x, y, dR; 26 27 pmSourceFitOptions options = *fitOptions; 27 28 28 29 // maskVal is used to test for rejected pixels, and must include markVal … … 31 32 // if this source is not a possible blend, just fit as PSF 32 33 if ((source->blends == NULL) || (source->mode & PM_SOURCE_MODE_SATSTAR)) { 33 bool status = psphotFitPSF (readout, source, psf, maskVal, markVal);34 bool status = psphotFitPSF (readout, source, psf, fitOptions, maskVal, markVal); 34 35 return status; 35 36 } … … 91 92 92 93 // fit PSF model 93 pmSourceFitSet (source, modelSet, PM_SOURCE_FIT_PSF, maskVal); 94 options.mode = PM_SOURCE_FIT_PSF; 95 pmSourceFitSet (source, modelSet, &options, maskVal); 94 96 95 97 // clear the circular mask … … 154 156 } 155 157 156 bool psphotFitPSF (pmReadout *readout, pmSource *source, pmPSF *psf, p sImageMaskType maskVal, psImageMaskType markVal) {158 bool psphotFitPSF (pmReadout *readout, pmSource *source, pmPSF *psf, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal) { 157 159 158 160 double chiTrend; 161 pmSourceFitOptions options = *fitOptions; 159 162 160 163 // maskVal is used to test for rejected pixels, and must include markVal … … 171 174 172 175 // fit PSF model (set/unset the pixel mask) 173 pmSourceFitModel (source, PSF, PM_SOURCE_FIT_PSF, maskVal); 176 options.mode = PM_SOURCE_FIT_PSF; 177 pmSourceFitModel (source, PSF, &options, maskVal); 174 178 175 179 if (!isfinite(PSF->params->data.F32[PM_PAR_I0])) psAbort("nan in fit"); … … 213 217 } 214 218 215 bool psphotFitBlob (pmReadout *readout, pmSource *source, psArray *newSources, pmPSF *psf, p sImageMaskType maskVal, psImageMaskType markVal) {219 bool psphotFitBlob (pmReadout *readout, pmSource *source, psArray *newSources, pmPSF *psf, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal) { 216 220 217 221 bool okEXT, okDBL; … … 246 250 247 251 // XXX need to handle failures better here 248 EXT = psphotFitEXT (readout, source, modelTypeEXT, maskVal, markVal);252 EXT = psphotFitEXT (readout, source, fitOptions, modelTypeEXT, maskVal, markVal); 249 253 if (!EXT) goto escape; 250 254 if (!isfinite(EXT->params->data.F32[PM_PAR_I0])) goto escape; … … 254 258 255 259 // DBL will always be defined, but DBL->data[n] might not 256 DBL = psphotFitDBL (readout, source, maskVal, markVal);260 DBL = psphotFitDBL (readout, source, fitOptions, maskVal, markVal); 257 261 if (!DBL) goto escape; 258 262 if (!DBL->n) goto escape; … … 379 383 380 384 // fit a double PSF source to an extended blob 381 psArray *psphotFitDBL (pmReadout *readout, pmSource *source, p sImageMaskType maskVal, psImageMaskType markVal) {385 psArray *psphotFitDBL (pmReadout *readout, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal) { 382 386 383 387 float dx, dy; … … 387 391 psEllipseMoments moments; 388 392 psArray *modelSet; 393 394 pmSourceFitOptions options = *fitOptions; 389 395 390 396 NfitDBL ++; … … 426 432 427 433 // fit PSF model (set/unset the pixel mask) 428 pmSourceFitSet (source, modelSet, PM_SOURCE_FIT_PSF, maskVal); 434 options.mode = PM_SOURCE_FIT_PSF; 435 pmSourceFitSet (source, modelSet, &options, maskVal); 429 436 return (modelSet); 430 437 } 431 438 432 pmModel *psphotFitEXT (pmReadout *readout, pmSource *source, pmModelType modelType, psImageMaskType maskVal, psImageMaskType markVal) { 439 pmModel *psphotFitEXT (pmReadout *readout, pmSource *source, pmSourceFitOptions *fitOptions, pmModelType modelType, psImageMaskType maskVal, psImageMaskType markVal) { 440 441 pmSourceFitOptions options = *fitOptions; 433 442 434 443 NfitEXT ++; … … 436 445 // maskVal is used to test for rejected pixels, and must include markVal 437 446 maskVal |= markVal; 447 448 psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5); 438 449 439 450 // use the source moments, etc to guess basic model parameters … … 448 459 } 449 460 461 // for sersic models, get the initial guess more carefully 462 // if (modelType == pmModelClassGetType("PS_MODEL_SERSIC")) { 463 // psphotGuessSersic (); 464 // // test and return NULL on failure? 465 // } 466 450 467 // fit EXT (not PSF) model (set/unset the pixel mask) 451 pmSourceFitModel (source, EXT, PM_SOURCE_FIT_EXT, maskVal); 468 options.mode = PM_SOURCE_FIT_EXT; 469 pmSourceFitModel (source, EXT, &options, maskVal); 470 471 psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0); 452 472 return (EXT); 453 473 } 474 475 // A sersic model is very sensitive to the index. attempt to find the index first by grid search in just the index 476 // bool psphotFitSersic (pmReadout *readout, pmSource *source, pmSourceFitOptions *fitOptions, pmModelType modelType, psImageMaskType maskVal, psImageMaskType markVal) { 477 // 478 // assert (model->type == pmModelClassGetType("PS_MODEL_SERSIC")); 479 // 480 // 481 // 482 // if (!model->modelGuess(model, source)) { 483 // } 484 // 485 // 486 // } -
branches/eam_branches/ipp-20100621/psphot/src/psphotSourceSize.c
r28013 r28643 1 1 # include "psphotInternal.h" 2 2 # include <gsl/gsl_sf_gamma.h> 3 4 # define KRON 1 3 5 4 6 typedef struct { … … 197 199 pmSourceSub (source, PM_MODEL_OP_FULL, options->maskVal); 198 200 201 // XXX test: switch to kron flux 202 # if (KRON) 203 float apMag = -2.5*log10(source->moments->KronFlux); 204 # else 199 205 float apMag = -2.5*log10(source->moments->Sum); 206 # endif 200 207 float dMag = source->psfMag - apMag; 201 208 … … 343 350 pmSourceSub (source, PM_MODEL_OP_FULL, options->maskVal); 344 351 352 # if (KRON) 353 float apMag = -2.5*log10(source->moments->KronFlux); 354 # else 345 355 float apMag = -2.5*log10(source->moments->Sum); 356 # endif 346 357 float dMag = source->psfMag - apMag; 347 358 348 359 // set nSigma to include both systematic and poisson error terms 349 360 // XXX the 'poisson error' contribution for size is probably wrong... 350 float nSigmaMAG = (dMag - options->ApResid) / hypot(source->errMag, options->ApSysErr); 361 // XXX add in a hard floor on the Ap Sys Err (to be a bit generous) 362 float nSigmaMAG = (dMag - options->ApResid) / hypot(source->errMag, hypot(options->ApSysErr, 0.025)); 351 363 float nSigmaMXX = (Mxx - psfClump->X) / hypot(psfClump->dX, psfClump->X*psfClump->X*source->errMag); 352 364 float nSigmaMYY = (Myy - psfClump->Y) / hypot(psfClump->dY, psfClump->Y*psfClump->Y*source->errMag); 365 366 fprintf (stderr, "Mxx: %f, Myy: %f, dx: %f, dy: %f, psfMag: %f, apMag: %f, dMag: %f, errMag: %f, nSigmaMag: %f\n", 367 Mxx, Myy, source->peak->xf - source->moments->Mx, source->peak->yf - source->moments->My, 368 source->psfMag, apMag, dMag, source->errMag, nSigmaMAG); 353 369 354 370 // partially-masked sources are more likely to be mis-measured PSFs -
branches/eam_branches/ipp-20100621/psphot/src/psphotSourceStats.c
r28440 r28643 1 1 # include "psphotInternal.h" 2 void pmSourceMomentsSetVerbose(bool state); 2 3 3 4 // convert detections to sources and measure their basic properties (moments, local sky, sky … … 369 370 maskVal |= markVal; 370 371 372 // XXX test : pmSourceMomentsSetVerbose(true); 373 371 374 // threaded measurement of the sources moments 372 375 int Nfail = 0; … … 408 411 // measure basic source moments (no S/N clipping on input pixels) 409 412 status = pmSourceMoments (source, RADIUS, SIGMA, 0.0, maskVal); 413 // XXX moments / aperture test: 414 if (0) { 415 // clear the mask bit and set the circular mask pixels 416 psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal)); 417 psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, 4.0*source->moments->Mrf, "OR", markVal); 418 419 float apMag = NAN; 420 pmSourcePhotometryAper (&apMag, NULL, source->pixels, source->maskObj, maskVal); 421 fprintf (stderr, "apMag: %f, kronMag: %f\n", apMag, -2.5*log10(source->moments->KronFlux)); 422 423 // clear the mask bit 424 psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal)); 425 } 410 426 if (status) { 411 427 Nmoments ++; -
branches/eam_branches/ipp-20100621/psphot/src/psphotVisual.c
r28435 r28643 228 228 229 229 psphotVisualRangeImage (kapa, image, "signif", 2, min, max); 230 231 pmVisualAskUser(NULL); 232 return true; 233 } 234 235 bool psphotVisualShowLogSignificance (psImage *image, float min, float max) { 236 237 if (!pmVisualTestLevel("psphot.image.logsignif", 3)) return true; 238 239 int kapa = psphotKapaChannel (1); 240 if (kapa == -1) return false; 241 242 psImage *lsig = (psImage *) psUnaryOp (NULL, image, "log"); 243 psphotVisualRangeImage (kapa, lsig, "log-signif", 2, min, max); 244 psFree (lsig); 230 245 231 246 pmVisualAskUser(NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
