- Timestamp:
- Mar 29, 2015, 5:55:41 AM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150112/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150112/psphot
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20150112/psphot/src
- Property svn:ignore
-
old new 27 27 psmakecff 28 28 psphotFullForceSummary 29 psphotVersionDefinitions.h.tmp
-
- Property svn:ignore
-
branches/eam_branches/ipp-20150112/psphot/src/psphotLensing.c
r36865 r38057 138 138 psVector *psf_e1sh = psVectorAllocEmpty (300, PS_TYPE_F32); 139 139 psVector *psf_e2sh = psVectorAllocEmpty (300, PS_TYPE_F32); 140 psVector *psf_e1 = psVectorAllocEmpty (300, PS_TYPE_F32); 141 psVector *psf_e2 = psVectorAllocEmpty (300, PS_TYPE_F32); 140 142 psVector *xPos = psVectorAllocEmpty (300, PS_TYPE_F32); 141 143 psVector *yPos = psVectorAllocEmpty (300, PS_TYPE_F32); … … 178 180 179 181 pmModel *model = source->modelPSF; 182 183 float R = source->moments->Mxx + source->moments->Myy; 184 source->lensingOBJ->e1 = (source->moments->Mxx - source->moments->Myy) / R; 185 source->lensingOBJ->e2 = 2*source->moments->Mxy / R; 180 186 181 187 psVectorAppend (xPos, model->params->data.F32[PM_PAR_XPOS]); … … 191 197 psVectorAppend (psf_e1sh, source->lensingOBJ->shear->e1); 192 198 psVectorAppend (psf_e2sh, source->lensingOBJ->shear->e2); 199 psVectorAppend (psf_e1, source->lensingOBJ->e1); 200 psVectorAppend (psf_e2, source->lensingOBJ->e2); 193 201 Npsf ++; 194 202 } … … 247 255 pmTrend2D *trend_e2sh = pmTrend2DAlloc (PM_TREND_MAP, readout->image, Nx, Ny, stats); 248 256 257 pmTrend2D *trend_e1 = pmTrend2DAlloc (PM_TREND_MAP, readout->image, Nx, Ny, stats); 258 pmTrend2D *trend_e2 = pmTrend2DAlloc (PM_TREND_MAP, readout->image, Nx, Ny, stats); 259 249 260 bool goodFit = false; 250 261 if (!pmTrend2DFit (&goodFit, trendX11sm, NULL, 0xff, xPos, yPos, psfX11sm, NULL)) { psWarning ("failed to measure X11 smear trend"); } … … 259 270 if (!pmTrend2DFit (&goodFit, trend_e1sh, NULL, 0xff, xPos, yPos, psf_e1sh, NULL)) { psWarning ("failed to measure e1 shear trend"); } 260 271 if (!pmTrend2DFit (&goodFit, trend_e2sh, NULL, 0xff, xPos, yPos, psf_e2sh, NULL)) { psWarning ("failed to measure e2 shear trend"); } 272 273 if (!pmTrend2DFit (&goodFit, trend_e1, NULL, 0xff, xPos, yPos, psf_e1, NULL)) { psWarning ("failed to measure e1 trend"); } 274 if (!pmTrend2DFit (&goodFit, trend_e2, NULL, 0xff, xPos, yPos, psf_e2, NULL)) { psWarning ("failed to measure e2 trend"); } 261 275 262 276 // evaluate the PSF trend maps at the location of all sources … … 295 309 smear->e1 = pmTrend2DEval (trend_e1sm, xPos, yPos); 296 310 smear->e2 = pmTrend2DEval (trend_e2sm, xPos, yPos); 311 312 lensing->e1 = pmTrend2DEval (trend_e1, xPos, yPos); 313 lensing->e2 = pmTrend2DEval (trend_e2, xPos, yPos); 297 314 } 298 315 … … 309 326 psFree (trend_e2sh); 310 327 328 psFree (trend_e1); 329 psFree (trend_e2); 330 311 331 psFree (psfX11sm); 312 332 psFree (psfX12sm); … … 314 334 psFree (psf_e1sm); 315 335 psFree (psf_e2sm); 336 316 337 psFree (psfX11sh); 317 338 psFree (psfX12sh); … … 319 340 psFree (psf_e1sh); 320 341 psFree (psf_e2sh); 342 343 psFree (psf_e1); 344 psFree (psf_e2); 345 321 346 psFree (xPos ); 322 347 psFree (yPos );
Note:
See TracChangeset
for help on using the changeset viewer.
