- Timestamp:
- Mar 27, 2015, 10:41:36 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150326/psastro/src/psastroGalaxyShapeErrors.c
r38019 r38025 69 69 float *dPAR = model->dparams->data.F32; 70 70 71 if (!(isfinite(PAR[PM_PAR_SXX]) && isfinite(PAR[PM_PAR_SXY]) && isfinite(PAR[PM_PAR_SYY]))) { 72 // set a mask bit 73 continue; 74 } 75 if (!(isfinite(dPAR[PM_PAR_SXX]) && isfinite(dPAR[PM_PAR_SXY]) && isfinite(dPAR[PM_PAR_SYY]))) { 76 // set a (different) mask bit 77 continue; 78 } 79 71 80 // psphot writes out dPAR, but PAR is writen as MAJOR,MINOR,THETA but transformed 72 81 // to PAR[SXX,SXY,SYY] when the cmf is read. here we use a monte carlo to generate … … 85 94 float Sxy = PAR[PM_PAR_SXY] + dPAR[PM_PAR_SXY]*psRandomGaussian(rng); 86 95 float Syy = PAR[PM_PAR_SYY] + dPAR[PM_PAR_SYY]*psRandomGaussian(rng); 96 if (!(isfinite(Sxx) && isfinite(Sxy) && isfinite(Syy))) { 97 continue; 98 } 99 87 100 pmModelParamsToAxes (&axes, Sxx, Sxy, Syy, useReff); 88 101 if (!(isfinite(axes.major) && isfinite(axes.minor) && isfinite(axes.theta))) continue; … … 111 124 } 112 125 psFree (rng); 126 psFree (stats); 127 psFree (majorValues); 128 psFree (minorValues); 129 psFree (thetaValues); 113 130 114 psLogMsg ("psastro.galaxy", PS_LOG_INFO, "monte carlo shape errors for %d of %d objects: %f sec\n", nObjects, (int) sources->n, psTimerMark ("ps phot.choose.psf"));131 psLogMsg ("psastro.galaxy", PS_LOG_INFO, "monte carlo shape errors for %d of %d objects: %f sec\n", nObjects, (int) sources->n, psTimerMark ("psastro.galaxy.shape.errors")); 115 132 return true; 116 133 }
Note:
See TracChangeset
for help on using the changeset viewer.
