Changeset 1838 for trunk/test
- Timestamp:
- 08/03/10 16:49:55 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/mopra.py
r1273 r1838 14 14 q.convert_flux() # K -> Jy 15 15 msk = q.create_mask([-70,20], [20,70]) # line free region - two windows 16 rms = q.stats("rms",msk) 17 med = q.stats("median",msk) 18 19 print "Fitter test..." 20 # select IF1 21 selection = selector() 22 selection.set_ifs(1) 23 q.set_selection(selection) 16 rms = q.stats("rms", msk) 17 med = q.stats("median", msk) 24 18 25 19 rcParams['plotter.gui'] = 0 26 f = fitter() 27 f.set_scan(q) 28 f.set_function(gauss=2) # fit two gaussians 29 f.fit() 30 f.plot(filename='output/moprafit.png') 31 fp = f.get_parameters() 20 21 def plotfit(scan, ifno): 22 print "Fitter test for IF%d..." % ifno 23 # select IF 24 scan.set_selection(ifs=ifno) 25 f = fitter() 26 f.set_scan(scan) 27 f.set_function(gauss=ifno+1) # fit gaussian(s) 28 f.fit() 29 f.plot(filename='output/moprafit_if%d.png' % ifno) 30 fp = f.get_parameters() 31 32 for ifno in q.getifnos(): 33 plotfit(q, ifno) 34 32 35 print "Mopra Test successful"
Note:
See TracChangeset
for help on using the changeset viewer.