Changeset 11876
- Timestamp:
- Feb 18, 2007, 11:03:20 AM (19 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 3 edited
-
camera/pmFPAfileDefine.c (modified) (5 diffs)
-
detrend/pmDetrendDB.c (modified) (4 diffs)
-
detrend/pmDetrendDB.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r11801 r11876 784 784 // added if specified for the particular detrend type by the DETREND.CONSTRAINTS 785 785 // note that the filter-dependent choices are set for ppImage in ppImageParseCamera 786 // XXX make all of the detrend constraints explicit in DETREND.CONSTRAINTS? 786 787 787 788 // Get the time from FPA.TIME … … 793 794 794 795 // add additional constraints based on the type defined in the PPIMAGE recipe 795 // use PPIMAGE or DETREND or ???796 // XXX use PPIMAGE or DETREND for the recipe name? 796 797 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, "PPIMAGE"); 797 798 if (!status) … … 819 820 char *concept = item->data.V; 820 821 822 // these items refer to the corresponding values for the input image 823 // (ie, -filter input:filter or -exptime input:exptime) 821 824 if (!strcasecmp (option, "filter")) { 822 825 options->filter = psMetadataLookupPtr (&status, input->concepts, concept); 826 psMemIncrRefCounter (options->filter); 823 827 if (!status) 824 828 psAbort("failed to find filter (concept %s)", concept); … … 827 831 if (!strcasecmp (option, "exptime")) { 828 832 options->exptime = psMetadataLookupF32 (&status, input->concepts, concept); 833 options->exptimeSet = true; 829 834 if (!status) 830 835 psAbort("exptime not found (concept %s)", concept); … … 832 837 if (!strcasecmp (option, "airmass")) { 833 838 options->airmass = psMetadataLookupF32 (&status, input->concepts, concept); 839 options->airmassSet = true; 834 840 if (!status) 835 841 psAbort("airmass not found (concept %s)", concept); 836 842 } 837 # if (0) 838 if (!strcasecmp (option, "dettemp")) { 839 options->dettemp = psMetadataLookupF32 (&status, input->concepts, concept); 840 if (!status) 841 psAbort("dettemp not found (concept %s)", concept); 842 } 843 if (!strcasecmp (option, "version")) { 844 // version is applied as a literal string 845 options->version = psMetadataLookupF32 (&status, input->concepts, concept); 846 if (!status) 847 psAbort("version not found (concept %s)", concept); 848 } 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 } 849 849 if (!strcasecmp (option, "twilight")) { 850 // XXX determine the twilight time based on concept defining the time-of-day851 // XXX need to include twilight time somehow (uses lookup based on a time value)852 850 options->twilight = psMetadataLookupF32 (&status, input->concepts, concept); 851 options->twilightSet = true; 853 852 if (!status) 854 853 psAbort("twilight not found (concept %s)", concept); 855 854 } 856 # endif 857 855 856 // the version is applied literally 857 if (!strcasecmp (option, "version")) { 858 options->version = psMemIncrRefCounter (concept); 859 } 860 // we can override the detrend database dettype if desired 861 // ie, use DOMEFLAT for type FLAT 862 // the dettype string is applied literally 863 if (!strcasecmp (option, "dettype")) { 864 options->dettype = psMemIncrRefCounter (concept); 865 } 858 866 } 859 867 psFree(iter); -
trunk/psModules/src/detrend/pmDetrendDB.c
r11508 r11876 24 24 25 25 psFree (options->camera); 26 psFree (options->filter); 27 psFree (options->dettype); 28 psFree (options->version); 26 29 27 30 return; … … 41 44 42 45 // these other options depend on the type of detrend data 43 options->filter = NULL; // 44 options->exptime = -1.0; // the undefined value (safe since exptime >= 0) 45 options->airmass = -1.0; // the undefined value (safe since airmass >= 1) 46 options->filter = NULL; 47 options->version = NULL; 48 options->dettype = NULL; 49 options->exptime = 0.0; 50 options->airmass = 0.0; 51 options->dettemp = 0.0; 52 options->twilight = 0.0; 53 54 options->exptimeSet = false; // not selected 55 options->airmassSet = false; // not selected 56 options->dettempSet = false; // not selected 57 options->twilightSet = false; // not selected 46 58 47 59 return options; … … 105 117 psString line = NULL; 106 118 char *time = psTimeToISO (&options->time); 107 char *type = pmDetrendTypeToString (options->type); 119 120 char *type = NULL; 121 if (options->dettype) { 122 type = psMemIncrRefCounter (options->dettype); 123 } else { 124 type = pmDetrendTypeToString (options->type); 125 } 108 126 unsigned int nFail; 109 127 … … 114 132 psStringAppend(&line, " -filter %s", options->filter); 115 133 } 116 if (options->exptime > -1.0) { 134 if (options->version) { 135 psStringAppend(&line, " -version %s", options->version); 136 } 137 if (options->exptimeSet) { 117 138 psStringAppend(&line, " -exp_time %f", options->exptime); 118 139 } 119 if (options->airmass > -1.0) {140 if (options->airmassSet) { 120 141 psStringAppend(&line, " -airmass %f", options->airmass); 142 } 143 if (options->dettempSet) { 144 psStringAppend(&line, " -airmass %f", options->dettemp); 145 } 146 if (options->twilightSet) { 147 psStringAppend(&line, " -airmass %f", options->twilight); 121 148 } 122 149 -
trunk/psModules/src/detrend/pmDetrendDB.h
r11450 r11876 9 9 * @author EAM, IfA 10 10 * 11 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2007-0 1-31 00:35:24$11 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-02-18 21:03:20 $ 13 13 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii 14 14 */ … … 37 37 typedef struct 38 38 { 39 char *camera; // name of camera 40 psTime time; // time of input data 41 pmDetrendType type; // type of detrend data 42 char *filter; // name of filter 43 float exptime; // exposure time (for dark, maybe flat & fringe) 44 float airmass; // for fringe 39 char *camera; // name of camera 40 char *version; // optional version string 41 char *filter; // name of filter 42 char *dettype; // actual detrend type name 43 float exptime; // exposure time (for dark, maybe flat & fringe) 44 float airmass; // for fringe 45 float dettemp; // for fringe 46 float twilight; // hours (or seconds?) since/before nearest twilight 47 psTime time; // time of input data 48 pmDetrendType type; // type of detrend data 49 50 bool exptimeSet; 51 bool airmassSet; 52 bool dettempSet; 53 bool twilightSet; 45 54 } 46 55 pmDetrendSelectOptions;
Note:
See TracChangeset
for help on using the changeset viewer.
