IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 28, 2006, 9:23:54 AM (20 years ago)
Author:
magnier
Message:

minor tweak to blank PHU handling: if (blank) no pixels are written

File:
1 edited

Legend:

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

    r7717 r7729  
    107107    // We only write out a blank PHU if it's specifically requested.
    108108    bool writeBlank = blank && hdu->blankPHU && !hdu->images; // Write a blank PHU?
    109     bool writeImage = !hdu->blankPHU && hdu->images; // Write an image?
     109    bool writeImage = !blank && !hdu->blankPHU && hdu->images; // Write an image?
    110110
    111111    if (writeBlank || writeImage) {
     
    151151        // We only write out a blank PHU if it's specifically requested.
    152152        bool writeBlank = blank && hdu->blankPHU && !hdu->images; // Write a blank HDU?
    153         bool writeImage = !hdu->blankPHU && hdu->images; // Write an image?
     153        bool writeImage = !blank && !hdu->blankPHU && hdu->images; // Write an image?
    154154
    155155        if (writeBlank || writeImage) {
     
    168168
    169169    // Recurse to lower level if specifically requested.
     170    // XXX recursion implies blank == false (must be called on correct level?)
    170171    if (recurse) {
    171172        psArray *cells = chip->cells;       // Array of cells
    172173        for (int i = 0; i < cells->n; i++) {
    173174            pmCell *cell = cells->data[i];  // The cell of interest
    174             if (!pmCellWrite(cell, fits, db, blank)) {
     175            if (!pmCellWrite(cell, fits, db, false)) {
    175176                psError(PS_ERR_IO, false, "Unable to write Chip.\n");
    176177                return false;
     
    211212        // We only write out a blank PHU if it's specifically requested.
    212213        bool writeBlank = blank && hdu->blankPHU && !hdu->images; // Write a blank PHU?
    213         bool writeImage = !hdu->blankPHU && hdu->images; // Write an image?
     214        bool writeImage = !blank && !hdu->blankPHU && hdu->images; // Write an image?
    214215
    215216        if (writeBlank || writeImage) {
     
    232233        for (int i = 0; i < chips->n; i++) {
    233234            pmChip *chip = chips->data[i];  // The chip of interest
    234             if (!pmChipWrite(chip, fits, db, blank, true)) {
     235            if (!pmChipWrite(chip, fits, db, false, true)) {
    235236                psError(PS_ERR_IO, false, "Unable to write FPA.\n");
    236237                return false;
Note: See TracChangeset for help on using the changeset viewer.