IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15163


Ignore:
Timestamp:
Oct 2, 2007, 10:20:07 AM (19 years ago)
Author:
Paul Price
Message:

pmFPAviewFitsWritePHU was writing a PHU, even if there was no blank
PHU. This means that it was writing twice!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_070920/psModules/src/camera/pmFPAfileFitsIO.c

    r14204 r15163  
    471471    if (file->wrote_phu) return true;
    472472
    473     // select or generate the desired fpa in the correct output format 
     473    // select or generate the desired fpa in the correct output format
    474474    pmFPA *fpa = pmFPAfileSuitableFPA(file, view, config);
     475    pmHDU *phu = pmFPAviewThisHDU(view, fpa);
     476    if (!phu || !phu->blankPHU) {
     477        // No PHU to write!
     478        psFree(fpa);
     479        return true;
     480    }
    475481
    476482    switch (file->fileLevel) {
    477483      case PM_FPA_LEVEL_FPA:
    478         status = pmFPAWrite(fpa, file->fits, NULL, true, false);
    479         break;
     484        status = pmFPAWrite(fpa, file->fits, NULL, true, false);
     485        break;
    480486      case PM_FPA_LEVEL_CHIP: {
    481           pmChip *chip = pmFPAviewThisChip(view, fpa);
    482           status = pmChipWrite(chip, file->fits, NULL, true, false);
    483           break;
     487          pmChip *chip = pmFPAviewThisChip(view, fpa);
     488          status = pmChipWrite(chip, file->fits, NULL, true, false);
     489          break;
    484490      }
    485491      case PM_FPA_LEVEL_CELL: {
    486           pmCell *cell = pmFPAviewThisCell(view, fpa);
    487           status = pmCellWrite(cell, file->fits, NULL, true);
    488           break;
     492          pmCell *cell = pmFPAviewThisCell(view, fpa);
     493          status = pmCellWrite(cell, file->fits, NULL, true);
     494          break;
    489495      }
    490496      default:
    491         psAbort("fileLevel not correctly set");
    492         break;
     497        psAbort("fileLevel not correctly set");
     498        break;
    493499    }
    494500
Note: See TracChangeset for help on using the changeset viewer.