IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 12:08:50 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/ppSim/src/Makefile.am

    r18011 r23352  
    11bin_PROGRAMS = ppSim ppSimSequence
    22
    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
     12ppSim_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) -DPPSIM_VERSION=$(SVN_VERSION) -DPPSIM_BRANCH=$(SVN_BRANCH) -DPPSIM_SOURCE=$(SVN_SOURCE)
    413ppSim_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS) $(PSASTRO_LIBS)
    514ppSim_SOURCES = \
     
    3544        ppSimMosaicChip.c         \
    3645        ppSimRandomGaussian.c     \
    37         ppSimBadPixels.c
     46        ppSimBadPixels.c          \
     47        ppSimVersion.c
    3848
    3949ppSimSequence_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS)
  • branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSim.h

    r21183 r23352  
    1919
    2020// 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; }       \
    2424    }
    2525
     
    147147float ppSimMagToFlux (float mag, float zp);
    148148
    149 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
     149float 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
    154154    );
    155155
    156156int ppSimArgToRecipeS32(bool *status,
    157                         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
     157                        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
    161161    );
    162162
    163163char *ppSimArgToRecipeStr(bool *status,
    164                           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
     164                          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
    168168    );
    169169
    170170bool ppSimArgToRecipeBool(bool *status,
    171                           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
     171                          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
    175175    );
    176176
     
    198198bool ppSimDefinePixels (psArray *sources, pmReadout *readout, psMetadata *recipe);
    199199
     200/// Return software version
     201psString ppSimVersion(void);
     202
     203/// Return software source
     204psString ppSimSource(void);
     205
     206/// Return long version information
     207psString ppSimVersionLong(void);
     208
    200209#endif
  • branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSimBadPixels.c

    r20910 r23352  
    7474    }
    7575
    76     psRandom *pseudoRNG = psRandomAlloc(PS_RANDOM_TAUS, seed); // Pseudo-random number generator
     76    psRandom *pseudoRNG = psRandomAllocSpecific(PS_RANDOM_TAUS, seed); // Pseudo-random number generator
    7777
    7878    psImage *image = readout->image;    // Image of interest
  • branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSimLoop.c

    r21365 r23352  
    2525    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSIM_RECIPE); // Recipe
    2626
    27     psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator
     27    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS); // Random number generator
    2828
    2929    char *typeStr = psMetadataLookupStr(NULL, recipe, "IMAGE.TYPE"); // Type of image to simulate
  • branches/cnb_branches/cnb_branch_20090301/ppSim/src/ppSimSequence.c

    r19315 r23352  
    133133    if (ppsim_recipe) psStringAppend (&ppSimCommand, " -recipe PPSIM %s", ppsim_recipe);
    134134
    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);
    138136
    139137    psMetadataItem *item = psMetadataLookup (config, "SEQUENCE");
    140138    if (item == NULL) {
    141139        psLogMsg ("ppSimSequence", PS_LOG_WARN, "missing SEQUENCE description");
    142         exit (1);
     140        exit (PS_EXIT_CONFIG_ERROR);
    143141    }
    144142
     
    170168        }
    171169
    172         // determine the camera for the sequence and define the ppSim command
    173         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);
    182180
    183181        if (!strcasecmp (type, "BIAS")) {
Note: See TracChangeset for help on using the changeset viewer.