IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 19, 2006, 10:51:44 AM (20 years ago)
Author:
eugene
Message:

adding file concepts

File:
1 edited

Legend:

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

    r6792 r6911  
    77    // the input image(s) are required arguments; they define the camera
    88    input = pmFPAfileAddSource (config, "INPUT", "PSASTRO.INPUT", true);
    9     if (input == NULL) {
    10         psAbort (__func__, "missing INPUT entry");
    11     }
     9    if (!status) { psAbort (__func__, "missing INPUT entry"); }
     10
     11    // select recipe options supplied on command line
     12    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes,   "PSASTRO");
     13    psMetadata *options = psMetadataLookupPtr (&status, config->arguments, "PSASTRO.OPTIONS");
     14    psMetadataCopy (recipe, options);
    1215
    1316    // set default recipe values here
     
    1518    psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_NO_REPLACE, "default fitting mode", "NONE");
    1619
     20    // these calls bind the I/O handle to the specified fpa
     21    pmFPAfileDefine (config->files, config->camera, input->fpa, "PSASTRO.OUTPUT");
     22
     23    // supply the output name (from cmd-line) to all output (WRITE) files
     24    char *output = psMetadataLookupPtr(&status, config->arguments, "OUTPUT");
     25    pmFPAfileAddFileNames (config->files, "OUTPUT", output, PM_FPA_MODE_WRITE);
     26
     27    // Chip selection: turn on only the chips specified
     28    char *chipLine = psMetadataLookupStr(NULL, config->arguments, "CHIP_SELECTIONS");
     29    psArray *chips = psStringSplitArray (chipLine, ",");
     30    if (chips->n > 0) {
     31        pmFPASelectChip (input->fpa, -1, true); // deselect all chips
     32        for (int i = 0; i < chips->n; i++) {
     33            int chipNum = atoi(chips->data[i]);
     34            if (! pmFPASelectChip(input->fpa, chipNum, false)) {
     35                psErrorStackPrint(stderr, "Chip number %d doesn't exist in camera.\n", chipNum);
     36                exit(EXIT_FAILURE);
     37            }
     38        }
     39    }
     40
    1741    psTrace(__func__, 1, "Done with psastroParseCamera...\n");
    1842    return true;
Note: See TracChangeset for help on using the changeset viewer.