Changeset 20999 for trunk/psModules/src/camera
- Timestamp:
- Dec 15, 2008, 3:58:30 PM (18 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 2 edited
-
pmReadoutFake.c (modified) (3 diffs)
-
pmReadoutFake.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmReadoutFake.c
r20937 r20999 50 50 bool pmReadoutFakeFromSources(pmReadout *readout, int numCols, int numRows, const psArray *sources, 51 51 const psVector *xOffset, const psVector *yOffset, const pmPSF *psf, 52 float minFlux, int radius, bool circularise )52 float minFlux, int radius, bool circularise, bool normalisePeak) 53 53 { 54 54 PS_ASSERT_PTR_NON_NULL(readout, false); … … 83 83 pmModel *fakeModel = pmModelFromPSFforXY(psf, (float)numCols / 2.0, (float)numRows / 2.0, 84 84 1.0); // Fake model, with central intensity of 1.0 85 psAssert (fakeModel, "failed to generate model: should this be an error or not?");85 psAssert(fakeModel, "failed to generate model: should this be an error or not?"); 86 86 87 88 float flux0 = fakeModel->modelFlux(fakeModel->params); // Flux for central intensity of 1.0 87 float flux0 = NAN; // Flux for central intensity of 1.0 88 if (normalisePeak) { 89 flux0 = fakeModel->modelFlux(fakeModel->params); // Flux for central intensity of 1.0 90 } 89 91 90 92 if (circularise && !circulariseModel(fakeModel)) { … … 112 114 } 113 115 114 pmModel *fakeModel = pmModelFromPSFforXY(psf, x, y, powf(10.0, -0.4 * source->psfMag) / flux0); 116 float flux = powf(10.0, -0.4 * source->psfMag); // Flux of source 117 if (normalisePeak) { 118 flux /= flux0; 119 } 120 121 pmModel *fakeModel = pmModelFromPSFforXY(psf, x, y, flux); 115 122 if (!fakeModel) { 116 123 continue; -
trunk/psModules/src/camera/pmReadoutFake.h
r15838 r20999 21 21 float minFlux, ///< Minimum flux to bother about; for setting source radius 22 22 int radius, ///< Fixed radius for sources 23 bool circularise ///< Circularise PSF model? 23 bool circularise, ///< Circularise PSF model? 24 bool normalise ///< Normalise the peak value? 24 25 ); 25 26
Note:
See TracChangeset
for help on using the changeset viewer.
