IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 8, 2006, 2:43:04 PM (20 years ago)
Author:
Paul Price
Message:

Adding error checking; only close files after all operations are pau.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageLoop.c

    r10439 r10589  
    142142            }
    143143
     144#if 0
    144145            if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
    145146                return false;
    146147            }
    147         }
    148 
    149         ppImageMosaicChip(config, view, "PPIMAGE.OUTPUT.CHIP", "PPIMAGE.OUTPUT");
    150         ppImageRebinChip(config, view, "PPIMAGE.BIN1", "PPIMAGE.OUTPUT.CHIP");
    151         ppImageRebinChip(config, view, "PPIMAGE.BIN2", "PPIMAGE.OUTPUT.CHIP");
     148#endif
     149
     150        }
     151
     152        if (!ppImageMosaicChip(config, view, "PPIMAGE.OUTPUT.CHIP", "PPIMAGE.OUTPUT")) {
     153            psError(PS_ERR_UNKNOWN, false, "Unable to mosaic chip.\n");
     154            return false;
     155        }
     156        if (!ppImageRebinChip(config, view, "PPIMAGE.BIN1", "PPIMAGE.OUTPUT.CHIP")) {
     157            psError(PS_ERR_UNKNOWN, false, "Unable to bin chip.\n");
     158            return false;
     159        }
     160        if (!ppImageRebinChip(config, view, "PPIMAGE.BIN2", "PPIMAGE.OUTPUT.CHIP")) {
     161            psError(PS_ERR_UNKNOWN, false, "Unable to bin chip.\n");
     162            return false;
     163        }
    152164
    153165        // we perform photometry on the readouts of this chip in the output
     
    156168        }
    157169
     170        // Close cells
     171        view->cell = -1;
     172        while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) {
     173            if (!cell->process || !cell->file_exists) {
     174                continue;
     175            }
     176
     177            if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     178                return false;
     179            }
     180        }
     181
     182        // Close chip
    158183        if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
    159184            return false;
Note: See TracChangeset for help on using the changeset viewer.