Changeset 21365 for trunk/ppSim/src/ppSimPhotomReadoutFake.c
- Timestamp:
- Feb 5, 2009, 4:47:00 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimPhotomReadoutFake.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimPhotomReadoutFake.c
r21183 r21365 12 12 } 13 13 14 # if 0 14 # if 0 15 15 // set the photcode for this image 16 16 if (!psphotAddPhotcode (recipe, config, view, "PPSIM.FAKE.CHIP")) { … … 22 22 // *** in this section, perform the photometry for real + fake sources on PPSIM.FAKE.CHIP *** 23 23 24 // find the currently selected readout. 24 // find the currently selected readout. 25 25 // we always perform photometry on the mosaiced chip 26 26 pmReadout *readout = pmFPAfileThisReadout (config->files, view, "PPSIM.FAKE.CHIP"); … … 35 35 PS_ASSERT_PTR_NON_NULL (injectedSources, false); 36 36 37 // Generate the mask and weightimages, including the user-defined analysis region of interest38 psphotSetMaskAnd Weight(config, readout, recipe);37 // Generate the mask and variance images, including the user-defined analysis region of interest 38 psphotSetMaskAndVariance (config, readout, recipe); 39 39 40 40 // XXX need to define the source pixels … … 53 53 psArray *realSources = psArrayAlloc (realMeasuredSources->n); 54 54 for (int i = 0; i < realMeasuredSources->n; i++) { 55 realSources->data[i] = pmSourceCopy (realMeasuredSources->data[i]);55 realSources->data[i] = pmSourceCopy (realMeasuredSources->data[i]); 56 56 } 57 57 58 58 // load the psf model, if suppled. FWHM_X,FWHM_Y,etc are saved in the recipe 59 // this function uses PSPHOT.PSF.LOAD as the pmFPAfile 59 // this function uses PSPHOT.PSF.LOAD as the pmFPAfile 60 60 pmPSF *psf = psphotLoadPSF (config, view, recipe); 61 61 assert (psf); 62 62 63 // remove all sources 63 // remove all sources 64 64 psphotRemoveAllSources (realSources, recipe); 65 65 … … 76 76 77 77 // XXX fake sources should measure peak->x,y, force sources should not 78 psImageMaskType maskVal = 0xff; 78 psImageMaskType maskVal = 0xff; 79 79 psImage *significance = psphotSignificanceImage (readout, recipe, 1, maskVal); 80 80 ppSimDetections (significance, recipe, fakeSources); … … 90 90 psphotGuessModels (config, readout, realSources, psf); 91 91 psphotGuessModels (config, readout, fakeSources, psf); 92 92 93 93 // linear fit to real + fake sources 94 94 psArray *sources = ppSimMergeSources (realSources, fakeSources); … … 113 113 pmReadout *fakeReadout = pmFPAfileThisReadout (config->files, view, "PPSIM.FAKE.SOURCES"); 114 114 if (!fakeReadout) { 115 fakeReadout = pmReadoutAlloc (fakeCell);116 psFree (fakeReadout); // there is a copy on 'cell' as well115 fakeReadout = pmReadoutAlloc (fakeCell); 116 psFree (fakeReadout); // there is a copy on 'cell' as well 117 117 } 118 118 psAssert (fakeReadout, "no fakeReadout?");
Note:
See TracChangeset
for help on using the changeset viewer.
