Changeset 25406 for branches/eam_branches/20090715/pswarp/src/pswarpLoop.c
- Timestamp:
- Sep 15, 2009, 4:02:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/pswarp/src/pswarpLoop.c
r24491 r25406 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.
