IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9738


Ignore:
Timestamp:
Oct 24, 2006, 2:18:06 PM (20 years ago)
Author:
Paul Price
Message:

Changed definition of psVectorAlloc.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppFocus.c

    r8751 r9738  
    2929
    3030    // allocate vectors for analysis
    31     psVector *focus = psVectorAlloc (infiles->n, PS_TYPE_F32);
    32     psVector *fwhm = psVectorAlloc (infiles->n, PS_TYPE_F32);
     31    psVector *focus = psVectorAllocEmpty(infiles->n, PS_TYPE_F32);
     32    psVector *fwhm = psVectorAllocEmpty(infiles->n, PS_TYPE_F32);
    3333
    3434    for (int i = 0; i < infiles->n; i++) {
    3535
    36         // define recipe options
    37         // define the active I/O files
    38         ppImageOptions *options = ppFocusParseCamera(config, i);
    39         if (options == NULL) {
    40             psErrorStackPrint(stderr, " ");
    41             exit(1);
    42         }
     36        // define recipe options
     37        // define the active I/O files
     38        ppImageOptions *options = ppFocusParseCamera(config, i);
     39        if (options == NULL) {
     40            psErrorStackPrint(stderr, " ");
     41            exit(1);
     42        }
    4343
    44         // Image Arithmetic Loop
    45         // XXX ppFocus REQUIRES photom: for it to be true?
    46         //
    47         if (!ppImageLoop(config, options)) {
    48             psErrorStackPrint(stderr, " ");
    49             exit(1);
    50         }
    51        
    52         // determine FWHM at reference location in image
    53         // (also removes PPIMAGE.INPUT from config->files)
    54         ppFocusGetFWHM (config, focus, fwhm);
     44        // Image Arithmetic Loop
     45        // XXX ppFocus REQUIRES photom: for it to be true?
     46        //
     47        if (!ppImageLoop(config, options)) {
     48            psErrorStackPrint(stderr, " ");
     49            exit(1);
     50        }
    5551
    56         ppFocusDropCamera (config);
    57         psFree (options);
     52        // determine FWHM at reference location in image
     53        // (also removes PPIMAGE.INPUT from config->files)
     54        ppFocusGetFWHM (config, focus, fwhm);
     55
     56        ppFocusDropCamera (config);
     57        psFree (options);
    5858    }
    5959
  • trunk/ppNorm/src/ppNormCalc.c

    r8999 r9738  
    114114    // Do the normalisation
    115115    psVector *gains = psVectorAlloc(numComps, PS_TYPE_F32); // Vector of gains for each component
    116     gains->n = numComps;
    117116    psVectorInit(gains, 100.0);
    118117    if (!pmFlatNormalize(NULL, &gains, matrix)) {
  • trunk/ppStats/src/ppStatsLoop.c

    r9539 r9738  
    157157        int sampleSpace = 1.0 / data->sample; // Space between samples
    158158        psVector *sampleValues = psVectorAlloc(numSamples, PS_TYPE_F32); // Vector of samples
    159         sampleValues->n = numSamples;
    160159        psVector *sampleMask = NULL;  // Corresponding mask
    161160        if (mask) {
    162161            sampleMask = psVectorAlloc(numSamples, PS_TYPE_U8);
    163             sampleMask->n = numSamples;
    164162        }
    165163        for (int i = 0; i < numSamples; i++) {
Note: See TracChangeset for help on using the changeset viewer.