Changeset 1600
- Timestamp:
- 07/08/09 16:30:04 (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/CHANGELOG
r1580 r1600 2 2 ========= 3 3 4 Release 2.4.0 []4 Release 3.0.0 [] 5 5 6 6 * Ticket #155 Better output filenames. Ignore non-existsing beams/pols/ifs/scans … … 11 11 * Ticket #163 fixed for scantable.set_sourcetype 12 12 * Ticket #164 Upgrade note in wiki FAQ 13 * Ticket #165 Handle non-parallactified polarimtery data (if supported in rpfits) 13 14 * Ticket #167 Added running polynomial filter to scantable.smooth 14 * Ticket #168 Data exported vi scnatable.save now contains correct frequency15 or velocity information15 * Ticket #168 Data exported via scantable.save now contains correct frequency 16 or velocity information 16 17 * Ticket #169 Simplified selection of data 17 * Ticket #46 Interactive lag flagging 18 18 * Ticket #46 Interactive lag flagging 19 * Ticket #170 Provided access to frequency coordinate information via 20 scantable.get_coordinate 19 21 * Added OS X 10.5 Disk image installer 20 22 * Interactive plotting annotations via optional argument interactive=True … … 35 37 * Ticket #149 Fixed the bug causing spectral line search to go into an infinite loop 36 38 in some rare circumstances 37 * Ticket #110 Added export to CLASS readable FITS files 39 * Ticket #110 Added export to CLASS readable FITS files 38 40 scantable.save("myfile.fits", "CLASS") 39 41 * Ticket #142 Fix of the frequency alignment for long observations 40 42 * Ticket #133 allow supression of history in the scantable via rc parameters 41 * Ticket #109 source direction for Hobart data 42 * Ticket #115 added running median to scantable.(smooth(kernel='rmedian') 43 * Ticket #109 source direction for Hobart data 44 * Ticket #115 added running median to scantable.(smooth(kernel='rmedian') 43 45 * Ticket #148 opacity correction wasn't applied to TSYS 44 46 * Ticket #135 quotient detection failure for specific source names … … 76 78 * fix for Ticket #88 - numpy masks 77 79 * better TAB completion for ipython (handles quotes, don't list private members) 78 * Fix for Ticket #81 = scanatble.stats output as list 80 * Fix for Ticket #81 = scanatble.stats output as list 79 81 * ticket #64 - speed up of auto_poly_baseline 80 82 * fix for ticket #89 - export of IF sub-selections -
trunk/python/scantable.py
r1594 r1600 5 5 from asap import selector 6 6 from asap import linecatalog 7 from asap.coordinate import coordinate 7 8 from asap import _n_bools, mask_not, mask_and, mask_or 8 9 … … 293 294 assert(len(spec) == self.nchan()) 294 295 return self._setspectrum(spec, rowno) 296 297 def get_coordinate(self, rowno): 298 """Return the (spectral) coordinate for a a given 'rowno'. 299 NOTE: 300 * This coordinate is only valid until a scantable method modifies 301 the frequency axis. 302 * This coordinate does contain the original frequency set-up 303 NOT the new frame. The conversions however are done using the user 304 specified frame (e.g. LSRK/TOPO). To get the 'real' coordinate, 305 use scantable.freq_align first. Without it there is no closure, 306 i.e. 307 c = myscan.get_coordinate(0) 308 c.to_frequency(c.get_reference_pixel()) != c.get_reference_value() 309 310 Parameters: 311 rowno: the row number for the spectral coordinate 312 313 """ 314 return coordinate(Scantable.get_coordinate(self, rowno)) 295 315 296 316 def get_selection(self): -
trunk/src/STCoordinate.h
r1599 r1600 25 25 public: 26 26 STCoordinate() {}; 27 28 STCoordinate(const STCoordinate& other) : spec_(other.spec_) {}; 29 27 30 STCoordinate(const casa::SpectralCoordinate& spec) : 28 31 spec_(spec) {}; -
trunk/test/test_scantable.py
r1592 r1600 1 1 import unittest 2 import datetime 2 3 from asap import scantable, selector, rcParams 3 4 rcParams["verbose"] = False … … 57 58 sel1 = self.st.get_selection() 58 59 self.assertEqual(sel1.get_pols(), [1]) 60 self.st.set_selection(pols="XX") 61 self.assertEqual(self.st.getpolnos(), (0,)) 59 62 60 63 def test_stats(self): … … 83 86 self.assertEqual(self.st.get_column_names(), cnames) 84 87 88 def test_get_tsys(self): 89 self.assertAlmostEqual(self.st.get_tsys()[0], 175.830429077) 90 91 def test_get_time(self): 92 self.assertEqual(self.st.get_time(0), '2008/03/12/09:32:50') 93 dt = datetime.datetime(2008,3,12,9,32,50) 94 self.assertEqual(self.st.get_time(0, True), dt) 95 96 def test_get_inttime(self): 97 self.assertAlmostEqual(self.st.get_inttime()[0], 30.720016479) 98 99 def test_get_sourcename(self): 100 self.assertEqual(self.st.get_sourcename(0), 'Orion_SiO_R') 101 self.assertEqual(self.st.get_sourcename()[:2], ['Orion_SiO_R', 'Orion_SiO']) 102 103 def test_get_azimuth(self): 104 self.assertAlmostEqual(self.st.get_azimuth()[0], 5.628767013) 105 106 def test_get_elevation(self): 107 self.assertAlmostEqual(self.st.get_elevation()[0], 1.01711678504) 108 109 def test_get_parangle(self): 110 self.assertAlmostEqual(self.st.get_parangle()[0], 2.5921990871) 111 112 def test_get_direction(self): 113 self.assertEqual(self.st.get_direction()[0], '05:35:14.5 -04.52.29.5') 114 115 def test_get_directionval(self): 116 dv = self.st.get_directionval()[0] 117 self.assertAlmostEqual(dv[0], 1.4627692699) 118 self.assertAlmostEqual(dv[1], -0.0850824415) 119 120 def test_unit(self): 121 self.st.set_unit('') 122 self.st.set_unit('GHz') 123 self.st.set_unit('km/s') 124 self.assertRaises(RuntimeError, self.st.set_unit, 'junk') 125 self.assertEquals(self.st.get_unit(), 'km/s') 126 85 127 def test_average_pol(self): 86 128 ap = self.st.average_pol() 87 129 self.assertEqual(ap.npol(), 1) 88 130 131 def test_drop_scan(self): 132 s0 = self.st.drop_scan(1) 133 self.assertEqual(s0.getscannos(), (0,)) 134 s1 = self.st.drop_scan([0]) 135 self.assertEqual(s1.getscannos(), (1,)) 136 89 137 90 138 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.