Changeset 26374
- Timestamp:
- Dec 8, 2009, 7:11:15 PM (16 years ago)
- Location:
- branches/eam_branches/20091201/ppSim/src
- Files:
-
- 5 edited
-
Makefile.am (modified) (1 diff)
-
ppSim.h (modified) (1 diff)
-
ppSimAddNoise.c (modified) (1 diff)
-
ppSimLoop.c (modified) (1 diff)
-
ppSimSetPSF.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppSim/src/Makefile.am
r23808 r26374 30 30 ppSimLoadStars.c \ 31 31 ppSimMakeStars.c \ 32 ppSimMakeStarGrid.c \ 32 33 ppSimMakeGalaxies.c \ 33 34 ppSimMakeBiassec.c \ -
branches/eam_branches/20091201/ppSim/src/ppSim.h
r23836 r26374 103 103 bool ppSimLoadStars (psArray *stars, pmFPA *fpa, pmConfig *config); 104 104 bool ppSimMakeStars(psArray *stars, pmFPA *fpa, pmConfig *config, const psRandom *rng); 105 bool ppSimMakeStarGrid(psArray *stars, pmFPA *fpa, pmConfig *config, const psRandom *rng); 105 106 bool ppSimInsertStars (pmReadout *readout, psImage *expCorr, psArray *stars, pmConfig *config); 106 107 -
branches/eam_branches/20091201/ppSim/src/ppSimAddNoise.c
r18011 r26374 16 16 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSIM_RECIPE); // Recipe 17 17 18 float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); // CCD gain, e/ADU 18 // the recipe should set GAIN to NAN, and only modify to override the concept value 19 float gain = psMetadataLookupF32(&mdok, recipe, "GAIN"); // CCD gain, e/ADU 19 20 if (isnan(gain)) { 20 psWarning("CELL.GAIN is not set; reverting to recipe value GAIN."); 21 gain = psMetadataLookupF32(&mdok, recipe, "GAIN"); 21 gain = psMetadataLookupF32(&mdok, cell->concepts, "CELL.GAIN"); 22 22 if (!mdok) { 23 ps Error(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to find GAIN in recipe.");24 return false;23 psWarning("CELL.GAIN is not set; assuming gain of 1.0."); 24 gain = 1.0; 25 25 } 26 26 } -
branches/eam_branches/20091201/ppSim/src/ppSimLoop.c
r25760 r26374 47 47 // Add random stars 48 48 if (!ppSimMakeStars (stars, fpa, config, rng)) ESCAPE (PS_ERR_UNKNOWN, "failed to make random stars"); 49 50 // Add random stars 51 if (!ppSimMakeStarGrid (stars, fpa, config, rng)) ESCAPE (PS_ERR_UNKNOWN, "failed to make random stars"); 49 52 50 53 // Add random galaxies -
branches/eam_branches/20091201/ppSim/src/ppSimSetPSF.c
r18011 r26374 20 20 // ppSimArguments) 21 21 float seeing = psMetadataLookupF32(&status, recipe, "SEEING"); // Seeing SIGMA (pixels) 22 float aRatio = psMetadataLookupF32(&status, recipe, "PSF.ARATIO"); // Seeing SIGMA (pixels) 23 float theta = psMetadataLookupF32(&status, recipe, "PSF.THETA"); // Seeing SIGMA (pixels) 22 24 23 25 char *psfModelName = psMetadataLookupStr(&status, recipe, "PSF.MODEL"); // Name of PSF model … … 55 57 // supply the semi-major axis (these are SIGMA values in PIXELS) 56 58 axes.major = seeing; 57 axes.minor = seeing;58 axes.theta = 0.0;59 axes.minor = aRatio * seeing; 60 axes.theta = theta * PS_RAD_DEG; 59 61 60 62 pol = psEllipseAxesToPol (axes);
Note:
See TracChangeset
for help on using the changeset viewer.
