IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 16, 2006, 5:00:30 PM (20 years ago)
Author:
Paul Price
Message:

Documenting pmFPARead.[ch]

File:
1 edited

Legend:

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

    r9584 r9599  
    1616
    1717#include "pmFPARead.h"
    18 
    19 #define MAX(x,y) ((x) > (y) ? (x) : (y))
    20 #define MIN(x,y) ((x) < (y) ? (x) : (y))
    2118
    2219//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     
    4542        return false;
    4643    }
    47     psRegion region = psRegionSet(MAX(trimsec->x0 - readout->col0, 0), // x0
    48                                   MIN(trimsec->x1 - readout->col0, image->numCols), // x1
    49                                   MAX(trimsec->y0 - readout->row0, 0), // y0
    50                                   MIN(trimsec->y1 - readout->row0, image->numRows) // y1
     44    psRegion region = psRegionSet(PS_MAX(trimsec->x0 - readout->col0, 0), // x0
     45                                  PS_MIN(trimsec->x1 - readout->col0, image->numCols), // x1
     46                                  PS_MAX(trimsec->y0 - readout->row0, 0), // y0
     47                                  PS_MIN(trimsec->y1 - readout->row0, image->numRows) // y1
    5148                                 );
    5249    if (readout->image) {
     
    7168            return false;
    7269        }
    73         psRegion region = psRegionSet(MAX(biassec->x0 - readout->col0, 0), // x0
    74                                       MIN(biassec->x1 - readout->col0, image->numCols), // x1
    75                                       MAX(biassec->y0 - readout->row0, 0), // y0
    76                                       MIN(biassec->y1 - readout->row0, image->numRows) // y1
     70        psRegion region = psRegionSet(PS_MAX(biassec->x0 - readout->col0, 0), // x0
     71                                      PS_MIN(biassec->x1 - readout->col0, image->numCols), // x1
     72                                      PS_MAX(biassec->y0 - readout->row0, 0), // y0
     73                                      PS_MIN(biassec->y1 - readout->row0, image->numRows) // y1
    7774                                     );
    7875        psImage *overscan = psMemIncrRefCounter(psImageSubset(image, region));
     
    162159//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    163160
    164 // Read the next readout; return true if we read pixels in.
    165 //
    166 // Note that this doesn't put pixels in the HDU.  It is therefore NOT COMPATIBLE with pmCellWrite,
    167 // pmChipWrite, and pmFPAWrite (or any function that uses or creates an HDU for that matter).
    168 // Use pmReadoutWriteNext to write the data that's read by this function.
    169 bool pmReadoutReadNext(pmReadout *readout, // Readout into which to read
    170                        psFits *fits,    // FITS file from which to read
    171                        int z,           // Readout number/plane; zero-offset indexing
    172                        int numScans     // The number of scans to read
    173                       )
     161bool pmReadoutReadNext(pmReadout *readout, psFits *fits, int z, int numScans)
    174162{
    175163    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    284272    // Blow away existing data.
    285273    // Do this before returning, so that we're not returning data from a previous read
    286     #if 1
    287274    psFree(readout->image);
    288275    readout->image = NULL;
    289     #endif
    290276
    291277    while (readout->bias->n > 0) {
     
    321307
    322308
    323 // Read in the cell, and allocate the readouts
    324 bool pmCellRead(pmCell *cell,           // Cell to read into
    325                 psFits *fits,           // FITS file from which to read
    326                 psDB *db                // Database handle, for "concepts" ingest
    327                )
     309bool pmCellRead(pmCell *cell, psFits *fits, psDB *db)
    328310{
    329311    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    383365}
    384366
    385 // Read in the component cells
    386 bool pmChipRead(pmChip *chip,           // Chip to read into
    387                 psFits *fits,           // FITS file from which to read
    388                 psDB *db                // Database handle, for "concepts" ingest
    389                )
     367bool pmChipRead(pmChip *chip, psFits *fits, psDB *db)
    390368{
    391369    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    410388}
    411389
    412 // Read in the component chips
    413 bool pmFPARead(pmFPA *fpa,              // FPA to read into
    414                psFits *fits,            // FITS file from which to read
    415                psDB *db                 // Database handle, for "concepts" ingest
    416               )
     390bool pmFPARead(pmFPA *fpa, psFits *fits, psDB *db)
    417391{
    418392    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    442416//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    443417
    444 // Read the mask into the cell, and allocate the readouts
    445 bool pmCellReadMask(pmCell *cell,           // Cell to read into
    446                     psFits *fits,           // FITS file from which to read
    447                     psDB *db                // Database handle, for "concepts" ingest
    448                    )
     418bool pmCellReadMask(pmCell *cell, psFits *fits, psDB *db)
    449419{
    450420    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    497467}
    498468
    499 // Read the mask into the component cells
    500 bool pmChipReadMask(pmChip *chip,           // Chip to read into
    501                     psFits *fits,           // FITS file from which to read
    502                     psDB *db                // Database handle, for "concepts" ingest
    503                    )
     469bool pmChipReadMask(pmChip *chip, psFits *fits, psDB *db)
    504470{
    505471    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    524490}
    525491
    526 // Read the mask into the component chips
    527 bool pmFPAReadMask(pmFPA *fpa,              // FPA to read into
    528                    psFits *fits,            // FITS file from which to read
    529                    psDB *db                 // Database handle, for "concepts" ingest
    530                   )
     492bool pmFPAReadMask(pmFPA *fpa, psFits *fits, psDB *db)
    531493{
    532494    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    555517//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    556518
    557 // Read the weight map into the cell, and allocate the readouts
    558 bool pmCellReadWeight(pmCell *cell,           // Cell to read into
    559                       psFits *fits,           // FITS file from which to read
    560                       psDB *db                // Database handle, for "concepts" ingest
    561                      )
     519bool pmCellReadWeight(pmCell *cell, psFits *fits, psDB *db)
    562520{
    563521    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    610568}
    611569
    612 // Read the weight map into the component cells
    613 bool pmChipReadWeight(pmChip *chip,           // Chip to read into
    614                       psFits *fits,           // FITS file from which to read
    615                       psDB *db                // Database handle, for "concepts" ingest
    616                      )
     570bool pmChipReadWeight(pmChip *chip, psFits *fits, psDB *db)
    617571{
    618572    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    637591}
    638592
    639 // Read the weight map into the component chips
    640 bool pmFPAReadWeight(pmFPA *fpa,              // FPA to read into
    641                      psFits *fits,            // FITS file from which to read
    642                      psDB *db                 // Database handle, for "concepts" ingest
    643                     )
     593bool pmFPAReadWeight(pmFPA *fpa, psFits *fits, psDB *db)
    644594{
    645595    PS_ASSERT_PTR_NON_NULL(fpa, false);
Note: See TracChangeset for help on using the changeset viewer.