Changeset 1040 for trunk/web/tutorials/tutorial.html
- Timestamp:
- 04/27/06 14:08:06 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/tutorials/tutorial.html
r680 r1040 67 67 plotter.plot(s) # plot s 68 68 </pre></div> 69 Now we can build the quotient. This applies the quotient to both IFs. We are taking all scans ending in "_S" to be "on" source and all "_R" to be "off".69 Now we can build the quotient. This applies the quotient to both IFs. 70 70 <div class=code><pre> 71 q = quotient(s.get_scan("*_S"),s.get_scan("*_R"))71 q = auto_quotient() 72 72 plotter.plot(q) # plot q 73 73 </pre></div> … … 77 77 q.set_restfreqs(restfreqs,"GHz") # set the restfrequencies, as not in data 78 78 q.set_unit("km/s") # set the unit to be used from now on 79 q.set_freqframe("LSRK") # set frequency frame 80 plotter.plot() # replot, should show velocity now 79 q.set_freqframe("LSRK") # set frequency frame 80 plotter.plot() # replot, should show velocity now 81 81 </pre></div> 82 Now we can subtract a baseline. ASAP can do this automatically if ther is good S/N and the lines aren't too broad. 82 Now we can subtract a baseline. ASAP can do this automatically if ther is good S/N and the lines aren't too broad. 83 83 <div class=code><pre> 84 84 q.auto_poly_baseline() # determine and subtract a poly baseline automatically … … 115 115 <div class=code><pre> 116 116 f = fitter() 117 </pre></div> 118 We start with the first spectrum (IF=0) bys setting the selection. We want to fit two gaussian components. 119 <div class=code><pre> 120 sel = selector() 121 sel.set_ifs(0) 122 q.set_selection(sel) 117 123 f.set_scan(q) 118 </pre></div>119 We start with the first spectrum (IF=0) bys setting the cursor. We want to fits to gaussian components.120 <div class=code><pre>121 q.set_cursor(IF=0)122 124 f.set_function(gauss=2) # fit two gaussians 123 125 f.fit() … … 126 128 The second IFs spectrum is more complex. We select it and fit seven gaussians to it. Here we also plot residuals, the individual components and the fit parameters. 127 129 <div class=code><pre> 128 q.set_cursor(IF=1) 130 sel.set_ifs(1) 131 q.set_selection(sel) 129 132 f.set_function(gauss=7) 130 133 f.fit()
Note:
See TracChangeset
for help on using the changeset viewer.