- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/ppSim
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/ppSim merged eligible /branches/eam_branches/stackphot.20100406/ppSim 27629-27654 /branches/pap_delete/ppSim 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simtest_nebulous_branches/ppSim/src/ppSimInsertStars.c
r21365 r27840 26 26 float expTime = psMetadataLookupF32(NULL, recipe, "EXPTIME"); // Exposure time 27 27 float darkRate = psMetadataLookupF32(NULL, recipe, "DARK.RATE"); // Dark rate 28 float nSigmaLim = psMetadataLookupF32(NULL, recipe, "STARS.SIGMA.LIM"); // significance of faintest stars 28 29 29 30 float readnoise = psMetadataLookupF32(NULL, cell->concepts, "CELL.READNOISE");// CCD read noise, e … … 106 107 pmModelSetFlux (model, flux); 107 108 108 // XXX let the flux limit be a user-defined number of sky sigmas (not just 1.0) 109 float radius = model->modelRadius (model->params, roughNoise); 109 float radius = model->modelRadius (model->params, nSigmaLim * roughNoise); 110 110 radius = PS_MAX (radius, 1.0); 111 111 … … 136 136 RESET(source->maskView); 137 137 RESET(source->modelFlux); 138 RESET(source->psf Flux);138 RESET(source->psfImage); 139 139 RESET(source->blends); 140 140 … … 145 145 fclose (outfile); 146 146 147 // NOTE: the pmFPAfile "PPSIM.OUTPUT" points at these sources 148 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "fake sources", sources); 149 psFree(sources); 147 pmDetections *detections = pmDetectionsAlloc(); 148 detections->allSources = sources; 149 150 // save detections on the readout->analysis 151 if (!psMetadataAddPtr (readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN, "fake sources", detections)) { 152 psError (PSPHOT_ERR_CONFIG, false, "problem saving detections on readout"); 153 return false; 154 } 155 psFree(detections); 150 156 151 157 // XXX many leaks in here, i think
Note:
See TracChangeset
for help on using the changeset viewer.
