IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8047


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.

Location:
trunk/psModules/src/camera
Files:
4 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;
  • trunk/psModules/src/camera/pmFPA.h

    r7630 r8047  
    77*  @author GLG, MHPCC
    88*
    9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-06-22 20:03:50 $
     9*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-08-02 02:17:11 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    230230bool pmCellSetFileStatus (pmCell *cell, bool status);
    231231
     232/* Functions to check the file_exists flags */
     233bool pmFPACheckFileStatus(const pmFPA *fpa);
     234bool pmChipCheckFileStatus(const pmChip *chip);
     235bool pmCellCheckFileStatus(const pmCell *cell);
     236
    232237/* functions to turn on/off the data_exists flags */
    233238bool pmFPASetDataStatus (pmFPA *fpa, bool status);
  • trunk/psModules/src/camera/pmFPAview.c

    r7717 r8047  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-06-28 05:12:19 $
     5 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-08-02 02:17:11 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3030    psMemSetDeallocator(view, (psFreeFunc) pmFPAviewFree);
    3131
     32    view->nRows = nRows;
     33    pmFPAviewReset(view);
     34    return view;
     35}
     36
     37
     38bool pmFPAviewReset(pmFPAview *view)
     39{
     40    PS_ASSERT_PTR_NON_NULL(view, false);
     41
    3242    view->chip    = -1;
    3343    view->cell    = -1;
    3444    view->readout = -1;
    3545    view->iRows   =  0;
    36     view->nRows   = nRows;
    37     return view;
    38 }
     46    return true;
     47}
     48
    3949
    4050pmFPALevel pmFPAviewLevel(const pmFPAview *view)
  • trunk/psModules/src/camera/pmFPAview.h

    r7589 r8047  
    77*  @author EAM, IfA
    88*
    9 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-06-17 01:50:43 $
     9*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-08-02 02:17:11 $
    1111*
    1212*  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
     
    3333// allocate a pmFPAview structure for this fpa and camera
    3434pmFPAview *pmFPAviewAlloc (int nRows);
     35
     36// Reset a view
     37bool pmFPAviewReset(pmFPAview *view);
    3538
    3639// determine the current view level
Note: See TracChangeset for help on using the changeset viewer.