IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 17, 2005, 2:48:18 PM (21 years ago)
Author:
Paul Price
Message:

Reading in an FPA seems to be working!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/papFocalPlane.h

    r4092 r4309  
    33
    44#include "pslib.h"
     5#include "papStuff.h"
     6
     7// Temporary metadata types
     8#define PS_META_CHIP PS_META_UNKNOWN
     9#define PS_META_CELL PS_META_UNKNOWN
     10
    511
    612typedef struct {
    713    // How to get information
    8     psMetadata *defaults;               // IPP concepts supplied with defaults
    9     psMetadata *database;               // IPP concepts supplied from database lookup
    10     psMetadata *fits;                   // IPP concepts supplied from FITS headers
    11 
     14    const psMetadata *defaults;         // IPP concepts supplied with defaults
     15    const psMetadata *database;         // IPP concepts supplied from database lookup
     16    const psMetadata *fits;             // IPP concepts supplied from FITS headers
     17   
    1218    // A source of information
     19    psMetadata *values;                 // Important values (cached)
    1320    psMetadata *header;                 // The FITS header
    1421    psDB *db;                           // The database handle
     
    1724    psMetadata *chips;                  // The chips (referred to by name)
    1825
    19     psImage *image;                     // The pixel data, if it corresponds to this level
    20 } psFPA;
     26    psArray *images;                    // The pixel data, if it corresponds to this level
     27} papFPA;
    2128
    2229typedef struct {
     
    2835    psMetadata *cells;                  // The cells (referred to by name)
    2936
    30     psImage *image;                     // The pixel data, if it corresponds to this level
    31 } psChip;
     37    psArray *images;                    // The pixel data, if it corresponds to this level
     38} papChip;
    3239
    3340typedef struct {
     
    3946    psArray *readouts;                  // The readouts (referred to by number)
    4047
    41     psImage *image;                     // The pixel data, if it corresponds to this level
    42 } psCell;
     48    psArray *images;                    // The pixel data, if it corresponds to this level
     49} papCell;
    4350
    4451
     
    5360    psList *overscans;                  // Array of subimages containing the overscan region(s)
    5461    psMetadata* values;                 // readout-level metadata
    55 } psReadout;
     62} papReadout;
    5663
    5764
    5865// Look for a particular value for a given cell (referred to by FPA+chip+cell)
    59 psMetadataItem *psCellGetValue(const psFPA *fpa, // The FPA that contains the cell
     66psMetadataItem *psCellGetValue(papFPA *fpa, // The FPA that contains the cell
    6067                               const char *chipName, // The name of the chip
    6168                               const char *cellName, // The name of the cell
     
    6471
    6572// Type-specific functions provided as a convenience to the user
    66 float psCellGetValueF32(const psFPA *fpa, // The FPA that contains the cell
     73float psCellGetValueF32(papFPA *fpa, // The FPA that contains the cell
    6774                        const char *chipName, // The name of the chip
    6875                        const char *cellName, // The name of the cell
    6976                        const char *valueName // Name of value
    7077                        );
    71 int psCellGetValueS32(const psFPA *fpa, // The FPA that contains the cell
     78int psCellGetValueS32(papFPA *fpa, // The FPA that contains the cell
    7279                      const char *chipName, // The name of the chip
    7380                      const char *cellName, // The name of the cell
    7481                      const char *valueName // Name of value
    7582                      );
    76 double psCellGetValueF64(const psFPA *fpa, // The FPA that contains the cell
     83double psCellGetValueF64(papFPA *fpa, // The FPA that contains the cell
    7784                         const char *chipName, // The name of the chip
    7885                         const char *cellName, // The name of the cell
    7986                         const char *valueName // Name of value
    8087                         );
    81 psString psCellGetValueString(const psFPA *fpa, // The FPA that contains the cell
     88psString psCellGetValueString(papFPA *fpa, // The FPA that contains the cell
    8289                              const char *chipName, // The name of the chip
    8390                              const char *cellName, // The name of the cell
     
    8693
    8794
     95// Allocators and deallocators
     96papFPA *papFPAAlloc(psMetadata *fits, // FITS translation info
     97                    psMetadata *database, // Database lookup info
     98                    psMetadata *defaults, // Defaults info
     99                    psDB *db            // Database handle
     100    );
     101void p_papFPAFree(papFPA *fpa);
     102
     103papChip *papChipAlloc(papFPA *fpa,              // FPA to which the chip belongs
     104                    const char *name    // Name of the chip
     105    );
     106void p_papChipFree(papChip *chip);
     107
     108papCell *papCellAlloc(papChip *chip,    // Chip to which the cell belongs
     109                    const char *name,   // Name of the cell
     110                    int nReadouts       // Number of readouts contained
     111    );
     112void p_papCellFree(papCell *cell);
     113
     114papReadout *papReadoutAlloc(papCell *cell,      // Cell to which the readout belongs
     115                          int readoutNum, // Number of the readout
     116                          psImage *image, // The pixels
     117                          psList *overscans, // The overscan images
     118                          int col0, int row0, int colParity, int rowParity, int colBin, int rowBin // Data
     119    );
     120void p_papReadoutFree(papReadout *readout);
     121
    88122#endif
Note: See TracChangeset for help on using the changeset viewer.