IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36406


Ignore:
Timestamp:
Dec 18, 2013, 11:53:21 AM (13 years ago)
Author:
bills
Message:

change comments and fix a couple of typos in warning messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bills_branches/bills_201312/psphot/src/psmakecff.c

    r36375 r36406  
    22# include <config.h>
    33# endif
     4
     5// psmakecff : A program to make read a cmf file and write a cff file
     6// The real work is done in psModules.
    47
    58#include <stdio.h>
     
    811#include "psphot.h"
    912
     13// For simplicilty, this program's (simple) functions are all contained in this file.
    1014static pmConfig* psmakecffArguments(int, char**);
    1115static bool psmakecffParseCamera(pmConfig *);
     
    2529//    psphotVersionPrint();
    2630
    27     // load input data (config and images (signal, noise, mask)
    2831    if (!psmakecffParseCamera (config)) {
    2932        psErrorStackPrint(stderr, "Error setting up the camera\n");
     
    3134    }
    3235
    33     // call psphot for each readout
    3436    if (!psmakecffImageLoop (config)) {
    3537        psErrorStackPrint(stderr, "Error in the psphot image loop\n");
     
    3739    }
    3840
    39 //    psLogMsg ("psphot", PS_LOG_WARN, "complete psphot run: %f sec\n", psTimerMark ("complete"));
    40 
    41 //    psErrorCode exit_status = psphotGetExitStatus();
    42 //    psphotCleanup (config);
    4341    exit (0);
    4442}
     
    7371    return config;
    7472}
     73
    7574static bool psmakecffParseCamera(pmConfig *config) {
    7675    bool status = false;
     
    127126    psAssert (recipe, "missing recipe?");
    128127
    129 //    psImageMaskType maskTest = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT");
    130128
    131129    // for psphot, we force data to be read at the chip level
    132130    while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) {
    133         psLogMsg ("psmakecmf", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
     131        psLogMsg ("psmakecff", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    134132        if (! chip->process || ! chip->file_exists) { continue; }
    135133
    136 #ifdef notdef
    137         pmFPAfileActivate (config->files, false, NULL);
    138         pmFPAfileActivate (config->files, true, "PSPHOT.LOAD");
    139 #endif
    140134        if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE ("failed input for Chip in psmakecff.");
    141135
    142136        // there is now only a single chip (multiple readouts?). loop over it and process
    143137        while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
    144             psLogMsg ("psmakecmf", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     138            psLogMsg ("psmakecff", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    145139
    146140            // process each of the readouts
    147141            while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
    148                 psLogMsg ("psmakecmf", 6, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     142                psLogMsg ("psmakecff", 6, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    149143                if (! readout->data_exists) { continue; }
    150144
    151145                pmHDU *hdu = pmHDUGetHighest(input->fpa, chip, cell);
    152146                if (hdu && hdu != lastHDU) {
     147                    // XXX: probably should do this
    153148                    // psphotVersionHeaderFull(hdu->header);
    154149                    lastHDU = hdu;
     
    157152
    158153        }
    159         // Defer output and closing of files until we've (possibly) done the NFrames analysis below
    160 //        pmFPAfileActivate (config->files, false, NULL);
    161 
    162154        if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE ("failed pmFPAfileIOChecks for Chip in psmakecff.");
    163155    }
    164156    if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE ("failed pmFPAfileIOChecks for FPA in psphot.");
    165157
    166     // fail if we failed to handle an error
     158    // fail if we encountered an unhandled error
    167159    if (psErrorCodeLast() != PS_ERR_NONE) psAbort ("failed to handle an error!");
    168160
Note: See TracChangeset for help on using the changeset viewer.