Changeset 23352 for branches/cnb_branches/cnb_branch_20090301/ppSim/src
- Timestamp:
- Mar 17, 2009, 12:08:50 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 6 edited
- 1 copied
-
. (modified) (1 prop)
-
ppSim/src/Makefile.am (modified) (2 diffs)
-
ppSim/src/ppSim.h (modified) (3 diffs)
-
ppSim/src/ppSimBadPixels.c (modified) (1 diff)
-
ppSim/src/ppSimLoop.c (modified) (1 diff)
-
ppSim/src/ppSimSequence.c (modified) (2 diffs)
-
ppSim/src/ppSimVersion.c (copied) (copied from trunk/ppSim/src/ppSimVersion.c )
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk merged eligible /branches/eam_branches/eam_branch_20090303 23158-23228
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/ppSim/src/Makefile.am
r18011 r23352 1 1 bin_PROGRAMS = ppSim ppSimSequence 2 2 3 ppSim_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) 3 # PPSIM_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 # PPSIM_BRANCH=`if [ -e ../../BRANCH ]; then cat ../../BRANCH; else svn info | sed -n -e '/URL:/ h' -e '/Repository Root:/ { x; H; x; s|Repository Root: \(.*\)\nURL: \1\(.*\)|\2| ; s|^/|| ; s|/[a-zA-Z]*/src.*|| ; p }'; fi` 5 # PPSIM_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 6 # 7 # # Force recompilation of ppSimVersion.c, since it gets the version information 8 # ppSimVersion.c: FORCE 9 # touch ppSimVersion.c 10 # FORCE: ; 11 12 ppSim_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) -DPPSIM_VERSION=$(SVN_VERSION) -DPPSIM_BRANCH=$(SVN_BRANCH) -DPPSIM_SOURCE=$(SVN_SOURCE) 4 13 ppSim_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS) $(PSASTRO_LIBS) 5 14 ppSim_SOURCES = \ … … 35 44 ppSimMosaicChip.c \ 36 45 ppSimRandomGaussian.c \ 37 ppSimBadPixels.c 46 ppSimBadPixels.c \ 47 ppSimVersion.c 38 48 39 49 ppSimSequence_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) -
branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSim.h
r21183 r23352 19 19 20 20 // Compare a value with minimum and maximum values, replacing where required. 21 #define COMPARE(VALUE,MIN,MAX) { \22 if (VALUE < MIN) { MIN = VALUE; } \23 if (VALUE > MAX) { MAX = VALUE; } \21 #define COMPARE(VALUE,MIN,MAX) { \ 22 if (VALUE < MIN) { MIN = VALUE; } \ 23 if (VALUE > MAX) { MAX = VALUE; } \ 24 24 } 25 25 … … 147 147 float ppSimMagToFlux (float mag, float zp); 148 148 149 float ppSimArgToRecipeF32(bool *status, 150 psMetadata *options, // Target to which to add value151 const char *recipeName, // Name for value in the recipe152 psMetadata *arguments, // Command-line arguments153 const char *argName// Argument name in the command-line arguments149 float ppSimArgToRecipeF32(bool *status, 150 psMetadata *options, // Target to which to add value 151 const char *recipeName, // Name for value in the recipe 152 psMetadata *arguments, // Command-line arguments 153 const char *argName // Argument name in the command-line arguments 154 154 ); 155 155 156 156 int ppSimArgToRecipeS32(bool *status, 157 psMetadata *options, // Target to which to add value158 const char *recipeName, // Name for value in the recipe159 psMetadata *arguments, // Command-line arguments160 const char *argName// Argument name in the command-line arguments157 psMetadata *options, // Target to which to add value 158 const char *recipeName, // Name for value in the recipe 159 psMetadata *arguments, // Command-line arguments 160 const char *argName // Argument name in the command-line arguments 161 161 ); 162 162 163 163 char *ppSimArgToRecipeStr(bool *status, 164 psMetadata *options, // Target to which to add value165 const char *recipeName, // Name for value in the recipe166 psMetadata *arguments, // Command-line arguments167 const char *argName// Argument name in the command-line arguments164 psMetadata *options, // Target to which to add value 165 const char *recipeName, // Name for value in the recipe 166 psMetadata *arguments, // Command-line arguments 167 const char *argName // Argument name in the command-line arguments 168 168 ); 169 169 170 170 bool ppSimArgToRecipeBool(bool *status, 171 psMetadata *options, // Target to which to add value172 const char *recipeName, // Name for value in the recipe173 psMetadata *arguments, // Command-line arguments174 const char *argName// Argument name in the command-line arguments171 psMetadata *options, // Target to which to add value 172 const char *recipeName, // Name for value in the recipe 173 psMetadata *arguments, // Command-line arguments 174 const char *argName // Argument name in the command-line arguments 175 175 ); 176 176 … … 198 198 bool ppSimDefinePixels (psArray *sources, pmReadout *readout, psMetadata *recipe); 199 199 200 /// Return software version 201 psString ppSimVersion(void); 202 203 /// Return software source 204 psString ppSimSource(void); 205 206 /// Return long version information 207 psString ppSimVersionLong(void); 208 200 209 #endif -
branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSimBadPixels.c
r20910 r23352 74 74 } 75 75 76 psRandom *pseudoRNG = psRandomAlloc (PS_RANDOM_TAUS, seed); // Pseudo-random number generator76 psRandom *pseudoRNG = psRandomAllocSpecific(PS_RANDOM_TAUS, seed); // Pseudo-random number generator 77 77 78 78 psImage *image = readout->image; // Image of interest -
branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSimLoop.c
r21365 r23352 25 25 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSIM_RECIPE); // Recipe 26 26 27 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS , 0); // Random number generator27 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS); // Random number generator 28 28 29 29 char *typeStr = psMetadataLookupStr(NULL, recipe, "IMAGE.TYPE"); // Type of image to simulate -
branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSimSequence.c
r19315 r23352 133 133 if (ppsim_recipe) psStringAppend (&ppSimCommand, " -recipe PPSIM %s", ppsim_recipe); 134 134 135 unsigned long seed = psMetadataLookupS32 (&status, config, "RND_SEED"); 136 if (!status) seed = 0; 137 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, seed); 135 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS); 138 136 139 137 psMetadataItem *item = psMetadataLookup (config, "SEQUENCE"); 140 138 if (item == NULL) { 141 139 psLogMsg ("ppSimSequence", PS_LOG_WARN, "missing SEQUENCE description"); 142 exit ( 1);140 exit (PS_EXIT_CONFIG_ERROR); 143 141 } 144 142 … … 170 168 } 171 169 172 // determine the camera for the sequence and define the ppSim command173 if (camera == NULL) {174 camera = psMetadataLookupStr (&status, sequence, "CAMERA");175 }176 177 psString injectCommandReal = NULL;178 psString ppSimCommandReal = NULL;179 180 psStringAppend (&injectCommandReal, "%s --camera %s", injectCommand, camera);181 psStringAppend (&ppSimCommandReal, "%s -camera %s", ppSimCommand, camera);170 // determine the camera for the sequence and define the ppSim command 171 if (camera == NULL) { 172 camera = psMetadataLookupStr (&status, sequence, "CAMERA"); 173 } 174 175 psString injectCommandReal = NULL; 176 psString ppSimCommandReal = NULL; 177 178 psStringAppend (&injectCommandReal, "%s --camera %s", injectCommand, camera); 179 psStringAppend (&ppSimCommandReal, "%s -camera %s", ppSimCommand, camera); 182 180 183 181 if (!strcasecmp (type, "BIAS")) {
Note:
See TracChangeset
for help on using the changeset viewer.
