Changeset 9682 for trunk/ippTools/src/regtool.c
- Timestamp:
- Oct 20, 2006, 2:37:02 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/regtool.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/regtool.c
r9392 r9682 762 762 } 763 763 psF32 exp_time = psMetadataLookupF32(&status, config->args, "-exp_time"); 764 if ( isnan(exp_time)) {764 if (!status) { 765 765 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_time"); 766 766 return false; … … 839 839 return false; 840 840 } 841 842 return rawDetrendExpRowAlloc( 841 psTime *dateobs = NULL; 842 { 843 psString dateobsStr = psMetadataLookupStr(&status, config->args, "-dateobs"); 844 if (!status) { 845 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -dateobs"); 846 return false; 847 } 848 // pass through NULL as this is an optional field 849 if (dateobsStr) { 850 dateobs = psTimeFromISO(dateobsStr, PS_TIME_UTC); 851 } else { 852 dateobs = NULL; 853 } 854 } 855 856 rawDetrendExpRow *raw = rawDetrendExpRowAlloc( 843 857 exp->exp_tag, 844 858 exp->camera, … … 858 872 ccd_temp, 859 873 posang, 860 object 874 object, 875 dateobs 861 876 ); 877 878 if (dateobs) { 879 psFree(dateobs); 880 } 881 882 return raw; 862 883 } 863 884 … … 992 1013 } 993 1014 994 return rawImfileRowAlloc( 1015 psTime *dateobs = NULL; 1016 { 1017 psString dateobsStr = psMetadataLookupStr(&status, config->args, "-dateobs"); 1018 if (!status) { 1019 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -dateobs"); 1020 return false; 1021 } 1022 dateobs = psTimeFromISO(dateobsStr, PS_TIME_UTC); 1023 } 1024 1025 rawImfileRow *raw = rawImfileRowAlloc( 995 1026 imfile->exp_tag, 996 1027 imfile->class, … … 1010 1041 ccd_temp, 1011 1042 posang, 1012 object 1043 object, 1044 dateobs 1013 1045 ); 1014 } 1015 1046 1047 psFree(dateobs); 1048 1049 return raw; 1050 } 1051
Note:
See TracChangeset
for help on using the changeset viewer.
