IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2006, 10:56:39 AM (20 years ago)
Author:
magnier
Message:

fixed compile errors in the new pmFPAview and pmFPAfile

File:
1 edited

Legend:

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

    r6559 r6568  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.1.2.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-03-09 03:24:49 $
     5 *  @version $Revision: 1.1.2.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-03-09 20:56:39 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2020#include "pmFPAWrite.h"
    2121
    22 bool pmChipRead(pmChip *fpa,              // FPA to read into
    23                 psFits *fits,            // FITS file from which to read
    24                 psMetadata *phu,         // Primary header
    25                 psDB *db                 // Database handle, for concept ingest
    26                );
    27 
    28 bool pmCellRead(pmCell *fpa,              // FPA to read into
    29                 psFits *fits,            // FITS file from which to read
    30                 psMetadata *phu,         // Primary header
    31                 psDB *db                 // Database handle, for concept ingest
    32                );
    33 
    34 bool pmReadoutRead(pmReadout *fpa,              // FPA to read into
    35                    psFits *fits,            // FITS file from which to read
    36                    psMetadata *phu,         // Primary header
    37                    psDB *db                 // Database handle, for concept ingest
    38                   );
    39 
    40 bool pmReadoutReadSegment(pmReadout *fpa,              // FPA to read into
    41                           psFits *fits,            // FITS file from which to read
    42                           int n, int i,
    43                           psMetadata *phu,         // Primary header
    44                           psDB *db);
    45 
    4622static void pmFPAviewFree (pmFPAview *view)
    4723{
     
    308284
    309285    if (view->chip == -1) {
    310         pmFPARead (fpa, fits, NULL, NULL);
     286        pmFPARead (fpa, fits, NULL);
    311287        return true;
    312288    }
     
    318294
    319295    if (view->cell == -1) {
    320         pmChipRead (chip, fits, NULL, NULL);
     296        pmChipRead (chip, fits, NULL);
    321297        return true;
    322298    }
     
    328304
    329305    if (view->readout == -1) {
    330         pmCellRead (cell, fits, NULL, NULL);
    331         return true;
    332     }
    333 
    334     if (view->readout >= cell->readouts->n) {
    335         return false;
    336     }
     306        pmCellRead (cell, fits, NULL);
     307        return true;
     308    }
     309
     310    // XXX pmReadoutRead, pmReadoutReadSegement disabled for now
     311    return false;
     312
     313    # if (0)
     314
     315        if (view->readout >= cell->readouts->n) {
     316            return false;
     317        }
    337318    pmReadout *readout = cell->readouts->data[view->readout];
    338319
    339320    if (view->nRows == 0) {
    340         pmReadoutRead (readout, fits, NULL, NULL);
     321        pmReadoutRead (readout, fits, NULL);
    341322    } else {
    342323        pmReadoutReadSegment (readout, fits, view->nRows, view->iRows, NULL, NULL);
    343324    }
    344325    return true;
    345 }
     326    # endif
     327}
     328
     329// XXX image writes disabled for now
     330# if (0)
     331    // given an already-opened fits file, write the components corresponding
     332    // to the specified view
     333    bool pmFPAviewWriteFitsImage (pmFPAview *view, psFits *fits)
     334{
     335
     336    pmFPA *fpa = view->fpa;
     337
     338    if (view->chip == -1) {
     339        pmFPAWrite (fpa, fits, NULL, NULL);
     340        return true;
     341    }
     342
     343    if (view->chip >= fpa->chips->n) {
     344        return false;
     345    }
     346    pmChip *chip = fpa->chips->data[view->chip];
     347
     348    if (view->cell == -1) {
     349        pmChipWrite (chip, fits, NULL, NULL);
     350        return true;
     351    }
     352
     353    if (view->cell >= chip->cells->n) {
     354        return false;
     355    }
     356    pmCell *cell = chip->cells->data[view->cell];
     357
     358    if (view->readout == -1) {
     359        pmCellWrite (cell, fits, NULL, NULL);
     360        return true;
     361    }
     362
     363    if (view->readout >= cell->readouts->n) {
     364        return false;
     365    }
     366    pmReadout *readout = cell->readouts->data[view->readout];
     367
     368    if (view->nRows == 0) {
     369        pmReadoutWrite (readout, fits, NULL, NULL);
     370    } else {
     371        pmReadoutWriteSegment (readout, fits, view->nRows, view->iRows, NULL, NULL);
     372    }
     373    return true;
     374}
     375# endif
Note: See TracChangeset for help on using the changeset viewer.