Changeset 1855
- Timestamp:
- 08/04/10 18:29:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1846 r1855 158 158 this is the root file name (data in 'name'.txt 159 159 and header in 'name'_header.txt) 160 160 161 format: an optional file format. Default is ASAP. 161 Allowed are - 'ASAP' (save as ASAP [aips++] Table), 162 'SDFITS' (save as SDFITS file) 163 'ASCII' (saves as ascii text file) 164 'MS2' (saves as an aips++ 165 MeasurementSet V2) 166 'FITS' (save as image FITS - not 167 readable by class) 168 'CLASS' (save as FITS readable by CLASS) 162 Allowed are: 163 164 * 'ASAP' (save as ASAP [aips++] Table), 165 * 'SDFITS' (save as SDFITS file) 166 * 'ASCII' (saves as ascii text file) 167 * 'MS2' (saves as an casacore MeasurementSet V2) 168 * 'FITS' (save as image FITS - not readable by class) 169 * 'CLASS' (save as FITS readable by CLASS) 170 169 171 overwrite: If the file should be overwritten if it exists. 170 172 The default False is to return with warning 171 173 without writing the output. USE WITH CARE. 174 172 175 Example:: 173 176 … … 274 277 275 278 def get_scan(self, scanid=None): 276 """ 279 """\ 277 280 Return a specific scan (by scanno) or collection of scans (by 278 281 source name) in a new scantable. … … 402 405 Parameters: 403 406 404 spec: the spectrum 405 rowno: the row number to set the spectrum for 407 spec: the new spectrum 408 409 rowno: the row number to set the spectrum for 406 410 407 411 """ … … 528 532 stat: 'min', 'max', 'min_abc', 'max_abc', 'sumsq', 'sum', 529 533 'mean', 'var', 'stddev', 'avdev', 'rms', 'median' 534 530 535 mask: an optional mask specifying where the statistic 531 536 should be determined. 537 532 538 form: format string to print statistic values 533 539 … … 621 627 rowno: a row number in the scantable. Default is the 622 628 first row, i.e. rowno=0 629 623 630 chan: a channel in the scantable. Default is the first 624 631 channel, i.e. pos=0 … … 749 756 750 757 row: row no of integration. Default -1 return all rows 758 751 759 asdatetime: return values as datetime objects rather than strings 752 760 … … 827 835 Get a list of Positions on the sky (direction) for the observations. 828 836 Return a string for each integration in the scantable. 829 Parameters: 837 838 Parameters: 839 830 840 row: row no of integration. Default -1 return all rows 831 Example: 832 none 841 833 842 """ 834 843 return self._get_column(self._getdirection, row) … … 1019 1028 mask: an optional channel mask, created with create_mask. Default 1020 1029 (no mask) is all channels. 1030 1021 1031 unflag: if True, unflag the data 1022 1032 … … 1044 1054 rows: list of row numbers to be flagged. Default is no row 1045 1055 (must be explicitly specified to execute row-based flagging). 1056 1046 1057 unflag: if True, unflag the data. 1047 1058 … … 1066 1077 1067 1078 uthres: upper threshold. 1079 1068 1080 dthres: lower threshold 1069 1081 1070 1082 clipoutside: True for flagging data outside the range [dthres:uthres]. 1071 1083 False for glagging data inside the range. 1084 1072 1085 unflag: if True, unflag the data. 1073 1086 … … 1096 1109 start: the start frequency (really a period within the 1097 1110 bandwidth) or period to remove 1111 1098 1112 end: the end frequency or period to remove 1113 1099 1114 unit: the frequency unit (default "MHz") or "" for 1100 1115 explicit lag channels … … 1145 1160 Pairs of start/end points (inclusive)specifying the regions 1146 1161 to be masked 1162 1147 1163 invert: optional argument. If specified as True, 1148 1164 return an inverted mask, i.e. the regions 1149 1165 specified are EXCLUDED 1166 1150 1167 row: create the mask using the specified row for 1151 1168 unit conversions, default is row=0 … … 1211 1228 1212 1229 mask: channel mask, created with create_mask. 1230 1213 1231 row: calcutate the masklist using the specified row 1214 1232 for unit conversions, default is row=0 … … 1251 1269 """\ 1252 1270 Compute and Return lists of mask start indices and mask end indices. 1253 Parameters: 1271 1272 Parameters: 1273 1254 1274 mask: channel mask, created with create_mask. 1255 1275 … … 1342 1362 1343 1363 freqs: list of rest frequency values or string idenitfiers 1364 1344 1365 unit: unit for rest frequency (default 'Hz') 1345 1366 … … 1519 1540 mask: an optional mask (only used for 'var' and 'tsys' 1520 1541 weighting) 1542 1521 1543 scanav: True averages each scan separately 1522 1544 False (default) averages all scans together, 1545 1523 1546 weight: Weighting scheme. 1524 1547 'none' (mean no weight) … … 1529 1552 'median' ( median averaging) 1530 1553 The default is 'tint' 1554 1531 1555 align: align the spectra in velocity before averaging. It takes 1532 1556 the time of the first spectrum as reference time. … … 1578 1602 1579 1603 jyperk: the Jy / K conversion factor 1604 1580 1605 eta: the aperture efficiency 1606 1581 1607 d: the geomtric diameter (metres) 1608 1582 1609 insitu: if False a new scantable is returned. 1583 1610 Otherwise, the scaling is done in-situ … … 1614 1641 gain-elevation correction as a function of 1615 1642 elevation (in degrees). 1643 1616 1644 filename: The name of an ascii file holding correction factors. 1617 1645 The first row of the ascii file must give the column … … 1632 1660 0.5 80 0.8 1633 1661 0.6 90 0.75 1662 1634 1663 method: Interpolation method when correcting from a table. 1635 1664 Values are "nearest", "linear" (default), "cubic" 1636 1665 and "spline" 1666 1637 1667 insitu: if False a new scantable is returned. 1638 1668 Otherwise, the scaling is done in-situ … … 1663 1693 1664 1694 Parameters: 1695 1665 1696 reftime: reference time to align at. By default, the time of 1666 1697 the first row of data is used. 1698 1667 1699 method: Interpolation method for regridding the spectra. 1668 1700 Choose from "nearest", "linear", "cubic" (default) 1669 1701 and "spline" 1702 1670 1703 insitu: if False a new scantable is returned. 1671 1704 Otherwise, the scaling is done in-situ … … 1690 1723 1691 1724 Parameters: 1725 1692 1726 tau: (list of) opacity from which the correction factor is 1693 1727 exp(tau*ZD) … … 1698 1732 if tau is `None` the opacities are determined from a 1699 1733 model. 1734 1700 1735 insitu: if False a new scantable is returned. 1701 1736 Otherwise, the scaling is done in-situ … … 1722 1757 1723 1758 width: The bin width (default=5) in pixels 1759 1724 1760 insitu: if False a new scantable is returned. 1725 1761 Otherwise, the scaling is done in-situ … … 1746 1782 1747 1783 width: The bin width (default=5) in pixels 1784 1748 1785 method: Interpolation method when correcting from a table. 1749 1786 Values are "nearest", "linear", "cubic" (default) 1750 1787 and "spline" 1788 1751 1789 insitu: if False a new scantable is returned. 1752 1790 Otherwise, the scaling is done in-situ … … 1773 1811 averaging will be applied. The output will have all 1774 1812 specified points masked. 1813 1775 1814 weight: Weighting scheme. 'none' (default), 'var' (1/var(spec) 1776 1815 weighted), or 'tsys' (1/Tsys**2 weighted) … … 1793 1832 averaging will be applied. The output will have all 1794 1833 specified points masked. 1834 1795 1835 weight: Weighting scheme. 'none' (default), 'var' (1/var(spec) 1796 1836 weighted), or 'tsys' (1/Tsys**2 weighted) … … 1810 1850 1811 1851 Parameters: 1852 1812 1853 pflag: Bool indicating whether to turn this on (True) or 1813 1854 off (False) … … 1825 1866 1826 1867 Parameters: 1868 1827 1869 poltype: The new polarisation type. Valid types are: 1828 1870 "linear", "circular", "stokes" and "linpol" … … 1855 1897 'hanning' (default), 'gaussian', 'boxcar', 'rmedian' 1856 1898 or 'poly' 1899 1857 1900 width: The width of the kernel in pixels. For hanning this is 1858 1901 ignored otherwise it defauls to 5 pixels. … … 1860 1903 Maximum. For 'boxcar' it is the full width. 1861 1904 For 'rmedian' and 'poly' it is the half width. 1905 1862 1906 order: Optional parameter for 'poly' kernel (default is 2), to 1863 1907 specify the order of the polnomial. Ignored by all other 1864 1908 kernels. 1909 1865 1910 plot: plot the original and the smoothed spectra. 1866 1911 In this each indivual fit has to be approved, by 1867 1912 typing 'y' or 'n' 1913 1868 1914 insitu: if False a new scantable is returned. 1869 1915 Otherwise, the scaling is done in-situ … … 1929 1975 1930 1976 mask: an optional mask 1977 1931 1978 order: the order of the polynomial (default is 0) 1979 1932 1980 plot: plot the fit and the residual. In this each 1933 1981 indivual fit has to be approved, by typing 'y' 1934 1982 or 'n' 1983 1935 1984 uselin: use linear polynomial fit 1985 1936 1986 insitu: if False a new scantable is returned. 1937 1987 Otherwise, the scaling is done in-situ … … 2242 2292 2243 2293 offset: the offset 2294 2244 2295 insitu: if False a new scantable is returned. 2245 2296 Otherwise, the scaling is done in-situ … … 2266 2317 2267 2318 factor: the scaling factor (float or 1D float list) 2319 2268 2320 insitu: if False a new scantable is returned. 2269 2321 Otherwise, the scaling is done in-situ 2270 2322 The default is taken from .asaprc (False) 2323 2271 2324 tsys: if True (default) then apply the operation to Tsys 2272 2325 as well as the data … … 2302 2355 2303 2356 match: a Unix style pattern, regular expression or selector 2357 2304 2358 matchtype: 'pattern' (default) UNIX style pattern or 2305 2359 'regex' regular expression 2360 2306 2361 sourcetype: the type of the source to use (source/reference) 2307 2362 … … 2345 2400 preserve: Output = Toff * (on/off) - Toff 2346 2401 remove: Output = Toff * (on/off) - Ton 2402 2347 2403 mode: the on/off detection mode 2348 2404 'paired' (default) … … 2386 2442 2387 2443 mask: an optional mask to be used when weight == 'stddev' 2444 2388 2445 weight: How to average the off beams. Default is 'median'. 2446 2389 2447 preserve: you can preserve (default) the continuum or 2390 remove it. The equations used are 2391 preserve: Output = Toff * (on/off) - Toff 2392 remove: Output = Toff * (on/off) - Ton 2448 remove it. The equations used are: 2449 2450 preserve: Output = Toff * (on/off) - Toff 2451 2452 remove: Output = Toff * (on/off) - Ton 2393 2453 2394 2454 """
Note:
See TracChangeset
for help on using the changeset viewer.