IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2006, 12:55:05 PM (20 years ago)
Author:
Paul Price
Message:

Following today's meeting, we agreed that psVectorAlloc (and therefore
psArrayAlloc also) shall set the number of elements in use to equal the
number of elements allocated. We introduce new functions,
psVectorAllocEmpty and psArrayAllocEmpty, that allocate a vector and set
the length to zero.

File:
1 edited

Legend:

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

    r9614 r9730  
    3232        } else {
    3333            *expFluxesPtr = psVectorAlloc(numExps, PS_TYPE_F32);
    34             (*expFluxesPtr)->n = numExps;
    3534        }
    3635        expFluxes = psMemIncrRefCounter(*expFluxesPtr);
    3736    } else {
    3837        expFluxes = psVectorAlloc(numExps, PS_TYPE_F32);
    39         expFluxes->n = numExps;
    4038    }
    4139
     
    4745        } else {
    4846            *chipGainsPtr = psVectorAlloc(numChips, PS_TYPE_F32);
    49             (*chipGainsPtr)->n = numChips;
    5047            psVectorInit(*chipGainsPtr, 1.0);
    5148        }
     
    5350    } else {
    5451        chipGains = psVectorAlloc(numChips, PS_TYPE_F32);
    55         chipGains->n = numChips;
    5652        psVectorInit(chipGains, 1.0);
    5753    }
     
    6258    psImageInit(fluxMask, 0);
    6359    psVector *gainMask = psVectorAlloc(numChips, PS_TYPE_U8); // Mask for bad gains
    64     gainMask->n = numChips;
    6560    psVectorInit(gainMask, 0);
    6661    psVector *expMask = psVectorAlloc(numExps, PS_TYPE_U8); // Mask for bad exposures
    67     expMask->n = numExps;
    6862    psVectorInit(expMask, 0);
    6963    for (int i = 0; i < numChips; i++) {
Note: See TracChangeset for help on using the changeset viewer.