Changeset 6911
- Timestamp:
- Apr 19, 2006, 10:51:44 AM (20 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 3 edited
-
psastroArguments.c (modified) (2 diffs)
-
psastroDataLoop.c (modified) (3 diffs)
-
psastroParseCamera.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroArguments.c
r6792 r6911 34 34 // save these recipe options until we have loaded the options 35 35 psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PSASTRO.OPTIONS", PS_DATA_METADATA, "", options); 36 psFree (options); 37 38 // chip selection is used to limit chips to be processed 39 if ((N = psArgumentGet (*argc, argv, "-chip"))) { 40 psArgumentRemove (N, argc, argv); 41 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTION", PS_DATA_STRING, "", psStringCopy(argv[N])); 42 psArgumentRemove (N, argc, argv); 43 } 36 44 37 45 status = pmConfigFileSetsMD (config->arguments, "INPUT", "-file", "-list"); … … 43 51 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "", argv[2]); 44 52 45 psTrace(__func__, 1, "Done with ps photArguments...\n");53 psTrace(__func__, 1, "Done with psastroArguments...\n"); 46 54 return (config); 47 55 } -
trunk/psastro/src/psastroDataLoop.c
r6792 r6911 1 1 # include "psastro.h" 2 2 3 // load the data from the files in this loop. 4 // we write out the result in a second loop 3 // this loop just loads the data from the input files. 5 4 // at the end of this function, the complete stellar data is loaded 6 5 // into the correct fpa structure locations (readout.analysis:PSPHOT.SOURCES) 6 // all of the different astrometry analysis modes use the same data load loop 7 7 bool psastroDataLoop (pmConfig *config) { 8 8 … … 12 12 exit(EXIT_FAILURE); 13 13 } 14 // de-activate all files except PSASTRO.INPUT 15 psFPAfileActivate (config->files, false, NULL); 16 psFPAfileActivate (config->files, true, "PSASTRO.INPUT"); 14 17 15 18 pmFPAview *view = pmFPAviewAlloc (0); … … 42 45 return true; 43 46 } 47 48 // we need to suppress other IO files. we need a function with toggles the mode/state of the 49 // pmFPAfiles so the ones of interest are active. -
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.
