Changeset 937 for trunk/test
- Timestamp:
- 03/27/06 19:36:17 (19 years ago)
- Location:
- trunk/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/mopra.py
r751 r937 6 6 s = scantable("data/mopra_dualif.rpf") 7 7 q = s.auto_quotient() 8 q2 = quotient(s.get_scan("*_S"),s.get_scan("*_R")) 9 del q2,s 8 del s 10 9 restfreqs = [110.201,86.243] # 13CO-1/0, SiO the two IF 11 10 q.set_restfreqs(restfreqs,"GHz") # set the restfrequencies, as not in data … … 21 20 f = fitter() 22 21 f.set_scan(q) 23 q.set_cursor(IF=0) 22 selection = selector() 23 selection.setifs([1]) 24 q.set_selection(selection) 24 25 f.set_function(gauss=2) # fit two gaussians 25 26 f.fit() -
trunk/test/parkes-pol.py
r744 r937 3 3 4 4 rcParams['verbose'] = 0 5 rcParams['plotter.ganged'] = 0 5 6 6 7 # Don't plot to the screen... … … 16 17 data_1665.set_freqframe('LSRK') 17 18 18 # Make a copy for the 1667 transition19 data_1667 = data_1665.copy() 20 data_1667.set_restfreqs(lines = ['OH1667'])21 data_1667.set_unit('km/s')22 data_166 7.set_freqframe('LSRK')19 # Look at the first scan 20 from asap._asap import selector 21 selection = selector() 22 selection._setscans([0]) 23 data_1665._setselection(selection) 23 24 25 d1_5 = data_1665.copy() 26 d1_7 = data_1665.copy() 24 27 25 # Look at the first scan 26 d1_5 = data_1665.get_scan(0) 27 d1_7 = data_1667.get_scan(0) 28 d1_7.set_restfreqs([1667.0],'MHz') 29 # merge the two scans back together into a new scantable 30 plotscans = merge(d1_5,d1_7) 31 print plotscans.summary() 32 del d1_5,d1_7 28 33 29 34 # Baseline 30 msk = d1_5.create_mask([-30,-25],[-5,0]) 31 d1_5.poly_baseline(msk,1) 32 msk = d1_7.create_mask([-30,-25],[-5,0]) 33 d1_7.poly_baseline(msk,1) 34 35 msk = plotscans.create_mask([-30,-25],[-5,0]) 36 plotscans.poly_baseline(msk,1) 35 37 # Plot the results 36 plotter.plot(d1_5,d1_7)37 38 plotter.set_mode('p','s') 38 39 plotter.set_layout(2,1) 39 40 plotter.set_range(-30,0) 40 plotter.set_cursor(pol=['I','Q','U','V']) 41 plotter.set_cursor(pol=['I','Plinear']) 42 plotter.set_cursor(pol=['RR','LL']) 43 plotter.save('output/parkes_rrll.png') 41 selection._reset() 42 selection._setpolstrings(['I','Q', 'U', 'V']) 43 #plotter.set_selection(selection) 44 #selection._setpolstrings(['I','Plinear']) 45 #plotter.set_selection(selection) 46 #selection._setpolstrings(['RR','LL']) 47 plotter.plot(plotscans) 48 plotter.set_selection(selection) 49 plotter.save('/nfs/wwwpeople/mmarquar/parkes.png', dpi=80) 50 #plotter.save('output/parkes_rrll.png') 44 51 45 52 print "Parkes-Pol Test successful" -
trunk/test/tid.py
r794 r937 4 4 rcParams['verbose'] = 0 5 5 6 rcParams['plotter.ganged'] = 0 6 7 # Don't plot to the screen... 7 8 del plotter … … 12 13 # Create the quotient spectra 13 14 data = scantable('data/tid-t002.rpf') 14 s = data.get_scan('*[^we]') 15 r = data.get_scan('*[we]') 16 q = quotient(s,r) 17 15 q = data.auto_quotient() 18 16 # Set the restfreq for each IF 19 17 q.set_restfreqs(freqs= [23694.4700e6,23722.6336e6]) 20 18 q.set_unit('km/s') 21 19 q.set_freqframe('LSRK') 22 23 20 # Align frequencies 24 25 q.freq_align(perif=True) 26 21 qa = q.freq_align(insitu=False) 27 22 # Recalculate the az/el 28 29 q.recalc_azel() 30 23 qa.recalc_azel() 31 24 # Correct for gain curve and opacity 32 q.gain_el() 33 q.opacity(0.075) 34 25 qa.gain_el() 26 qa.opacity(0.075) 35 27 # Average in time 36 av = average_time(q) 37 28 av = qa.average_time() 38 29 # Baseline 39 30 msk=av.create_mask([-70,-50],[40,60]) 40 31 av.poly_baseline(msk,1) 41 42 plotter.set_mode('i') 32 plotter.set_mode('i','s') 43 33 plotter.plot(av) 44 plotter.save('output/tid.png' )34 plotter.save('output/tid.png', dpi=80) 45 35 46 36 # Do some random processing, just to test these functions
Note:
See TracChangeset
for help on using the changeset viewer.