| 
            Last change
 on this file since 940 was             937, checked in by mar637, 20 years ago           | 
        
        
          | 
             
asap2 version of test script 
 
           | 
        
        
          
            
              - 
Property                 svn:eol-style
 set to                 
native
               
              - 
Property                 svn:executable
 set to                 
*
               
              - 
Property                 svn:keywords
 set to                 
Author Date Id Revision
               
             
           | 
        
        
          | 
            File size:
            923 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | #!/usr/bin/env python
 | 
|---|
| 2 | from asap import *
 | 
|---|
| 3 | 
 | 
|---|
| 4 | rcParams['verbose'] = 0
 | 
|---|
| 5 | 
 | 
|---|
| 6 | rcParams['plotter.ganged'] = 0
 | 
|---|
| 7 | # Don't plot to the screen...
 | 
|---|
| 8 | del plotter
 | 
|---|
| 9 | plotter = asapplotter(False)
 | 
|---|
| 10 | 
 | 
|---|
| 11 | print "Test of Tidbinbilla"
 | 
|---|
| 12 | 
 | 
|---|
| 13 | # Create the quotient spectra
 | 
|---|
| 14 | data = scantable('data/tid-t002.rpf')
 | 
|---|
| 15 | q = data.auto_quotient()
 | 
|---|
| 16 | # Set the restfreq for each IF
 | 
|---|
| 17 | q.set_restfreqs(freqs= [23694.4700e6,23722.6336e6])
 | 
|---|
| 18 | q.set_unit('km/s')
 | 
|---|
| 19 | q.set_freqframe('LSRK')
 | 
|---|
| 20 | # Align frequencies
 | 
|---|
| 21 | qa = q.freq_align(insitu=False)
 | 
|---|
| 22 | # Recalculate the az/el
 | 
|---|
| 23 | qa.recalc_azel()
 | 
|---|
| 24 | # Correct for gain curve and opacity
 | 
|---|
| 25 | qa.gain_el()
 | 
|---|
| 26 | qa.opacity(0.075)
 | 
|---|
| 27 | # Average in time
 | 
|---|
| 28 | av = qa.average_time()
 | 
|---|
| 29 | # Baseline
 | 
|---|
| 30 | msk=av.create_mask([-70,-50],[40,60])
 | 
|---|
| 31 | av.poly_baseline(msk,1)
 | 
|---|
| 32 | plotter.set_mode('i','s')
 | 
|---|
| 33 | plotter.plot(av)
 | 
|---|
| 34 | plotter.save('output/tid.png', dpi=80)
 | 
|---|
| 35 | 
 | 
|---|
| 36 | # Do some random processing, just to test these functions
 | 
|---|
| 37 | av.smooth('gauss',5)
 | 
|---|
| 38 | av.scale(1.05)
 | 
|---|
| 39 | av.add(0.05)
 | 
|---|
| 40 | 
 | 
|---|
| 41 | print "Tid test finished successfully"
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.