Changeset 11106
- Timestamp:
- Jan 15, 2007, 11:59:53 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r11092 r11106 28 28 #include "pmFPA_JPEG.h" 29 29 #include "pmDetrendDB.h" 30 #include "pmConceptsPhotcode.h" 30 31 31 32 // define an input-type pmFPAfile, bind to the optional fpa if supplied … … 644 645 } 645 646 646 // detselect -camera (camera) -time (time) -type (type) [others] 647 // camera and time are functions of (pmFPA *input) 648 // XXX add other options here f(pmFPA *input, type) 647 // we are constructing a detselect command of the form: 648 // detselect -search -inst (camera) -type (type) -time (time) [others] 649 // camera, type, and time are derived from pmFPA *input, other options are 650 // added if specified for the particular detrend type by the DETREND.CONSTRAINTS 651 // note that the filter-dependent choices are set for ppImage in ppImageParseCamera 649 652 650 653 // Get the time from FPA.TIME … … 678 681 } 679 682 char *option = item->name; // item->name must correspond to a valid detselect option 680 char *concept = item->data.V; // item->data.V is a concept to look up 683 684 psArray *conceptData = psStringSplitArray ((char *) item->data.V, ":", true); 685 if (conceptData == NULL) 686 psAbort ("psModules", "programming error"); 687 if (conceptData->n == 0) 688 psAbort ("psModules", "missing data for %s", item->name); 689 if (conceptData->n > 2) 690 psAbort ("psModules", "invalid format for %s", item->name); 691 692 char *concept = NULL; 693 char *function = NULL; 694 if (conceptData->n == 1) { 695 concept = conceptData->data[0]; 696 } 697 if (conceptData->n == 2) { 698 function = conceptData->data[0]; 699 concept = conceptData->data[1]; 700 } 701 681 702 if (!strcasecmp (option, "filter")) { 682 options->filter = psMetadataLookupPtr (&status, input->concepts, concept); 683 if (!status) 684 psAbort ("psModules", "filter not found"); 703 options->filter = NULL; 704 if (function) { 705 if (!strcasecmp (function, "FILTER.ID")) { 706 options->filter = pmConceptsFilterIDfromConcept (concept, input->concepts, config->camera); 707 } 708 } else { 709 options->filter = psMetadataLookupPtr (&status, input->concepts, concept); 710 } 711 if (options->filter == NULL) 712 psAbort ("psModules", "failed to find filter"); 713 685 714 } 686 715 if (!strcasecmp (option, "exptime")) { 716 if (function) 717 psAbort ("psModules", "no detrend constraint function for exptime"); 687 718 options->exptime = psMetadataLookupF32 (&status, input->concepts, concept); 688 719 if (!status) … … 690 721 } 691 722 if (!strcasecmp (option, "airmass")) { 723 if (function) 724 psAbort ("psModules", "no detrend constraint function for airmass"); 692 725 options->airmass = psMetadataLookupF32 (NULL, input->concepts, concept); 693 726 if (!status) … … 700 733 psAbort ("psModules", "dettemp not found"); 701 734 } 735 if (!strcasecmp (option, "version")) { 736 // version is applied as a literal string 737 if (function) 738 psAbort ("psModules", "no detrend constraint function for airmass"); 739 options->version = psStringCopy(concept); 740 } 741 if (!strcasecmp (option, "twilight")) { 742 // XXX determine the twilight time based on concept defining the time-of-day 743 options->twilight = psMetadataLookupF32 (NULL, input->concepts, concept); 744 if (!status) 745 psAbort ("psModules", "dettemp not found"); 746 } 702 747 // XXX need to include twilight time somehow (uses lookup based on a time value) 703 748 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
