IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 27, 2006, 4:16:26 PM (20 years ago)
Author:
magnier
Message:

added HDU weights, masks; substantial work on the pmFPAfile,view concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/astrom/pmFPA.c

    r6673 r6713  
    1212* XXX: Should we implement non-linear cell->chip transforms?
    1313*
    14 *  @version $Revision: 1.1.4.4 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2006-03-23 03:09:57 $
     14*  @version $Revision: 1.1.4.5 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2006-03-28 02:16:26 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    255255        cell->readouts = psArrayAdd(cell->readouts, 1, (psPtr) tmpReadout);
    256256    }
     257
     258    tmpReadout->process = true;            // All cells are processed by default
     259    tmpReadout->file_exists = false;       // file not yet identified
     260    tmpReadout->data_exists = false;       // data yet read in
     261
    257262    psMemSetDeallocator(tmpReadout, (psFreeFunc) readoutFree);
    258263    return(tmpReadout);
     
    287292    }
    288293    tmpCell->process = true;            // All cells are processed by default
    289     tmpCell->exists = false;            // Not yet read in
     294    tmpCell->file_exists = false;       // Not yet identified
     295    tmpCell->data_exists = false;       // Not yet read in
    290296    tmpCell->hdu = NULL;
    291297
     
    331337    }
    332338    tmpChip->process = true;            // Work on all chips, by default
    333     tmpChip->exists = false;            // Not read in yet
     339    tmpChip->file_exists = false;       // Not yet identified
     340    tmpChip->data_exists = false;       // Not yet read in
    334341    tmpChip->hdu = NULL;
    335342
     
    421428}
    422429
    423 
     430/** functions to turn on/off the file_exists flag **/
     431bool pmFPASetFileStatus (pmFPA *fpa, bool status)
     432{
     433
     434    for (int i = 0; i < fpa->chips->n; i++) {
     435        pmChip *chip = fpa->chips->data[i];
     436        pmChipSetFileStatus (chip, status);
     437    }
     438    return true;
     439}
     440
     441bool pmChipSetFileStatus (pmChip *chip, bool status)
     442{
     443
     444    chip->file_exists = status;
     445    for (int i = 0; i < chip->cells->n; i++) {
     446        pmCell *cell = chip->cells->data[i];
     447        pmCellSetFileStatus (cell, status);
     448    }
     449    return true;
     450}
     451
     452bool pmCellSetFileStatus (pmCell *cell, bool status)
     453{
     454
     455    cell->file_exists = status;
     456    for (int i = 0; i < cell->readouts->n; i++) {
     457        pmReadout *readout = cell->readouts->data[i];
     458        readout->file_exists = status;
     459    }
     460    return true;
     461}
     462
     463/** functions to turn on/off the data_exists flag **/
     464bool pmFPASetDataStatus (pmFPA *fpa, bool status)
     465{
     466
     467    for (int i = 0; i < fpa->chips->n; i++) {
     468        pmChip *chip = fpa->chips->data[i];
     469        pmChipSetDataStatus (chip, status);
     470    }
     471    return true;
     472}
     473
     474bool pmChipSetDataStatus (pmChip *chip, bool status)
     475{
     476
     477    chip->data_exists = status;
     478    for (int i = 0; i < chip->cells->n; i++) {
     479        pmCell *cell = chip->cells->data[i];
     480        pmCellSetDataStatus (cell, status);
     481    }
     482    return true;
     483}
     484
     485bool pmCellSetDataStatus (pmCell *cell, bool status)
     486{
     487
     488    cell->data_exists = status;
     489    for (int i = 0; i < cell->readouts->n; i++) {
     490        pmReadout *readout = cell->readouts->data[i];
     491        readout->data_exists = status;
     492    }
     493    return true;
     494}
    424495
    425496/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.