IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 1, 2006, 4:17:11 PM (20 years ago)
Author:
Paul Price
Message:

Adding functions to check the file_exists flags; adding pmFPAviewReset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPA.c

    r7630 r8047  
    1212* XXX: Should we implement non-linear cell->chip transforms?
    1313*
    14 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2006-06-22 20:03:50 $
     14*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2006-08-02 02:17:11 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    187187    readout->weight = NULL;
    188188    readout->mask = NULL;
    189     readout->bias = NULL;
     189    readout->bias = psListAlloc(NULL);
    190190}
    191191
     
    455455        pmReadout *readout = cell->readouts->data[i];
    456456        readout->file_exists = status;
     457    }
     458    return true;
     459}
     460
     461bool pmFPACheckFileStatus(const pmFPA *fpa)
     462{
     463    PS_ASSERT_PTR_NON_NULL(fpa, false);
     464
     465    for (int i = 0; i < fpa->chips->n; i++) {
     466        pmChip *chip = fpa->chips->data[i];
     467        if (!pmChipCheckFileStatus(chip)) {
     468            return false;
     469        }
     470    }
     471    return true;
     472}
     473
     474bool pmChipCheckFileStatus(const pmChip *chip)
     475{
     476    PS_ASSERT_PTR_NON_NULL(chip, false);
     477    if (!chip->file_exists) {
     478        return false;
     479    }
     480
     481    for (int i = 0; i < chip->cells->n; i++) {
     482        pmCell *cell = chip->cells->data[i];
     483        if (!pmCellCheckFileStatus(cell)) {
     484            return false;
     485        }
     486    }
     487    return true;
     488}
     489
     490bool pmCellCheckFileStatus(const pmCell *cell)
     491{
     492    PS_ASSERT_PTR_NON_NULL(cell, false);
     493    if (!cell->file_exists) {
     494        return false;
     495    }
     496
     497    for (int i = 0; i < cell->readouts->n; i++) {
     498        pmReadout *readout = cell->readouts->data[i];
     499        if (!readout->file_exists) {
     500            return false;
     501        }
    457502    }
    458503    return true;
Note: See TracChangeset for help on using the changeset viewer.