Changeset 6911 for trunk/psastro/src/psastroParseCamera.c
- Timestamp:
- Apr 19, 2006, 10:51:44 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroParseCamera.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroParseCamera.c
r6792 r6911 7 7 // the input image(s) are required arguments; they define the camera 8 8 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); 12 15 13 16 // set default recipe values here … … 15 18 psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_NO_REPLACE, "default fitting mode", "NONE"); 16 19 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 17 41 psTrace(__func__, 1, "Done with psastroParseCamera...\n"); 18 42 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
