Changeset 12152 for trunk/psModules/src/camera/pmFPAfileDefine.c
- Timestamp:
- Mar 1, 2007, 1:29:47 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r11876 r12152 163 163 if (file->type == PM_FPA_FILE_NONE) { 164 164 psError(PS_ERR_IO, true, "FILE.TYPE is not defined for %s\n", name); 165 psFree(file); 165 166 return NULL; 166 167 } … … 176 177 } else { 177 178 psError(PS_ERR_IO, true, "Illegal value \"%s\" for FILE.SAVE for %s", save, name); 179 psFree(file); 178 180 return NULL; 179 181 } … … 190 192 // select the format list from the selected camera 191 193 const char *formatName = psMetadataLookupStr (&status, data, "FILE.FORMAT"); 192 if (!formatName) { 194 if (!formatName || strcmp(formatName, "NONE") == 0) { 195 // Try to get by with the default 193 196 formatName = config->formatName; 194 197 } … … 196 199 psMetadata *format = psMetadataLookupMetadata(&status, formats, formatName); // Camera format to use 197 200 if (!format) { 198 // Try to get by with the default 199 format = config->format; 201 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find format %s for file %s.\n", 202 formatName, file->name); 203 psFree(file); 204 return NULL; 200 205 } 201 206 file->format = psMemIncrRefCounter(format); … … 206 211 if (file->fileLevel == PM_FPA_LEVEL_NONE) { 207 212 psError(PS_ERR_IO, true, "Unable to determine file level for %s\n", name); 213 psFree(file); 208 214 return NULL; 209 215 } … … 212 218 if (file->dataLevel == PM_FPA_LEVEL_NONE) { 213 219 psError(PS_ERR_IO, true, "DATA.LEVEL is not set for %s\n", name); 220 psFree(file); 214 221 return NULL; 215 222 } … … 820 827 char *concept = item->data.V; 821 828 822 // these items refer to the corresponding values for the input image 823 // (ie, -filter input:filter or -exptime input:exptime)829 // these items refer to the corresponding values for the input image 830 // (ie, -filter input:filter or -exptime input:exptime) 824 831 if (!strcasecmp (option, "filter")) { 825 832 options->filter = psMetadataLookupPtr (&status, input->concepts, concept); 826 psMemIncrRefCounter (options->filter);833 psMemIncrRefCounter (options->filter); 827 834 if (!status) 828 835 psAbort("failed to find filter (concept %s)", concept); … … 831 838 if (!strcasecmp (option, "exptime")) { 832 839 options->exptime = psMetadataLookupF32 (&status, input->concepts, concept); 833 options->exptimeSet = true;840 options->exptimeSet = true; 834 841 if (!status) 835 842 psAbort("exptime not found (concept %s)", concept); … … 837 844 if (!strcasecmp (option, "airmass")) { 838 845 options->airmass = psMetadataLookupF32 (&status, input->concepts, concept); 839 options->airmassSet = true;846 options->airmassSet = true; 840 847 if (!status) 841 848 psAbort("airmass not found (concept %s)", concept); 842 849 } 843 if (!strcasecmp (option, "dettemp")) {844 options->dettemp = psMetadataLookupF32 (&status, input->concepts, concept);845 options->dettempSet = true;846 if (!status)847 psAbort("dettemp not found (concept %s)", concept);848 }850 if (!strcasecmp (option, "dettemp")) { 851 options->dettemp = psMetadataLookupF32 (&status, input->concepts, concept); 852 options->dettempSet = true; 853 if (!status) 854 psAbort("dettemp not found (concept %s)", concept); 855 } 849 856 if (!strcasecmp (option, "twilight")) { 850 857 options->twilight = psMetadataLookupF32 (&status, input->concepts, concept); 851 options->twilightSet = true;858 options->twilightSet = true; 852 859 if (!status) 853 860 psAbort("twilight not found (concept %s)", concept); 854 861 } 855 862 856 // the version is applied literally863 // the version is applied literally 857 864 if (!strcasecmp (option, "version")) { 858 865 options->version = psMemIncrRefCounter (concept); 859 866 } 860 // we can override the detrend database dettype if desired861 // ie, use DOMEFLAT for type FLAT862 // the dettype string is applied literally867 // we can override the detrend database dettype if desired 868 // ie, use DOMEFLAT for type FLAT 869 // the dettype string is applied literally 863 870 if (!strcasecmp (option, "dettype")) { 864 871 options->dettype = psMemIncrRefCounter (concept);
Note:
See TracChangeset
for help on using the changeset viewer.
