Changeset 229
- Timestamp:
- 01/19/05 19:33:30 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r225 r229 109 109 _convert(scan, area, eta, all) 110 110 return 111 112 def gain_el(scan, filename="gainel.txt", method="linear", insitu=False, all=True): 113 """ 114 Return a scan after applying a gain-elevation correction via interpolation 115 (and extrapolation if necessary) from values in an ascii file. 116 Parameters: 117 scan: a scantable 118 filename: The name of the ASCII file holding the data. The first row 119 must give the column names. These MUST include columns 120 "ELEVATION" (degrees) and "FACTOR" (multiply data by this) somewhere. 121 The second row must give the data type of the column. Use 'R' for 122 Real and 'I' for Integer. An example file would be: 123 124 ELEVATION FACTOR 125 R R 126 0 1.5 127 20 1.4 128 40 1.3 129 60 1.2 130 80 1.1 131 90 1.0 132 method: Interpolation method. "nearest", "linear" (default), 133 "cubic" and "spline" 134 insitu: if False (default) a new scantable is returned. 135 Otherwise, the conversion is done in-situ 136 all: if True (default) apply to all spectra. Otherwise 137 apply only to the selected (beam/pol/if)spectra only 138 """ 139 if not insitu: 140 from asap._asap import gainel as _gainEl 141 return scantable(_gainEl(scan, filename, method, all)) 142 else: 143 from asap._asap import gainel_insitu as _gainEl 144 _gainEl(scan, filename, method, all) 145 return 111 146 112 147 def bin(scan, width=5, insitu=False):
Note:
See TracChangeset
for help on using the changeset viewer.