IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 30, 2004, 10:18:37 AM (22 years ago)
Author:
desonia
Message:

Updated psChip/psCell to current SDRS spec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/psAstrometry.c

    r2600 r2855  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-12-02 21:12:51 $
     10 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-12-30 20:18:36 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    399399
    400400    // create array of NULL psCells
    401     chip->cells = psArrayAlloc(nCells);
     401    int n = (nCells > 0) ? nCells : 1;
     402    chip->cells = psArrayAlloc(n);
    402403    psPtr* cells = chip->cells->data;
    403     for (psS32 i=0;i<nCells;i++) {
     404    for (psS32 i=0;i<n;i++) {
    404405        cells[i] = NULL;
    405406    }
     407    chip->cells->n = 0; // per requirement
     408
     409    *(int*)&chip->row0 = 0;
     410    *(int*)&chip->col0 = 0;
    406411
    407412    chip->metadata = NULL;
     
    429434
    430435    // create array of NULL psReadouts
    431     cell->readouts = psArrayAlloc(nReadouts);
     436    int n = (nReadouts > 0) ? nReadouts : 1;
     437    cell->readouts = psArrayAlloc(n);
    432438    psPtr* readouts = cell->readouts->data;
    433     for (psS32 i=0;i<nReadouts;i++) {
     439    for (psS32 i=0;i<n;i++) {
    434440        readouts[i] = NULL;
    435441    }
     442    cell->readouts->n = 0; // per requirement
     443
     444    *(int*)&cell->row0 = 0;
     445    *(int*)&cell->col0 = 0;
    436446
    437447    cell->metadata = NULL;
     
    452462}
    453463
    454 psReadout* psReadoutAlloc(psS32 col0,
    455                           psS32 row0,
    456                           const psImage* image)
    457 {
    458     PS_INT_CHECK_NON_NEGATIVE(col0, NULL);
    459     PS_INT_CHECK_NON_NEGATIVE(row0, NULL);
    460 
     464psReadout* psReadoutAlloc()
     465{
    461466    psReadout* readout = psAlloc(sizeof(psReadout));
    462467
    463     *(psU32*)&readout->colBins = 1;
    464     *(psU32*)&readout->rowBins = 1;
    465     *(psS32*)&readout->col0 = col0;
    466     *(psS32*)&readout->row0 = row0;
    467 
    468     readout->image = (psImage*)image;
     468    *(psU32*)&readout->colBins = 0;
     469    *(psU32*)&readout->rowBins = 0;
     470    *(psU32*)&readout->rowParity = 0;
     471    *(psU32*)&readout->colParity = 0;
     472    *(psS32*)&readout->col0 = 0;
     473    *(psS32*)&readout->row0 = 0;
     474
     475    readout->image = NULL;
    469476    readout->mask = NULL;
    470477    readout->objects = NULL;
     
    718725    PS_PTR_CHECK_NULL(cellCoord, NULL);
    719726    PS_PTR_CHECK_NULL(cell, NULL);
    720     PS_PTR_CHECK_NULL(cell->toTP, NULL);
     727    PS_PTR_CHECK_NULL(cell->toSky, NULL);
    721728    PS_PTR_CHECK_NULL(cell->parent, NULL);
    722729    PS_PTR_CHECK_NULL(cell->parent->parent, NULL);
Note: See TracChangeset for help on using the changeset viewer.