Changeset 1243


Ignore:
Timestamp:
09/06/06 16:08:24 (18 years ago)
Author:
phi196
Message:

More 2.1 release updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/Release2.1.0b/doc/userguide.tex

    r1215 r1243  
    124124functions using the syntax:
    125125\begin{verbatim}
    126   ASAP> out = object.function(arguments)
     126  ASAP>out = object.function(arguments)
    127127\end{verbatim}
    128128
     
    136136
    137137\begin{verbatim}
    138   ASAP> av = scans.average_time(msk,weight='tsys')
    139   ASAP> av = scans.average_time(mask=msk,weight='tsys')
    140   ASAP> av = scans.average_time(msk,tsys)
    141   ASAP> scans.poly_baseline(mask=msk, order=0, insitu=True)
    142   ASAP> scans.poly_baseline(msk,0,True)
    143   ASAP> scans.poly_baseline(mask, insitu=True)
     138  ASAP>av = scans.average_time(msk,weight='tsys')
     139  ASAP>av = scans.average_time(mask=msk,weight='tsys')
     140  ASAP>av = scans.average_time(msk,tsys)
     141  ASAP>scans.poly_baseline(mask=msk, order=0, insitu=True)
     142  ASAP>scans.poly_baseline(msk,0,True)
     143  ASAP>scans.poly_baseline(mask, insitu=True)
    144144\end{verbatim}
    145145
     
    168168Example
    169169\begin{verbatim}
    170   ASAP> scans = scantable('MyData.rpf')
    171   ASAP> scans.se<TAB>
    172   ASAP> scans.set_in<TAB>
     170  ASAP>scans = scantable('MyData.rpf')
     171  ASAP>scans.se<TAB>
     172  ASAP>scans.set_in<TAB>
    173173scans.set_cursor      scans.set_freqframe   scans.set_selection
    174174scans.set_doppler     scans.set_instrument  scans.set_unit
    175175scans.set_fluxunit    scans.set_restfreqs
    176176
    177   ASAP> scans.set_instrument()
     177  ASAP>scans.set_instrument()
    178178\end{verbatim}
    179179
     
    204204
    205205\begin{verbatim}
    206   ASAP> pwd
    207   ASAP> ls
    208   ASAP> cd /my/data/directory
    209   ASAP> ! mozilla&
     206  ASAP>pwd
     207  ASAP>ls
     208  ASAP>cd /my/data/directory
     209  ASAP>! mozilla&
    210210\end{verbatim}
    211211
     
    216216
    217217\begin{verbatim}
    218   ASAP> commands()
     218  ASAP>commands()
    219219\end{verbatim}
    220220
     
    223223
    224224\begin{verbatim}
    225   ASAP> help scantable.get_scan # or help(scantable.get_scan)
    226   ASAP> help scantable.stats
    227   ASAP> help plotter.plot
    228   ASAP> help fitter.plot
    229 
    230   ASAP> scans = scantable('mydata.asap')
    231   ASAP> help scans.get_scan # Same as above
     225  ASAP>help scantable.get_scan # or help(scantable.get_scan)
     226  ASAP>help scantable.stats
     227  ASAP>help plotter.plot
     228  ASAP>help fitter.plot
     229
     230  ASAP>scans = scantable('mydata.asap')
     231  ASAP>help scans.get_scan # Same as above
    232232\end{verbatim}
    233233
     
    235235
    236236\begin{verbatim}
    237   ASAP> help average_time
     237  ASAP>help average_time
    238238\end{verbatim}
    239239
     
    285285normally contain 13 beams, 1 IF and 2 polarisations, Parkes
    286286methanol-multibeam data would contain 7 beams, 2 IFs and 2
    287 polarisations while the Mopra 8-GHz MOPDS filterbank will produce one
     287polarisations while the Mopra 8-GHz MOPS filterbank will produce one
    288288beam, many IFs, and 2-4 polarisations.
    289289
    290290All of the combinations of Beams/IFs an Polarisations are
    291 contained in seperate rows. These rows are grouped in cycles (same time stamp).
     291contained in separate rows. These rows are grouped in cycles (same time stamp).
    292292
    293293A collection of cycles for one source is termed a scan (and each scan
    294294has a unique numeric identifier, the SCANNO). A scantable is then a
    295295collection of one or more scans. If you have scan-averaged your data
    296 in time, i.e. you have averegaed all cycles within a scan, then each
     296in time, i.e. you have averaged all cycles within a scan, then each
    297297scan would hold just one (averaged) integration.
    298298
     
    302302changed via the {\tt .asaprc} resource file.
    303303
    304 For example a Mopra scan with a  4s intergration time, two IFs and
     304For example a Mopra scan with a  4s integration time, two IFs and
    305305dual polarisations has two (2s) cycles.
    306306\begin{verbatim}
     
    345345
    346346\begin{verbatim}
    347   ASAP> scans = scantable('MyData.rpf')
    348   ASAP> scans.summary()                # Brief listing
     347  ASAP>scans = scantable('MyData.rpf')
     348  ASAP>scans.summary()                # Brief listing
    349349
    350350  # Equivalent to brief summary function call
    351   ASAP> print scan
     351  ASAP>print scan
    352352\end{verbatim}
    353353
     
    356356of summary is redirected into your current pager specified by the
    357357\$PAGER environment variable. If you find the screen is reset to the
    358 original state when summary is finished (ie the output from summary
     358original state when summary is finished (i.e. the output from summary
    359359disappears), you may need to set the \$LESS environment variable to
    360360include the \cmd{-X} option.
     
    403403
    404404\begin{verbatim}
    405   ASAP> selection = selector()         # Create selection object
    406   ASAP> selection.set_ifs(0)           # Just select the first IF
    407   ASAP> scans.set_selection(selection) # Apply the selection
    408   ASAP> print scans                    # Will just show the first IF
    409 
    410   ASAP> selection.set_ifs([0,1])       # Select the first two IFs
    411   ASAP> selection.set_beams([1,3,5])   # Also select three of the beams
    412   ASAP> scans.set_selection(selection) # Apply the selection
    413 
    414   ASAP> selection.set_name('G308*')     # Select by source name
    415 
    416   ASAP> selection.reset()              # Turn off selection
    417   ASAP> scans.set_selection(selection) # Apply the reset selection
     405  ASAP>selection = selector()         # Create selection object
     406  ASAP>selection.set_ifs(0)           # Just select the first IF
     407  ASAP>scans.set_selection(selection) # Apply the selection
     408  ASAP>print scans                    # Will just show the first IF
     409
     410  ASAP>selection.set_ifs([0,1])       # Select the first two IFs
     411  ASAP>selection.set_beams([1,3,5])   # Also select three of the beams
     412  ASAP>scans.set_selection(selection) # Apply the selection
     413
     414  ASAP>selection.set_name('G308*')     # Select by source name
     415
     416  ASAP>selection.reset()              # Turn off selection
     417  ASAP>scans.set_selection(selection) # Apply the reset selection
    418418
    419419\end{verbatim}
     
    455455
    456456\begin{verbatim}
    457   ASAP> scans = scantable('2004-11-23_1841-P484.rpf') # Read in the data
    458   ASAP> scans.set_freqframe('LSRK')  # Use the LSR velocity frame
    459   ASAP> scans.set_unit('km/s')        # Use velocity for plots etc from now on
    460   ASAP> scans.set_doppler('OPTICAL')  # Use the optical velocity convention
    461   ASAP> scans.set_unit('MHz')         # Use frequency in MHz from now on
     457  ASAP>scans = scantable('2004-11-23_1841-P484.rpf') # Read in the data
     458  ASAP>scans.set_freqframe('LSRK')  # Use the LSR velocity frame
     459  ASAP>scans.set_unit('km/s')        # Use velocity for plots etc from now on
     460  ASAP>scans.set_doppler('OPTICAL')  # Use the optical velocity convention
     461  ASAP>scans.set_unit('MHz')         # Use frequency in MHz from now on
    462462\end{verbatim}
    463463
     
    479479\begin{verbatim}
    480480  # Set all IFs
    481   ASAP> scans.set_restfreqs(freqs=1.667359e9)
     481  ASAP>scans.set_restfreqs(freqs=1.667359e9)
    482482\end{verbatim}
    483483
     
    489489\begin{verbatim}
    490490  # Set rest frequency for all IFs
    491   ASAP> scans.set_restfreqs(freqs=[1.6654018e9,1.667359e9,])
     491  ASAP>scans.set_restfreqs(freqs=[1.6654018e9,1.667359e9,])
    492492
    493493\end{verbatim}
     
    501501
    502502\begin{verbatim}
    503   ASAP> scans.set_restfreqs(freqs=['OH1665','OH1667'])
     503  ASAP>scans.set_restfreqs(freqs=['OH1665','OH1667'])
    504504\end{verbatim}
    505505}
     
    532532
    533533  # Select channel range for baselining
    534   ASAP> scans.set_unit('channels')
    535   ASAP> msk = scans.create_mask([100,400],[600,800])
     534  ASAP>scans.set_unit('channels')
     535  ASAP>msk = scans.create_mask([100,400],[600,800])
    536536
    537537  # Select velocity range for fitting
    538   ASAP> scans.set_unit('km/s')
    539   ASAP> msk = scans.create_mask([-30,-10])
     538  ASAP>scans.set_unit('km/s')
     539  ASAP>msk = scans.create_mask([-30,-10])
    540540\end{verbatim}
    541541
     
    546546Example :
    547547\begin{verbatim}
    548   ASAP> scans.set_unit('channels')
    549   ASAP> msk = scans.create_mask([0,100],[900-1023], invert=True)
     548  ASAP>scans.set_unit('channels')
     549  ASAP>msk = scans.create_mask([0,100],[900-1023], invert=True)
    550550\end{verbatim}
    551551
     
    556556
    557557\begin{verbatim}
    558   ASAP> scans.set_unit('km/s')
    559   ASAP> msk = q.create_mask([-30,-10], row=5)
     558  ASAP>scans.set_unit('km/s')
     559  ASAP>msk = q.create_mask([-30,-10], row=5)
    560560\end{verbatim}
    561561
     
    566566
    567567\begin{verbatim}
    568   ASAP> scans.set_unit('channels')
    569   ASAP> msk1 = q.create_mask([0,100],[511,511],[900,1023],invert=True)
    570   ASAP> scans.set_unit('km/s')
    571   ASAP> msk2 = q.create_mask([-20,-10],invert=True)
    572 
    573   ASAP> mask = msk1 and msk2
     568  ASAP>scans.set_unit('channels')
     569  ASAP>msk1 = q.create_mask([0,100],[511,511],[900,1023],invert=True)
     570  ASAP>scans.set_unit('km/s')
     571  ASAP>msk2 = q.create_mask([-20,-10],invert=True)
     572
     573  ASAP>mask = msk1 and msk2
    574574\end{verbatim}
    575575
     
    585585
    586586\begin{verbatim}
    587   ASAP> list_scans()
     587  ASAP>list_scans()
    588588  The user created scantables are:
    589589  ['s', 'scans', 'av', 's2', 'ss']
    590590
    591   ASAP> del s2
    592   ASAP> del ss
     591  ASAP>del s2
     592  ASAP>del ss
    593593\end{verbatim}
    594594
     
    611611
    612612\begin{verbatim}
    613   ASAP> scan = scantable('2004-11-23_1841-P484.rpf')
     613  ASAP>scan = scantable('2004-11-23_1841-P484.rpf')
    614614
    615615  # Don't scan average the data
    616   ASAP> scan = scantable('2004-11-23_1841-P484.rpf', average=False)
     616  ASAP>scan = scantable('2004-11-23_1841-P484.rpf', average=False)
    617617\end{verbatim}
    618618
     
    634634
    635635\begin{verbatim}
    636   ASAP> r = reader('2003-03-16_082048_t0002.rpf')
    637   ASAP> r.summary()
    638   ASAP> scan = r.read()
    639   ASAP> del r
     636  ASAP>r = reader('2003-03-16_082048_t0002.rpf')
     637  ASAP>r.summary()
     638  ASAP>scan = r.read()
     639  ASAP>del r
    640640\end{verbatim}
    641641
     
    655655
    656656\begin{verbatim}
    657   ASAP> q = s.auto_quotient()
     657  ASAP>q = s.auto_quotient()
    658658\end{verbatim}
    659659
     
    663663
    664664\begin{verbatim}
    665  ASAP> q = s.auto_quotient(preserve=True)
     665 ASAP>q = s.auto_quotient(preserve=True)
    666666\end{verbatim}
    667667
     
    678678For Mopra and Parkes data:
    679679\begin{verbatim}
    680   ASAP> r = scans.get_scan('*_R')
    681   ASAP> s = scans.get_scan('*_S')
     680  ASAP>r = scans.get_scan('*_R')
     681  ASAP>s = scans.get_scan('*_S')
    682682\end{verbatim}
    683683
    684684For Tidbinbilla data
    685685\begin{verbatim}
    686   ASAP> r = scans.get_scan('*_[ew]')
    687   ASAP> s = scans.get_scan('*_[^ew]')
     686  ASAP>r = scans.get_scan('*_[ew]')
     687  ASAP>s = scans.get_scan('*_[^ew]')
    688688\end{verbatim}
    689689
     
    693693
    694694\begin{verbatim}
    695   ASAP> q = s.quotient(r)
     695  ASAP>q = s.quotient(r)
    696696\end{verbatim}
    697697
     
    708708
    709709\begin{verbatim}
    710  ASAP> av = q.average_time()
     710 ASAP>av = q.average_time()
    711711\end{verbatim}
    712712
     
    715715
    716716\begin{verbatim}
    717  ASAP> av = average_time(q1, q2, q3)
     717 ASAP>av = average_time(q1, q2, q3)
    718718\end{verbatim}
    719719
     
    723723
    724724\begin{verbatim}
    725  ASAP> av = average_time(q, weight='tintsys')
     725 ASAP>av = average_time(q, weight='tintsys')
    726726\end{verbatim}
    727727
     
    730730
    731731\begin{verbatim}
    732  ASAP> msk = scans.create_mask([200,400],[600,800])
    733  ASAP> av = average_time(scans, mask=msk, weight='var')
     732 ASAP>msk = scans.create_mask([200,400],[600,800])
     733 ASAP>av = average_time(scans, mask=msk, weight='var')
    734734\end{verbatim}
    735735
    736736If you have not observed your data with Doppler tracking (or run
    737 \cmd{freq\_align} explicitally) you should align the data in frequency
     737\cmd{freq\_align} explicitly) you should align the data in frequency
    738738before averaging.
    739739
    740740\begin{verbatim}
    741  ASAP> av = scans.average_time(align=True)
     741 ASAP>av = scans.average_time(align=True)
    742742\end{verbatim}
    743743
     
    752752
    753753\begin{verbatim}
    754  ASAP> msk = scans.create_mask([100,400],[600,900])
    755  ASAP> scans.poly_baseline(msk, order=1)
     754 ASAP>msk = scans.create_mask([100,400],[600,900])
     755 ASAP>scans.poly_baseline(msk, order=1)
    756756\end{verbatim}
    757757
     
    771771
    772772\begin{verbatim}
    773   ASAP> scans.auto_poly_baseline(order=2,threshold=5)
     773  ASAP>scans.auto_poly_baseline(order=2,threshold=5)
    774774\end{verbatim}
    775775
     
    786786\begin{verbatim}
    787787  # Don't try and fit the edge of the bandpass which is noisier
    788   ASAP> scans.auto_poly_baseline(edge=(500,450),order=3,threshold=3)
     788  ASAP>scans.auto_poly_baseline(edge=(500,450),order=3,threshold=3)
    789789
    790790  # Only fit a given region around the line
    791   ASAP> scans.set_unit('km/s')
    792   ASAP> msk = scans.create_mask([-60,-20])
    793   ASAP> scans.auto_poly_baseline(mask=msk,order=3,threshold=3)
     791  ASAP>scans.set_unit('km/s')
     792  ASAP>msk = scans.create_mask([-60,-20])
     793  ASAP>scans.auto_poly_baseline(mask=msk,order=3,threshold=3)
    794794
    795795\end{verbatim}
     
    801801
    802802\begin{verbatim}
    803  ASAP> scans.average_pol()
     803 ASAP>scans.average_pol()
    804804\end{verbatim}
    805805
     
    823823
    824824\begin{verbatim}
    825   ASAP> scans = scantable('2004-11-23_1841-P484.rpf', unit='Jy')
     825  ASAP>scans = scantable('2004-11-23_1841-P484.rpf', unit='Jy')
    826826  # Or in two steps
    827   ASAP> scans = scantable('2004-11-23_1841-P484.rpf')
    828   ASAP> scans.set_fluxunit('Jy')
     827  ASAP>scans = scantable('2004-11-23_1841-P484.rpf')
     828  ASAP>scans.set_fluxunit('Jy')
    829829\end{verbatim}
    830830
     
    840840
    841841\begin{verbatim}
    842   ASAP> scans = scantable('2004-11-23_1841-P484.rpf')
    843   ASAP> scans.set_feedtype('circular')
     842  ASAP>scans = scantable('2004-11-23_1841-P484.rpf')
     843  ASAP>scans.set_feedtype('circular')
    844844\end{verbatim}
    845845
     
    852852
    853853\begin{verbatim}
    854   ASAP> scans.scale(1.05, tsys=True)
     854  ASAP>scans.scale(1.05, tsys=True)
    855855\end{verbatim}
    856856
     
    866866
    867867\begin{verbatim}
    868   ASAP> scans.convert_flux()               # If efficency known
    869   ASAP> scans.convert_flux(eta=0.48)       # If telescope diameter known
    870   ASAP> scans.convert_flux(eta=0.48,d=35)  # Unknown telescope
    871   ASAP> scans.convert_flux(jypk=15)        # Alternative
     868  ASAP>scans.convert_flux()               # If efficency known
     869  ASAP>scans.convert_flux(eta=0.48)       # If telescope diameter known
     870  ASAP>scans.convert_flux(eta=0.48,d=35)  # Unknown telescope
     871  ASAP>scans.convert_flux(jypk=15)        # Alternative
    872872\end{verbatim}
    873873
     
    884884
    885885\begin{verbatim}
    886   ASAP> scans.recalc_azel()                # recalculate az/el based on pointing
     886  ASAP>scans.recalc_azel()                # recalculate az/el based on pointing
    887887\end{verbatim}
    888888
     
    897897
    898898\begin{verbatim}
    899   ASAP> scans.gain_el()   # If gain table known
    900   ASAP> scans.gain_el(poly=[3.58788e-1,2.87243e-2,-3.219093e-4])
     899  ASAP>scans.gain_el()   # If gain table known
     900  ASAP>scans.gain_el(poly=[3.58788e-1,2.87243e-2,-3.219093e-4])
    901901\end{verbatim}
    902902
     
    906906
    907907\begin{verbatim}
    908   ASAP> scans.opacity(0.083)
     908  ASAP>scans.opacity(0.083)
    909909\end{verbatim}
    910910
     
    916916\label{sec:freqalign}
    917917
    918 \index{Frequency alignment}\index{Velicity alignment}When time
     918\index{Frequency alignment}\index{Velocity alignment}When time
    919919averaging a series of scans together, it is possible that the velocity
    920920scales are not exactly aligned.  This may be for many reasons such as
     
    927927
    928928\begin{verbatim}
    929   ASAP> scans.freq_align()
    930   ASAP> av = average_time(scans)
     929  ASAP>scans.freq_align()
     930  ASAP>av = average_time(scans)
    931931\end{verbatim}
    932932
     
    940940
    941941\begin{verbatim}
    942   ASAP> scans1.freq_align() # Copy the refeference Epoch from the output
    943   ASAP> scans2.freq_align(reftime='2004/11/23/18:43:35')
    944   ASAP> scans3.freq_align(reftime='2004/11/23/18:43:35')
    945   ASAP> av = average_time(scans1, scans2, scans3)
     942  ASAP>scans1.freq_align() # Copy the refeference Epoch from the output
     943  ASAP>scans2.freq_align(reftime='2004/11/23/18:43:35')
     944  ASAP>scans3.freq_align(reftime='2004/11/23/18:43:35')
     945  ASAP>av = average_time(scans1, scans2, scans3)
    946946\end{verbatim}
    947947
     
    960960
    961961\begin{verbatim}
    962   ASAP> ss = scans.get_scan(10) # Get the 11th scan (zero based)
    963   ASAP> ss = scans.get_scan(range(10)) # Get the first 10 scans
    964   ASAP> ss = scans.get_scan(range(10,20)) # Get the next 10 scans
    965   ASAP> ss = scans.get_scan([2,4,6,8,10]) # Get a selection of scans
    966 
    967   ASAP> ss = scans.get_scan('345p407') # Get a specific source
    968   ASAP> ss = scans.get_scan('345*')    # Get a few sources
    969 
    970   ASAP> r = scans.get_scan('*_R') # Get all reference sources (Parkes/Mopra)
    971   ASAP> s = scans.get_scan('*_S') # Get all program sources (Parkes/Mopra)
    972   ASAP> r = scans.get_scan('*[ew]')  # Get all reference sources (Tid)
    973   ASAP> s = scans.get_scan('*[^ew]') # Get all program sources (Tid)
     962  ASAP>ss = scans.get_scan(10) # Get the 11th scan (zero based)
     963  ASAP>ss = scans.get_scan(range(10)) # Get the first 10 scans
     964  ASAP>ss = scans.get_scan(range(10,20)) # Get the next 10 scans
     965  ASAP>ss = scans.get_scan([2,4,6,8,10]) # Get a selection of scans
     966
     967  ASAP>ss = scans.get_scan('345p407') # Get a specific source
     968  ASAP>ss = scans.get_scan('345*')    # Get a few sources
     969
     970  ASAP>r = scans.get_scan('*_R') # Get all reference sources (Parkes/Mopra)
     971  ASAP>s = scans.get_scan('*_S') # Get all program sources (Parkes/Mopra)
     972  ASAP>r = scans.get_scan('*[ew]')  # Get all reference sources (Tid)
     973  ASAP>s = scans.get_scan('*[^ew]') # Get all program sources (Tid)
    974974
    975975\end{verbatim}
     
    978978
    979979\begin{verbatim}
    980   ASAP> ss = scans
     980  ASAP>ss = scans
    981981\end{verbatim}
    982982
     
    986986
    987987\begin{verbatim}
    988   ASAP> ss = scans.copy()
     988  ASAP>ss = scans.copy()
    989989\end{verbatim}
    990990
     
    10241024
    10251025\begin{verbatim}
    1026   ASAP> scans.save('myscans') # Save in default format
    1027   ASAP> scans.save('myscans', 'FITS') # Save as FITS for exporting into CLASS
    1028   ASAP> scans.save('myscans', overwrite=True) # Overwrite an existing file
     1026  ASAP>scans.save('myscans') # Save in default format
     1027  ASAP>scans.save('myscans', 'FITS') # Save as FITS for exporting into CLASS
     1028  ASAP>scans.save('myscans', overwrite=True) # Overwrite an existing file
    10291029\end{verbatim}
    10301030
    10311031\section{Plotter}
    10321032
    1033 \index{Plotter}Scantable spectra can be plotted at any time. An asapplotter object is
    1034 used for plotting, meaning multiple plot windows can be active at the
    1035 same time. On start up a default asapplotter object is created called
    1036 ``plotter''. This would normally be used for standard plotting.
    1037 
    1038 The plotter, optionally, will run in a multipanel mode and contain
     1033\index{Plotter}Scantable spectra can be plotted at any time. An
     1034asapplotter object is used for plotting, meaning multiple plot windows
     1035can be active at the same time. On start up a default asapplotter
     1036object is created called ``plotter''. This would normally be used for
     1037standard plotting.
     1038
     1039The plotter, optionally, will run in a multi-panel mode and contain
    10391040multiple plots per panel. The user must tell the plotter how they want
    10401041the data distributed. This is done using the set\_mode function. The
     
    10461047
    10471048\begin{verbatim}
    1048   ASAP> scans.set_unit('km/s')
    1049   ASAP> plotter.set_mode(stacking='p',panelling='t')
    1050   ASAP> plotter.plot(scans)
     1049  ASAP>scans.set_unit('km/s')
     1050  ASAP>plotter.set_mode(stacking='p',panelling='t')
     1051  ASAP>plotter.plot(scans)
    10511052\end{verbatim}
    10521053
     
    10581059\begin{verbatim}
    10591060  # Plot multiple IFs per panel
    1060   ASAP> plotter.set_mode(stacking='i',panelling='t')
     1061  ASAP>plotter.set_mode(stacking='i',panelling='t')
    10611062
    10621063  # Plot multiple beams per panel
    1063   ASAP> plotter.set_mode(stacking='b',panelling='t')
     1064  ASAP>plotter.set_mode(stacking='b',panelling='t')
    10641065
    10651066  # Plot one IF per panel, time stacked
    1066   ASAP> plotter.set_mode('t', 'i')
     1067  ASAP>plotter.set_mode('t', 'i')
    10671068
    10681069  # Plot each scan in a seperate panel
    1069   ASAP> plotter.set_mode('t', 's')
     1070  ASAP>plotter.set_mode('t', 's')
    10701071
    10711072\end{verbatim}
     
    10801081should be used for this purpose. Selection can either be applied to
    10811082the scantable or directly to the plotter, the end result is the same.
    1082 You don't have to reset the scantable slection though, if you set
     1083You don't have to reset the scantable selection though, if you set
    10831084the selection on the plotter.
    10841085
     
    10861087
    10871088\begin{verbatim}
    1088   ASAP> selection = selector()
     1089  ASAP>selection = selector()
    10891090  # Select second IF
    1090   ASAP> selection.set_ifs(1)
    1091   ASAP> plotter.set_selection(selection)
     1091  ASAP>selection.set_ifs(1)
     1092  ASAP>plotter.set_selection(selection)
    10921093
    10931094  # Select first 4 beams
    1094   ASAP> selection.set_beams([0,1,2,3])
    1095   ASAP> plotter.set_selection(selection)
     1095  ASAP>selection.set_beams([0,1,2,3])
     1096  ASAP>plotter.set_selection(selection)
    10961097
    10971098  # Select a few scans
    1098   ASAP> selection.set_scans([2,4,6,10])
    1099   ASAP> plotter.set_selection(selection)
     1099  ASAP>selection.set_scans([2,4,6,10])
     1100  ASAP>plotter.set_selection(selection)
    11001101
    11011102  # Multiple selection
    1102   ASAP> selection.set_ifs(1)
    1103   ASAP> selection.set_scans([2,4,6,10])
    1104   ASAP> plotter.set_selection(selection)
     1103  ASAP>selection.set_ifs(1)
     1104  ASAP>selection.set_scans([2,4,6,10])
     1105  ASAP>plotter.set_selection(selection)
    11051106
    11061107\end{verbatim}
     
    11301131  region. Use the plot history to unzoom again.
    11311132
    1132 \item[Adjust] (rectangle with 4 arrows) adjust subplot paramaters
     1133\item[Adjust] (rectangle with 4 arrows) adjust subplot parameters
    11331134  (space at edge of plots)
    11341135
     
    11501151
    11511152\begin{verbatim}
    1152   ASAP> scans.set_unit('km/s')
    1153   ASAP> plotter.plot(scans)
    1154   ASAP> plotter.set_range(-150,-50)
    1155   ASAP> plotter.set_range() # To reset
     1153  ASAP>scans.set_unit('km/s')
     1154  ASAP>plotter.plot(scans)
     1155  ASAP>plotter.set_range(-150,-50)
     1156  ASAP>plotter.set_range() # To reset
    11561157\end{verbatim}
    11571158
     
    11591160
    11601161\begin{verbatim}
    1161   ASAP> plotter.set_range(-10,30,-1,6.6)
     1162  ASAP>plotter.set_range(-10,30,-1,6.6)
    11621163\end{verbatim}
    11631164
     
    11651166
    11661167\begin{verbatim}
    1167   ASAP> plotter.save('myplot.ps')
    1168   ASAP> plotter.save('myplot.png', dpi=80)
     1168  ASAP>plotter.save('myplot.ps')
     1169  ASAP>plotter.save('myplot.png', dpi=80)
    11691170\end{verbatim}
    11701171
     
    11721173
    11731174The plotter allows the user to change most properties such as text
    1174 size and colour. The \cmd{commands} funcation and {\cmd help\
     1175size and colour. The \cmd{commands} function and {\cmd help\
    11751176asapplotter} list all the possible commands that can be used with the
    11761177plotter.
     
    11871188plots. Allowable values are 'line', 'dashed', 'dotted', 'dashdot',
    11881189'dashdotdot' and 'dashdashdot. Example: }{
    1189   ASAP> plotter.set\_linestyles('line dash cotted datshot.)\\
    1190   ASAP> plotter.set\_font(size=10)\\
     1190  ASAP>plotter.set\_linestyles('line dash cotted datshot.)\\
     1191  ASAP>plotter.set\_font(size=10)\\
    11911192}
    11921193
    11931194\commanddef{set\_font}{Change the font style and size. Example}{
    1194   ASAP> plotter.set\_font(weight='bold')\\
    1195   ASAP> plotter.set\_font(size=10)\\
    1196   ASAP> plotter.set\_font(style='italic')\\
     1195  ASAP>plotter.set\_font(weight='bold')\\
     1196  ASAP>plotter.set\_font(size=10)\\
     1197  ASAP>plotter.set\_font(style='italic')\\
    11971198}
    11981199
    1199 \commanddef{set\_layout}{Change the multi-panel layout, ie now many
     1200\commanddef{set\_layout}{Change the multi-panel layout, i.e. now many
    12001201  rows and columns}{
    1201   ASAP> plotter.set\_layout(3,2)
     1202  ASAP>plotter.set\_layout(3,2)
    12021203}
    12031204
    12041205\commanddef{set\_legend}{Set the position, size and optional value of the legend}{
    1205   ASAP> plotter.set\_legend(fontsize=16)\\
    1206   ASAP> plotter.set\_legend(mode=0)  \# ASAP chooses where to put the legend\\
    1207   ASAP> plotter.set\_legend(mode=4)  \# Put legend on lower right\\
    1208   ASAP> plotter.set\_legend(mode=-1) \# No legend\\
    1209   ASAP> plotter.set\_legend(mp=['RR','LL']) \# Specify legend labels\\
    1210   ASAP> plotter.set\_legend(mp=[r'\$\^\{12\}CO\$',r'\$\^\{13\}CO\$']) \# Latex labels
     1206  ASAP>plotter.set\_legend(fontsize=16)\\
     1207  ASAP>plotter.set\_legend(mode=0)  \# ASAP chooses where to put the legend\\
     1208  ASAP>plotter.set\_legend(mode=4)  \# Put legend on lower right\\
     1209  ASAP>plotter.set\_legend(mode=-1) \# No legend\\
     1210  ASAP>plotter.set\_legend(mp=['RR','LL']) \# Specify legend labels\\
     1211  ASAP>plotter.set\_legend(mp=[r'\$\^\{12\}CO\$',r'\$\^\{13\}CO\$']) \# Latex labels
    12111212}
    12121213
    12131214\commanddef{set\_title}{Set the plot title. If multiple panels are
    12141215  plotted, multiple titles have to be specified}{
    1215   ASAP> plotter.set\_title(`G323.12$-$1.79`)\\
    1216   ASAP> plotter.set\_title([`SiO`, 'Methanol'], fontsize=18)\\
     1216  ASAP>plotter.set\_title(`G323.12$-$1.79`)\\
     1217  ASAP>plotter.set\_title([`SiO`, 'Methanol'], fontsize=18)\\
    12171218}
    12181219
    12191220\subsection{Plotter Annotations}
    12201221
    1221 The plotter allows various annontations (lines, arrows, text and
     1222The plotter allows various annotations (lines, arrows, text and
    12221223``spans'') to be added to the plot. These annotations are
    12231224``temporary'', when the plotter is next refreshed
     
    12251226will be removed.
    12261227
    1227 \bigcommanddef{arrow(x,y,x+dx,y+dy)}{Draw an arrow from a specifed
     1228\bigcommanddef{arrow(x,y,x+dx,y+dy)}{Draw an arrow from a specified
    12281229\cmd{(x,y)} position to \cmd{(x+dx, y+dy)}. The values are in world
    12291230coordinates. \em {HOW TO SET ARROW HEAD??}}{
    1230   ASAP> plotter.arrow(-40,7,35,0)
     1231  ASAP>plotter.arrow(-40,7,35,0)
    12311232}
    12321233
    12331234\bigcommanddef{axhline(y, xmin, xmax)}{Draw a horizontal line at the
    1234 specifed \cmd{y} position (in world coordinates) between xmin and xmax
    1235 (in relative coordinates, ie 0.0 is the left hand edge of the plot
     1235specified \cmd{y} position (in world coordinates) between xmin and xmax
     1236(in relative coordinates, i.e. 0.0 is the left hand edge of the plot
    12361237while 1.0 is the right side of the plot.}{
    1237  ASAP> plotter.axhline(6.0,0.2,0.8)
     1238 ASAP>plotter.axhline(6.0,0.2,0.8)
    12381239}
    12391240
    12401241\bigcommanddef{avhline(x, ymin, ymax)}{Draw a vertical line at the
    1241 specifed \cmd{x} position (in world coordinates) between \cmd{ymin}
    1242 and \cmd{ymax} (in relative coordinates, ie 0.0 is the left hand edge
     1242specified \cmd{x} position (in world coordinates) between \cmd{ymin}
     1243and \cmd{ymax} (in relative coordinates, i.e. 0.0 is the left hand edge
    12431244of the plot while 1.0 is the right side of the plot).}{
    1244  ASAP> plotter.axvline(-50.0,0.1,1.0)
     1245 ASAP>plotter.axvline(-50.0,0.1,1.0)
    12451246}
    12461247
    12471248\bigcommanddef{axhspan(ymin, ymax, \\ \hspace*{20mm}xmin,
    12481249 xmax)}{Overlay a transparent colour rectangle. \cmd{ymin} and
    1249  \cmd{ymax} are given in world coordnates while \cmd{xmin} and
     1250 \cmd{ymax} are given in world coordinates while \cmd{xmin} and
    12501251 \cmd{xmax} are given in relative coordinates}{
    1251 ASAP> plotter.axhspan(2,4,0.25,0.75)
     1252ASAP>plotter.axhspan(2,4,0.25,0.75)
    12521253}
    12531254
    12541255\bigcommanddef{axvspan(xmin, xmax, \\ \hspace*{20mm} ymin,
    12551256 ymax)}{Overlay a transparent colour rectangle. \cmd{ymin} and
    1256  \cmd{ymax} are given in relative coordnates while \cmd{xmin} and
     1257 \cmd{ymax} are given in relative coordinates while \cmd{xmin} and
    12571258 \cmd{xmax} are given in world coordinates}{
    1258 ASAP> plotter.axvspan(-50,60,0.2,0.5)
     1259ASAP>plotter.axvspan(-50,60,0.2,0.5)
    12591260}
    12601261
     
    12811282Examples:
    12821283\begin{verbatim}
    1283   ASAP> plotter.axhline(6.0,0.2,0.8, color='red', linewidth=3)
    1284   ASAP> plotter.text(-10,7,"CO", fontsize=20)
    1285 \end{verbatim}
     1284  ASAP>plotter.axhline(6.0,0.2,0.8, color='red', linewidth=3)
     1285  ASAP>plotter.text(-10,7,"CO", fontsize=20)
     1286\end{verbatim}
     1287
     1288\section{Line Catalog}
     1289
     1290\index{Linecatalog}ASAP can load and manipulate line catlogs to retrieve rest frequencies
     1291for \cmd{set\_restfreqs} and for line identification in the
     1292plotter. No line catalogs are built into ASAP, the user must load a
     1293ASCII based table (which can optionally be saved in an internal
     1294format) either of the users own creation or a standard line catalog
     1295such as the JPL line catalog or Lovas. The ATNF asap ftp area as
     1296copies of the JPL and Lovas catalog in the appropriate format. All
     1297line catalogs are loaded into a ``linecatalog'' object.
     1298
     1299\subsection{Loading a Line Catalog}
     1300
     1301\index{Linecatalog|loading}The ASCII text line catalog must have at
     1302least 4 columns. The first four columns must contain (in order):
     1303Molecule name, frequency in MHz, frequency error and ``intensity''
     1304(any units). If the molecule name contains any spaces, they must be
     1305wrapped in quotes \verb+""+.
     1306
     1307A sample from the JPL line catalog:
     1308
     1309\begin{verbatim}
     1310     H2D+    3955.2551 228.8818  -7.1941 
     1311     H2D+   12104.7712 177.1558  -6.0769 
     1312     H2D+   45809.2731 118.3223  -3.9494 
     1313     CH       701.6811    .0441  -7.1641 
     1314     CH       724.7709    .0456  -7.3912 
     1315     CH      3263.7940    .1000  -6.3501 
     1316     CH      3335.4810    .1000  -6.0304 
     1317\end{verbatim}
     1318
     1319To load a line catalog then save it in the internal format:
     1320
     1321\begin{verbatim}
     1322  ASAP>jpl = linecatalog('jpl_pruned.txt')
     1323  ASAP>jpl.save('jpl.tbl')
     1324\end{verbatim}
     1325
     1326Later the saved line catalog can reloaded:
     1327
     1328\begin{verbatim}
     1329  ASAP>jpl = linecatalog('jpl.tbl')
     1330\end{verbatim}
     1331
     1332\subsection{Line selection}
     1333
     1334\index{Linecatalog|line selection}The linecatalog has a number of
     1335selection functions to select a range of lines from a larger catalog
     1336(the JPL catalog has $>$180000 lines for
     1337example). \cmd{set\_frequency\_limits} selects on frequency range,
     1338\cmd{set\_strength\_limits} selects on intensity while \cmd{set\_name}
     1339selects on molecule name (wild cards allowed).
     1340
     1341\begin{verbatim}
     1342  ASAP>jpl = linecatalog('jpl.tbl')
     1343  ASAP>jpl.set_frequency_limits(80,115,'GHz') # Lines for 3mm receiver
     1344  ASAP>jpl.set_name('*OH')                    # Select all alcohols
     1345  ASAP>jpl.set_name('OH')                     # Select only OH molecules
     1346  ASAP>jpl.summary()
     1347
     1348  ASAP>jpl.reset()                            # Selections are accumulative
     1349  ASAP>jpl.set_frequency_limits(80,115,'GHz')
     1350  ASAP>jpl.set_strength_limits(-2,10)         # Select brightest lines
     1351  ASAP>jpl.summary()
     1352\end{verbatim}
     1353
     1354\subsection{Using Linecatalog}
     1355
     1356The line catalogs can be used for line overlays on the plotter or with
     1357\cmd{set\_restfreq}.
     1358
     1359\subsubsection{Plotting linecatalog}
     1360
     1361\index{Linecatalog|plotting}
     1362
     1363The plotter \cmd{plot\_lines} function takes a line catalog as an
     1364argument and overlays the lines on the spectrum. {\em Currently this
     1365only works when plotting in units of frequency (Hz, GHz etc).} If a
     1366large line catalog has been loaded (e.g. JPL) it is highly recommended
     1367that you use the selection functions to narrow down the number of
     1368lines.  By default the line catalog overlay is plotted assuming a line
     1369velocity of 0.0. This can be set using the \cmd{doppler} argument (in
     1370km/s). Each time \cmd{plot\_lines} is called the new lines are added
     1371to any existing line catalog annotations. These are all removed after
     1372the next call to \cmd{plotter.plot()}.
     1373
     1374\begin{verbatim}
     1375  ASAP>jpl = linecatalog('jpl.tbl')
     1376  ASAP>jpl.set_frequency_limits(23,24,'GHz')
     1377  ASAP>data.set_unit('GHz')            # Only works with freq axis currently
     1378  ASAP>plotter.plot(data)
     1379  ASAP>plotter.plot_lines(jpl)
     1380
     1381  ASAP>plotter.plot()                  # Reset plotter
     1382  ASAP>plotter.plot_lines(jpl,doppler=-10,location='Top') # On top with -10 km/s velocity
     1383\end{verbatim}
     1384
     1385\subsubsection{Setting Rest Frequencies}
     1386
     1387\index{Linecatalog|set_restfreq}
    12861388
    12871389\section{Fitting}
     
    12961398
    12971399\begin{verbatim}
    1298  ASAP> f = fitter()
    1299  ASAP> f.set_function(gauss=2) # Fit two Gaussians
    1300  ASAP> f.set_scan(scans)
    1301  ASAP> selection = selector()
    1302  ASAP> selection.set_polarisations(1) # Fit the second polarisation
    1303  ASAP> scans.set_selection(selection)
    1304  ASAP> scans.set_unit('km/s')  # Make fit in velocity units
    1305  ASAP> f.fit(1)                # Run the fit on the second row in the table
    1306  ASAP> f.plot()                # Show fit in a plot window
    1307  ASAP> f.get_parameters()      # Return the fit paramaters
     1400 ASAP>f = fitter()
     1401 ASAP>f.set_function(gauss=2) # Fit two Gaussians
     1402 ASAP>f.set_scan(scans)
     1403 ASAP>selection = selector()
     1404 ASAP>selection.set_polarisations(1) # Fit the second polarisation
     1405 ASAP>scans.set_selection(selection)
     1406 ASAP>scans.set_unit('km/s')  # Make fit in velocity units
     1407 ASAP>f.fit(1)                # Run the fit on the second row in the table
     1408 ASAP>f.plot()                # Show fit in a plot window
     1409 ASAP>f.get_parameters()      # Return the fit paramaters
    13081410\end{verbatim}
    13091411
     
    13161418
    13171419\begin{verbatim}
    1318   ASAP> f = fitter()
    1319   ASAP> f.set_function(gauss=2)
    1320   ASAP> scans.set_unit('km/s')  # Set the mask in channel units
    1321   ASAP> msk = s.create_mask([1800,2200])
    1322   ASAP> scans.set_unit('km/s')  # Make fit in velocity units
    1323   ASAP> f.set_scan(s,msk)
    1324   ASAP> f.fit()
    1325   ASAP> f.plot()
    1326   ASAP> f.get_parameters()
     1420  ASAP>f = fitter()
     1421  ASAP>f.set_function(gauss=2)
     1422  ASAP>scans.set_unit('km/s')  # Set the mask in channel units
     1423  ASAP>msk = s.create_mask([1800,2200])
     1424  ASAP>scans.set_unit('km/s')  # Make fit in velocity units
     1425  ASAP>f.set_scan(s,msk)
     1426  ASAP>f.fit()
     1427  ASAP>f.plot()
     1428  ASAP>f.get_parameters()
    13271429\end{verbatim}
    13281430
     
    13311433
    13321434\begin{verbatim}
    1333   ASAP> f = fitter()
    1334   ASAP> f.set_function(gauss=2)
    1335   ASAP> f.set_scan(s,msk)
    1336   ASAP> f.fit() # Fit using auto-estimates
     1435  ASAP>f = fitter()
     1436  ASAP>f.set_function(gauss=2)
     1437  ASAP>f.set_scan(s,msk)
     1438  ASAP>f.fit() # Fit using auto-estimates
    13371439  # Set Peak, centre and fwhm for the second gaussian.
    13381440  # Force the centre to be fixed
    1339   ASAP> f.set_gauss_parameters(0.4,450,150,0,1,0,component=1)
    1340   ASAP> f.fit() # Re-run the fit
     1441  ASAP>f.set_gauss_parameters(0.4,450,150,0,1,0,component=1)
     1442  ASAP>f.fit() # Re-run the fit
    13411443\end{verbatim}
    13421444
     
    13491451\begin{verbatim}
    13501452  # Plot the residual
    1351   ASAP> f.plot(residual=True)
     1453  ASAP>f.plot(residual=True)
    13521454
    13531455  # Plot the first 2 componentsa
    1354   ASAP> f.plot(components=[0,1])
     1456  ASAP>f.plot(components=[0,1])
    13551457
    13561458  # Plot the first and third component plus the model sum
    1357   ASAP> f.plot(components=[-1,0,2])  # -1 means the compoment sum
     1459  ASAP>f.plot(components=[-1,0,2])  # -1 means the compoment sum
    13581460\end{verbatim}
    13591461
     
    13641466
    13651467\begin{verbatim}
    1366   ASAP> f.storefit()
     1468  ASAP>f.store_fit()
    13671469\end{verbatim}
    13681470
     
    13761478
    13771479\begin{verbatim}
    1378   ASAP> scans.get_fit(4) # Print fits for row 4
     1480  ASAP>scans.get_fit(4) # Print fits for row 4
     1481\end{verbatim}
     1482
     1483A fit can also be exported to an ASCII file using the \cmd{store\_fit}
     1484function. Simply give the name of the output file requires as an
     1485argument.
     1486
     1487\begin{verbatim}
     1488  ASAP>f.store_fit('myfit.txt')
    13791489\end{verbatim}
    13801490
     
    13991509
    14001510\begin{verbatim}
    1401   ASAP> scans.rotate_xyphase(10.5)            # Degrees
     1511  ASAP>scans.rotate_xyphase(10.5)            # Degrees
    14021512\end{verbatim}
    14031513
     
    14121522
    14131523\begin{verbatim}
    1414   ASAP> scans.rotate_linpolphase(-45) # Degrees; correct for receiver mounting
     1524  ASAP>scans.rotate_linpolphase(-45) # Degrees; correct for receiver mounting
    14151525\end{verbatim}
    14161526
     
    14211531
    14221532\begin{verbatim}
    1423   ASAP> scans.invert_phase()
     1533  ASAP>scans.invert_phase()
    14241534\end{verbatim}
    14251535
    14261536Depending on how the correlator is configured, ``BA'' may be
    1427 correlated insead of ``AB''. Use \cmd{swap\_linears} to correct for
     1537correlated instead of ``AB''. Use \cmd{swap\_linears} to correct for
    14281538this problem:
    14291539
    14301540\begin{verbatim}
    1431   ASAP> scans.swap_linears()
     1541  ASAP>scans.swap_linears()
    14321542\end{verbatim}
    14331543
     
    14391549
    14401550\begin{verbatim}
    1441   ASAP> stokescans = linearscans.convert_pol("stokes")
     1551  ASAP>stokescans = linearscans.convert_pol("stokes")
    14421552\end{verbatim}
    14431553
     
    14581568
    14591569\begin{verbatim}
    1460   ASAP> selection = selector()
    1461 
    1462   ASAP> selection.set_polarisations(``I Q U V'')
     1570  ASAP>selection = selector()
     1571
     1572  ASAP>selection.set_polarisations(``I Q U V'')
    14631573  ASAP  plotter.set_selection(selection);              # Select I, Q, U \& V
    14641574
    1465   ASAP> selection.set_polarisations(``I Q'')
     1575  ASAP>selection.set_polarisations(``I Q'')
    14661576  ASAP  plotter.set_selection(selection);              # Select just I \& Q
    14671577
    1468   ASAP> selection.set_polarisations(``RR LL'')
     1578  ASAP>selection.set_polarisations(``RR LL'')
    14691579  ASAP  plotter.set_selection(selection);              # Select just RR \& LL
    14701580
    1471   ASAP> selection.set_polarisations(``XX YY'')
     1581  ASAP>selection.set_polarisations(``XX YY'')
    14721582  ASAP  plotter.set_selection(selection);              # Select linears
    14731583
    1474   ASAP> selection.set_polarisations(``I Plinear'')
     1584  ASAP>selection.set_polarisations(``I Plinear'')
    14751585  ASAP  plotter.set_selection(selection);              # Fractional linear
    14761586
    1477   ASAP> selection.set_polarisations(``Pangle'')
     1587  ASAP>selection.set_polarisations(``Pangle'')
    14781588  ASAP  plotter.set_selection(selection);              # Position angle
    14791589
     
    14921602
    14931603\begin{verbatim}
    1494   ASAP> scans.save('myscan.sdfits', 'SDFITS', stokes=True)
     1604  ASAP>scans.save('myscan.sdfits', 'SDFITS', stokes=True)
    14951605\end{verbatim}
    14961606
     
    15011611MX mode is a specific observing approach with a multibeam where a
    15021612single source is observed cycling through each beam. The scans when
    1503 the beam is off source is used as a reference for the onsource
     1613the beam is off source is used as a reference for the on-source
    15041614scan. The function \cmd{mx\_quotient} is used to make a quotient
    15051615spectrum from an MX cycle. This works averaging the ``off-source''
     
    15091619single scan (it the scan numbers are re-labelled to be the same). Note
    15101620that the current version of \cmd{mx\_quotient} only handles a single
    1511 MX cycle, ie if each beam has observed the source multiple times you
     1621MX cycle, i.e. if each beam has observed the source multiple times you
    15121622will need to use the selector object multiple times to select a single
    15131623MX cycle, run \cmd{mx\_quotient} for each cycle then merge the
     
    15171627
    15181628\begin{verbatim}
    1519   ASAP> scans = scantable('mydata.rpf')
    1520   ASAP> q = scans.mx_quotient()
    1521   ASAP> plotter.plot(q)
     1629  ASAP>scans = scantable('mydata.rpf')
     1630  ASAP>q = scans.mx_quotient()
     1631  ASAP>plotter.plot(q)
    15221632\end{verbatim}
    15231633
     
    15271637
    15281638\begin{verbatim}
    1529   ASAP> av = q.average_beam()
     1639  ASAP>av = q.average_beam()
    15301640\end{verbatim}
    15311641
     
    15331643
    15341644{\em FILL ME IN}
     1645
     1646\subsection{Disk Based Processing}
     1647\index{Scantable|disk based}
     1648
     1649Normally scantables exisit entirely in memory during an ASAP
     1650session. This has the adtantage of speed, but causes limits on the
     1651size of the dataset which can be loaded. ASAP can use ``disk based''
     1652scan tables which
     1653
     1654{\bf NOTE: } Currently a bug in ipython means temporary files are not
     1655cleaned up properly when you exit ASAP. If you use disk based scan
     1656tables your directory will be left with 'tmp*' directories. These can
     1657be safely removed if ASAP is not running.
    15351658
    15361659\section{Scantable Mathematics}
     
    15441667{\em Currently mathematics between two scantables is not available }
    15451668
    1546 %  ASAP> sum = scan1+scan2
    1547 \begin{verbatim}
    1548   ASAP> scan2 = scan1+2.0
    1549   ASAP> scan *= 1.05
     1669%  ASAP>sum = scan1+scan2
     1670\begin{verbatim}
     1671  ASAP>scan2 = scan1+2.0
     1672  ASAP>scan *= 1.05
    15501673\end{verbatim}
    15511674
    15521675\section{Scripting}
    15531676
    1554 \index{Scripting}Because asap is based on python, it easy for the user
     1677\index{Scripting}Because ASAP is based on python, it easy for the user
    15551678write their own scripts and functions to process data. This is highly
    15561679recommended as most processing of user data could then be done in a
    15571680couple of steps using a few simple user defined functions. A Python
    1558 primer is beyond the scope of this userguide. See the asap home pages
     1681primer is beyond the scope of this userguide. See the ASAP home pages
    15591682for a scripting tutorial or the main python website for comprehensive
    15601683documentation.
     
    15661689\subsection{Running scripts}
    15671690
    1568 The asap global function \cmd{execfile} reads the named text file and
     1691The ASAP global function \cmd{execfile} reads the named text file and
    15691692executes the contained python code. This file can either contain
    15701693function definitions which will be used in subsequent processing or
     
    15741697
    15751698The file $\sim$/.asap/asapuserfuncs.py is automatically read in when
    1576 asap is started. The user can use this to define a set of user
    1577 functions which are automatically available each time asap is
     1699ASAP is started. The user can use this to define a set of user
     1700functions which are automatically available each time ASAP is
    15781701used. The \cmd{execfile} function can be called from within this file.
    15791702
     
    15811704
    15821705In the following section a few examples of end-to-end processing of
    1583 some data in asap are given.
     1706some data in ASAP are given.
    15841707
    15851708\subsection{Mopra}
     
    15871710
    15881711The following example is of some dual polarisation, position switched
    1589 data from Mopra. The source has been observed mulitple times split
    1590 into a number of seperate rpfits files. To make the processing easier,
    1591 the first step is to \cmd{cat} the seeprate rpfits files together and
    1592 load as a whole (future versions of asap will make this unnecessary).
     1712data from Mopra. The source has been observed multiple times split
     1713into a number of separate RPFITS files. To make the processing easier,
     1714the first step is to \cmd{cat} the separate RPFITS files together and
     1715load as a whole (future versions of ASAP will make this unnecessary).
    15931716
    15941717
     
    165517784~MHz bandwidth is wide enough to observe both the 1665 and 1667~MHz
    16561779OH maser transitions. Each source was observed once for about 10
    1657 minutes. Tsys information was not written to the rpfits file (a
     1780minutes. Tsys information was not written to the RPFITS file (a
    16581781nominal 25K values was used), so the amplitudes need to be adjusted
    16591782based on a separate log file. A simple user function is used to
     
    16811804\end{verbatim}
    16821805
    1683 The typical asap session would be
     1806The typical ASAP session would be
    16841807
    16851808\begin{verbatim}
Note: See TracChangeset for help on using the changeset viewer.