IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23259 for trunk/ppStack


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/ppStack/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackLoop.c

    r23242 r23259  
    415415    psArray *subKernels = psArrayAlloc(num); // Subtraction kernels --- required in the stacking
    416416    psArray *subRegions = psArrayAlloc(num); // Subtraction regions --- required in the stacking
    417     psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator
     417    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS); // Random number generator
    418418    int numGood = 0;                    // Number of good frames
    419419    int numCols = 0, numRows = 0;       // Size of image
  • trunk/ppStack/src/ppStackPhotometry.c

    r23242 r23259  
    5050
    5151    // Measure background
    52     psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator
     52    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS); // Random number generator
    5353    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics
    5454    if (!psImageBackground(stats, NULL, image, mask, maskVal, rng)) {
Note: See TracChangeset for help on using the changeset viewer.