Ignore:
Timestamp:
04/27/06 14:08:06 (18 years ago)
Author:
mar637
Message:

Web doc update for usage of ASAP v2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/tutorials/tutorial.html

    r680 r1040  
    6767plotter.plot(s) # plot s
    6868</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".
     69Now we can build the quotient. This applies the quotient to both IFs.
    7070<div class=code><pre>
    71 q = quotient(s.get_scan("*_S"),s.get_scan("*_R"))
     71q = auto_quotient()
    7272plotter.plot(q) # plot q
    7373</pre></div>
     
    7777q.set_restfreqs(restfreqs,"GHz") # set the restfrequencies, as not in data
    7878q.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 
     79q.set_freqframe("LSRK")          # set frequency frame
     80plotter.plot()                   # replot, should show velocity now
    8181</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. 
     82Now we can subtract a baseline. ASAP can do this automatically if ther is good S/N and the lines aren't too broad.
    8383<div class=code><pre>
    8484q.auto_poly_baseline() # determine and subtract a poly baseline automatically
     
    115115<div class=code><pre>
    116116f = fitter()
     117</pre></div>
     118We start with the first spectrum (IF=0) bys setting the selection. We want to fit two gaussian components.
     119<div class=code><pre>
     120sel = selector()
     121sel.set_ifs(0)
     122q.set_selection(sel)
    117123f.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)
    122124f.set_function(gauss=2) # fit two gaussians
    123125f.fit()
     
    126128The 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.
    127129<div class=code><pre>
    128 q.set_cursor(IF=1)
     130sel.set_ifs(1)
     131q.set_selection(sel)
    129132f.set_function(gauss=7)
    130133f.fit()
Note: See TracChangeset for help on using the changeset viewer.