IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 10, 2009, 4:53:42 PM (17 years ago)
Author:
Paul Price
Message:

Changing API for psRandomAlloc() to make it easier to be deterministic. psRandomAlloc() now takes only a single argument, which is the generator type (only PS_RANDOM_TAUS is currently supported; others could easily be added). The seed used by the generator is set by psRandomSeed(). This allows us to use the same seed for the random number generator over multiple calls, which means that we can be deterministic by setting the seed. The old API for psRandomAlloc() is available using psRandomAllocSpecific(). Added to the configuration setup in psModules to include recording the random seed, and setting if desired. Updated all our products to use this API. Some fixes and updates to the configuration run-time information dumping. ppImage now dumps the configuration at the end, allowing the list of files in the run-time information to be set.

Location:
trunk/psModules/src/detrend
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmFringeStats.c

    r21183 r23259  
    6565        rng = psMemIncrRefCounter(random);
    6666    } else {
    67         rng = psRandomAlloc(PS_RANDOM_TAUS, 0);
     67        rng = psRandomAlloc(PS_RANDOM_TAUS);
    6868    }
    6969
  • trunk/psModules/src/detrend/pmRemnance.c

    r21183 r23259  
    2828    int numCols = image->numCols, numRows = image->numRows; // Size of image
    2929
    30     psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator
     30    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS); // Random number generator
    3131
    3232    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics
  • trunk/psModules/src/detrend/pmShutterCorrection.c

    r21457 r23259  
    911911    psStats *stats = psStatsAlloc(meanStat | stdevStat); // Statistics to apply
    912912    if (!rng) {
    913         rng = psRandomAlloc(PS_RANDOM_TAUS, 0);
     913        rng = psRandomAlloc(PS_RANDOM_TAUS);
    914914    } else {
    915915        psMemIncrRefCounter(rng);
Note: See TracChangeset for help on using the changeset viewer.