Changeset 36621
- Timestamp:
- Mar 31, 2014, 11:44:03 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140226/psphot/src
- Files:
-
- 3 edited
-
psphotApResid.c (modified) (2 diffs)
-
psphotChoosePSF.c (modified) (1 diff)
-
psphotLensing.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140226/psphot/src/psphotApResid.c
r34404 r36621 214 214 215 215 // XXX make this user-configurable? 216 if (source->psfMagErr > 0.0 1) continue;216 if (source->psfMagErr > 0.03) continue; 217 217 218 218 // aperture residual for this source … … 267 267 268 268 // set the max order (0 = constant) which the number of psf stars can support: 269 // rule of thumb: require 3 stars per 'cell' (order+1)^2269 // we require only 3 stars for n = 0, increase stars / cell for higher order 270 270 int MaxOrderForStars = 0; 271 if (Npsf >= 12) MaxOrderForStars = 1; // 4 cells 272 if (Npsf >= 27) MaxOrderForStars = 2; // 9 cells 273 if (Npsf >= 48) MaxOrderForStars = 3; // 16 cells 274 if (Npsf > 75) MaxOrderForStars = 4; // 25 cells 271 if (Npsf >= 16) MaxOrderForStars = 1; // 4 cells 272 if (Npsf >= 54) MaxOrderForStars = 2; // 9 cells 273 if (Npsf >= 128) MaxOrderForStars = 3; // 16 cells 274 if (Npsf >= 300) MaxOrderForStars = 4; // 25 cells 275 if (Npsf > 576) MaxOrderForStars = 5; // 36 cells 275 276 276 277 pmTrend2DMode mode = PM_TREND_MAP; -
branches/eam_branches/ipp-20140226/psphot/src/psphotChoosePSF.c
r35769 r36621 399 399 char *modelName = pmModelClassGetName (psf->type); 400 400 psLogMsg ("psphot.pspsf", PS_LOG_WARN, "select psf model: %f sec\n", psTimerMark ("psphot.choose.psf")); 401 psLogMsg ("psphot.pspsf", PS_LOG_INFO, "psf model %s, ApResid: %f +/- %f \n", modelName, psf->ApResid, psf->dApResid);401 psLogMsg ("psphot.pspsf", PS_LOG_INFO, "psf model %s, ApResid: %f +/- %f (%d x %d model)\n", modelName, psf->ApResid, psf->dApResid, psf->trendNx, psf->trendNy); 402 402 403 403 psFree (options); -
branches/eam_branches/ipp-20140226/psphot/src/psphotLensing.c
r36619 r36621 158 158 159 159 // XXX make this user-configurable? 160 if (source->psfMagErr > 0.0 1) continue;160 if (source->psfMagErr > 0.03) continue; 161 161 162 162 // aperture residual for this source … … 192 192 193 193 // set the max order (0 = constant) which the number of psf stars can support: 194 // rule of thumb: require 3 stars per 'cell' (order+1)^2194 // we require only 3 stars for n = 0, increase stars / cell for higher order 195 195 int LensingTrendOrder = 0; 196 if (Npsf >= 12) LensingTrendOrder = 1; // 4 cells 197 if (Npsf >= 27) LensingTrendOrder = 2; // 9 cells 198 if (Npsf >= 48) LensingTrendOrder = 3; // 16 cells 199 if (Npsf > 75) LensingTrendOrder = 4; // 25 cells 196 if (Npsf >= 16) LensingTrendOrder = 1; // 4 cells 197 if (Npsf >= 54) LensingTrendOrder = 2; // 9 cells 198 if (Npsf >= 128) LensingTrendOrder = 3; // 16 cells 199 if (Npsf >= 300) LensingTrendOrder = 4; // 25 cells 200 if (Npsf > 576) LensingTrendOrder = 5; // 36 cells 200 201 201 202 pmTrend2DMode mode = PM_TREND_MAP; … … 217 218 } 218 219 220 psLogMsg ("psphot.lensing", PS_LOG_DETAIL, "generate lensing maps using %d objects (%d x %d grid)\n", Npsf, Nx, Ny); 221 219 222 // XXX allow user to set this optionally? 220 223 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); … … 249 252 for (int i = 0; i < sources->n; i++) { 250 253 source = sources->data[i]; 251 252 pmModel *model = source->modelPSF;253 254 float xPos = model->params->data.F32[PM_PAR_XPOS];255 float yPos = model->params->data.F32[PM_PAR_YPOS];254 pmPeak *peak = source->peak; 255 if (!peak) continue; 256 257 float xPos = peak->xf; 258 float yPos = peak->yf; 256 259 257 260 if (!source->lensingPSF) { … … 283 286 } 284 287 285 psLogMsg ("psphot.lensing", PS_LOG_DETAIL, "calculate lensing parameters for %d objects\n", (int) sources->n); 288 psFree (trendX11sm); 289 psFree (trendX12sm); 290 psFree (trendX22sm); 291 psFree (trend_e1sm); 292 psFree (trend_e2sm); 293 294 psFree (trendX11sh); 295 psFree (trendX12sh); 296 psFree (trendX22sh); 297 psFree (trend_e1sh); 298 psFree (trend_e2sh); 299 300 psFree (psfX11sm); 301 psFree (psfX12sm); 302 psFree (psfX22sm); 303 psFree (psf_e1sm); 304 psFree (psf_e2sm); 305 psFree (psfX11sh); 306 psFree (psfX12sh); 307 psFree (psfX22sh); 308 psFree (psf_e1sh); 309 psFree (psf_e2sh); 310 psFree (xPos ); 311 psFree (yPos ); 312 313 psFree (stats); 314 315 psLogMsg ("psphot.lensing", PS_LOG_DETAIL, "calculate lensing parameters for %d objects: %f sec\n", (int) sources->n, psTimerMark ("psphot.lensing")); 286 316 287 317 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
