IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 30, 2006, 12:15:03 PM (20 years ago)
Author:
eugene
Message:

first complete working version (chip only)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroParseCamera.c

    r6911 r7014  
    1 # include "psphot.h"
     1# include "psastro.h"
     2// XXX leak free 2006.04.27
    23
    3 bool *psastroParseCamera (pmConfig *config) {
     4bool psastroParseCamera (pmConfig *config) {
    45
    5     ppFile *input = ppFileAlloc ();
     6    bool status = false;
    67
    78    // the input image(s) are required arguments; they define the camera
    8     input = pmFPAfileAddSource (config, "INPUT", "PSASTRO.INPUT", true);
     9    pmFPAfile *input = pmFPAfileFromArgs (&status, config, "PSASTRO.INPUT", "INPUT");
    910    if (!status) { psAbort (__func__, "missing INPUT entry"); }
    1011
     
    1516
    1617    // set default recipe values here
    17     psMetadataAddStr (recipe, PS_LIST_TAIL, "PHOTCODE", PS_META_NO_REPLACE, "default fitting mode", "NONE");
    18     psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_NO_REPLACE, "default fitting mode", "NONE");
     18    psMetadataAddStr (recipe, PS_LIST_TAIL, "PHOTCODE",    PS_META_NO_REPLACE, "", "NONE");
     19    psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_NO_REPLACE, "", "NONE");
    1920
    2021    // these calls bind the I/O handle to the specified fpa
     
    3839        }
    3940    }
     41    psFree (chips);
    4042
    4143    psTrace(__func__, 1, "Done with psastroParseCamera...\n");
    4244    return true;
    4345}
     46
     47
     48// useful for debugging
     49# if 0
     50for (int i = 0; i < input->fpa->chips->n; i++) {
     51    pmChip *chip = input->fpa->chips->data[i];
     52    fprintf (stderr, "chip %2d: %x %x\n", i, chip->file_exists, chip->process);
     53
     54    for (int j = 0; j < chip->cells->n; j++) {
     55        pmCell *cell = chip->cells->data[j];
     56        fprintf (stderr, "cell %2d: %x %x\n", j, cell->file_exists, cell->process);
     57
     58    }
     59}
     60# endif
Note: See TracChangeset for help on using the changeset viewer.