Changeset 25051 for branches/czw_branch/cleanup/pswarp/src/pswarpLoop.c
- Timestamp:
- Aug 11, 2009, 3:54:00 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pswarp/src/pswarpLoop.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup
- Property svn:mergeinfo changed
/trunk merged: 24940-24950,24953-24971,24973-24977,24986-24989,24993-25017,25019,25021,25023-25024,25026,25029-25031,25036-25049
- Property svn:mergeinfo changed
-
branches/czw_branch/cleanup/pswarp/src/pswarpLoop.c
r24491 r25051 315 315 316 316 317 // Set variance factor318 {319 bool mdok; // Status of MD lookup320 float varFactor = psMetadataLookupF32(&mdok, output->analysis, PSWARP_ANALYSIS_VARFACTOR);321 long goodPix = psMetadataLookupS64(&mdok, output->analysis, PSWARP_ANALYSIS_GOODPIX);322 varFactor /= goodPix;323 324 psMetadataItem *vfItem = psMetadataLookup(outCell->concepts, "CELL.VARFACTOR"); ///< Item to update325 psAssert(vfItem && vfItem->type == PS_TYPE_F32, "Concept should be as specified.");326 if (!isfinite(vfItem->data.F32)) {327 vfItem->data.F32 = varFactor;328 } else {329 vfItem->data.F32 *= varFactor;330 }331 }332 333 317 // Set covariance matrix for output 334 318 { … … 406 390 pmFPAview *view = pmFPAviewAlloc(0); ///< View into skycell 407 391 view->chip = view->cell = view->readout = 0; 408 409 // Need to adjust the weight --- the main operation in psphotReadoutFindPSF is not determining the410 // signficance of sources, but looking at the significance of individual pixels.411 // We can adjust the weight directly since this is a deep copy412 pmReadout *photRO = pmFPAviewThisReadout(view, photFile->fpa);413 float vf = psMetadataLookupF32(NULL, photRO->parent->concepts, "CELL.VARFACTOR"); // Variance factor414 psBinaryOp(photRO->variance, photRO->variance, "*", psScalarAlloc(vf, PS_TYPE_F32));415 392 416 393 // grab the sources of interest from the storage location (pmFPAfile PSPHOT.INPUT.CMF)
Note:
See TracChangeset
for help on using the changeset viewer.
