IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14797


Ignore:
Timestamp:
Sep 10, 2007, 9:08:57 AM (19 years ago)
Author:
Paul Price
Message:

Fixing uninitialised variable warning.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeCombine.c

    r14356 r14797  
    154154            }
    155155
    156             float shutterRef;           // Reference shutter correction
     156            float shutterRef = NAN;     // Reference shutter correction
    157157            if (options->shutter) {
    158158                shutterRef = pmShutterCorrectionReference(shutters->data[cellNum]);
  • trunk/ppSim/src/ppSim.h

    r14668 r14797  
    3232// Type of image to simulate
    3333typedef enum {
     34    PPSIM_TYPE_NONE,                    // No type set
    3435    PPSIM_TYPE_BIAS,                    // Bias image
    3536    PPSIM_TYPE_DARK,                    // Dark image
     
    6869/// Parse command-line arguments
    6970void ppSimArguments(int argc, char *argv[], ///< Command-line arguments
    70                     pmConfig *config ///< Configuration
    71                     );
     71                    pmConfig *config ///< Configuration
     72                    );
    7273
    7374/// Create output file
     
    7576/// Returns a borrowed pointer to the FPA file.
    7677pmFPAfile *ppSimCreate(pmConfig *config ///< Configuration
    77                        );
     78                       );
    7879
    7980// Return bounds of a chip, based on the concepts
    8081psRegion *ppSimChipBounds(const pmChip *chip, // Chip for which to determine size
    81                           pmFPAview *view // View for chip
    82                           );
     82                          pmFPAview *view // View for chip
     83                          );
    8384
    8485// Return bounds of an FPA, based on the concepts
    8586psRegion *ppSimFPABounds(const pmFPA *fpa       // FPA for which to determine size
    86                         );
     87                        );
    8788
    8889/// Loop over the output file, generating simulated data
    8990bool ppSimLoop(pmConfig *config ///< Configuration
    90                 );
     91                );
    9192
    9293psVector *ppSimMakeBiassec (pmCell *cell, pmConfig *config);
     
    100101
    101102bool ppSimInitHeader(pmConfig *config,
    102                      pmFPA *fpa,
    103                      pmChip *chip,
    104                      pmCell *cell);
     103                     pmFPA *fpa,
     104                     pmChip *chip,
     105                     pmCell *cell);
    105106
    106 bool ppSimSaturate(pmReadout *readout,  // Image to apply saturation
    107                    const pmConfig *config); // Saturation level
     107bool ppSimSaturate(pmReadout *readout,  // Image to apply saturation
     108                   const pmConfig *config); // Saturation level
    108109
    109110bool ppSimUpdateConceptsFPA (pmFPA *fpa, pmConfig *config);
     
    113114
    114115bool ppSimAddNoise(psImage *signal,
    115                    psImage *variance,
    116                    const pmCell *cell,                 
    117                    const pmConfig *config,                     
    118                    const psRandom *rng // Random number generator
     116                   psImage *variance,
     117                   const pmCell *cell,
     118                   const pmConfig *config,
     119                   const psRandom *rng // Random number generator
    119120    );
    120121
  • trunk/ppSim/src/ppSimArguments.c

    r14667 r14797  
    7777        usage(argv[0], arguments, config);
    7878    }
    79  
     79
    8080    if (!psArgumentParse(arguments, &argc, argv)) { usage (argv[0], arguments, config); }
    8181
     
    8484    psString formatName = psMetadataLookupStr(NULL, arguments, "-format"); // Name of format
    8585    if (formatName) {
    86         // XXX delay the config below until ppSimCreate?
     86        // XXX delay the config below until ppSimCreate?
    8787        config->formatName = psMemIncrRefCounter(formatName);
    8888
     
    109109        usage(argv[0], arguments, config);
    110110    }
    111     ppSimType type;                     // Type to simulate
     111    ppSimType type = PPSIM_TYPE_NONE;   // Type to simulate
    112112    if (strcasecmp(typeStr, "BIAS") == 0) {
    113113        type = PPSIM_TYPE_BIAS;
     
    122122        usage(argv[0], arguments, config);
    123123    }
     124    assert(type != PPSIM_TYPE_NONE);
    124125    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "TYPE", 0, "Exposure type", type);
    125126
     
    200201
    201202
    202         const char *psfClass = psMetadataLookupStr(NULL, arguments, "-psfclass"); // Filter name
    203         psMetadataAddStr(config->arguments, PS_LIST_TAIL, "PSF.MODEL", 0, "PSF model class", psfClass);
     203        const char *psfClass = psMetadataLookupStr(NULL, arguments, "-psfclass"); // Filter name
     204        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "PSF.MODEL", 0, "PSF model class", psfClass);
    204205    }
    205206
Note: See TracChangeset for help on using the changeset viewer.