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/pmFringeStats.c

    r9615 r9730  
    133133
    134134    psArray *table = psArrayAlloc(numRows); // The table
    135     table->n = numRows;
    136135    // Translate the vectors into the required format for psFitsWriteTable()
    137136    for (long i = 0; i < numRows; i++) {
     
    205204    psVector *y = psVectorAlloc(numRows, PS_TYPE_F32); // y position
    206205    psVector *mask = psVectorAlloc(numRows, PS_TYPE_U8); // mask
    207     x->n = y->n = mask->n = numRows;
    208206    regions->x = x;
    209207    regions->y = y;
     
    253251    stats->f = psVectorAlloc(numRegions, PS_TYPE_F32);
    254252    stats->df = psVectorAlloc(numRegions, PS_TYPE_F32);
    255     stats->f->n = stats->df->n = numRegions;
    256253
    257254    return stats;
     
    365362    // Vectors: f, df
    366363    psArray *table = psArrayAlloc(numRows); // The table
    367     table->n = numRows;
    368364    // Translate the vectors into the required format for psFitsWriteTable()
    369365    for (long i = 0; i < numRows; i++) {
     
    527523    scale->coeff = psVectorAlloc(nFringeFrames + 1, PS_TYPE_F32);
    528524    scale->coeffErr = psVectorAlloc(nFringeFrames + 1, PS_TYPE_F32);
    529     scale->coeff->n = nFringeFrames + 1;
    530     scale->coeff->n = nFringeFrames + 1;
    531525
    532526    return scale;
     
    551545    psImage *A = psImageAlloc(numCoeffs, numCoeffs, PS_TYPE_F64); // The least-squares matrix
    552546    psVector *B = psVectorAlloc(numCoeffs, PS_TYPE_F64); // The least-squares vector
    553     B->n = numCoeffs;
    554547
    555548    // Generate the least-squares matrix and vector
     
    718711    if (!regions->mask) {
    719712        regions->mask = psVectorAlloc(numRegions, PS_TYPE_U8);
    720         regions->mask->n = numRegions;
    721713        psVectorInit(regions->mask, 0);
    722714    }
     
    725717    unsigned int numClipped = 0;        // Total number clipped
    726718    psVector *diff = psVectorAlloc(numRegions, PS_TYPE_F32); // The differences between obs. and pred.
    727     diff->n = numRegions;
    728719
    729720    pmFringeScale *scale = pmFringeScaleAlloc(fringes->n); // The fringe scales
Note: See TracChangeset for help on using the changeset viewer.