IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 27, 2006, 7:12:19 PM (20 years ago)
Author:
Paul Price
Message:

Changes to pmHDU and pmFPAWrite to (hopefully) fix for the last time
this horrible problem of when we write that annoying blank PHU. When
we want to write something out, there are four usage cases for the
pm{FPA,Chip,Cell}Write functions:

(1) Write the blank PHU only: blank=true, recurse=false;
(2) Write an image HDU only: blank=false, recurse=false;
(3) Write an entire file: blank=true, recurse=true; and
(4) Write only image HDUs within the file: blank=false, recurse=true.

So here, the "blank" boolean indicates whether we should write a
"blank" HDU (which consists of a header only, i.e., no pixels) when we
come across it. "recurse" is self-explanatory.

File:
1 edited

Legend:

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

    r7643 r7717  
    522522    // Case 1: PHU=FPA and EXTENSIONS=NONE.  We need to parse the single list of chip:cell:cellType entries.
    523523    if (strcasecmp(phuType, "FPA") == 0 && strcasecmp(extType, "NONE") == 0) {
     524        phdu->blankPHU = false;
    524525        const char *contents = psMetadataLookupStr(&mdok, format, "CONTENTS"); // The contents of the file
    525526        if (!mdok || !contents || strlen(contents) == 0) {
     
    529530            return NULL;
    530531        }
    531 
    532532        if (processContents(fpa, NULL, NULL, phdu, PM_FPA_LEVEL_FPA, contents, format) < 0) {
    533533            psError(PS_ERR_IO, false, "Error setting CONTENTS");
     
    563563    // chip/cell directly from that.
    564564    if (strcasecmp(extType, "NONE") == 0) {
     565        phdu->blankPHU = false;
    565566        pmChip *chip = NULL;        // The chip of interest
    566567        pmCell *cell = NULL;        // The cell of interest
     
    650651    // Case 3: EXTENSIONS=CHIP or EXTENSIONS=CELL.  We have extensions that we iterate through.  The CONTENTS
    651652    // is a list of extensions.
     653    phdu->blankPHU = true;
    652654    pmChip *chip = NULL;                // The chip of interest
    653655    pmCell *cell = NULL;                // The cell of interest
Note: See TracChangeset for help on using the changeset viewer.