Changeset 12681
- Timestamp:
- Mar 29, 2007, 12:22:22 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r12603 r12681 778 778 // XXX use PPIMAGE or DETREND for the recipe name? 779 779 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, "PPIMAGE"); 780 if (!status) 781 psAbort("PPIMAGE recipe not found"); 780 if (!status) { 781 psError(PS_ERR_UNEXPECTED_NULL, true, "PPIMAGE recipe not found."); 782 psFree(options); 783 psFree(fpa); 784 retrun false; 785 } 782 786 psMetadata *detConstraints = psMetadataLookupPtr (&status, recipe, "DETREND.CONSTRAINTS"); 783 if (!status) 784 psAbort("DETREND.CONSTRAINTS not found"); 785 // XXX allow this and just skip? 787 if (!status) { 788 psWarning("DETREND.CONSTRAINTS not found --- no constraints will be applied."); 789 goto DETREND_SELECT; 790 } 786 791 787 792 psString typeName = pmDetrendTypeToString (type); 788 793 psMetadata *constraints = psMetadataLookupPtr (&status, detConstraints, typeName); 789 794 if (!status) { 790 psAbort("DETREND.CONSTRAINTS for type %s not found", typeName); 795 psWarning("DETREND.CONSTRAINTS for type %s not found --- no contraints will be applied.", typeName); 796 psFree(typeName); 797 goto DETREND_SELECT; 791 798 } 792 799 psFree(typeName); … … 797 804 while ((item = psMetadataGetAndIncrement (iter)) != NULL) { 798 805 if (item->type != PS_DATA_STRING) { 799 psAbort("invalid type for DETREND.CONSTRAINT element"); 806 psWarning("Invalid type for DETREND.CONSTRAINT element %s --- ignoring constraint", item->name); 807 continue; 800 808 } 801 809 char *option = item->name; // item->name must correspond to a valid detselect option … … 809 817 if (!status) 810 818 psAbort("failed to find filter (concept %s)", concept); 811 812 } 813 if (!strcasecmp (option, "exptime")) { 819 } else if (!strcasecmp (option, "exptime")) { 814 820 options->exptime = psMetadataLookupF32 (&status, input->concepts, concept); 815 821 options->exptimeSet = true; 816 822 if (!status) 817 823 psAbort("exptime not found (concept %s)", concept); 818 } 819 if (!strcasecmp (option, "airmass")) { 824 } else if (!strcasecmp (option, "airmass")) { 820 825 options->airmass = psMetadataLookupF32 (&status, input->concepts, concept); 821 826 options->airmassSet = true; 822 827 if (!status) 823 828 psAbort("airmass not found (concept %s)", concept); 824 } 825 if (!strcasecmp (option, "dettemp")) { 829 } else if (!strcasecmp (option, "dettemp")) { 826 830 options->dettemp = psMetadataLookupF32 (&status, input->concepts, concept); 827 831 options->dettempSet = true; 828 832 if (!status) 829 833 psAbort("dettemp not found (concept %s)", concept); 830 } 831 if (!strcasecmp (option, "twilight")) { 834 } else if (!strcasecmp (option, "twilight")) { 832 835 options->twilight = psMetadataLookupF32 (&status, input->concepts, concept); 833 836 options->twilightSet = true; … … 849 852 psFree(iter); 850 853 854 DETREND_SELECT: 855 851 856 // search for existing detrend data (detID) 852 857 pmDetrendSelectResults *results = pmDetrendSelect (options, config); … … 859 864 psFree (options); 860 865 861 if (found) 866 if (found) { 862 867 *found = true; 868 } 863 869 return file; 864 870 } … … 930 936 931 937 if (config->cameraName[0] == '_' && 932 strcmp(config->cameraName + strlen(config->cameraName) - 5, "-CHIP") == 0) {938 strcmp(config->cameraName + strlen(config->cameraName) - 5, "-CHIP") == 0) { 933 939 // The input camera has already been mosaicked to this level 934 940 pmFPAfile *file = pmFPAfileDefineOutput(config, NULL, filename);
Note:
See TracChangeset
for help on using the changeset viewer.
