source: trunk/python/__init__.py@ 199

Last change on this file since 199 was 188, checked in by mar637, 20 years ago

create_mask is be default now returning a mask OUTSIDE the specified regions.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1"""
2This is the ATNF Single Dish Analysis package.
3
4"""
5#import _asap
6#from asaplot import ASAPlot
7from asapfitter import *
8from asapreader import reader
9from asapmath import *
10from scantable import *
11#from numarray ones,zeros
12
13__date__ = '$Date: 2005-01-11 01:31:17 +0000 (Tue, 11 Jan 2005) $'
14__version__ = '0.1a'
15
16def list_scans(t = scantable):
17 import sys, types
18 #meta_t = type(t)
19 #if meta_t == types.InstanceType:
20 # t = t.__class__
21 #elif meta_t not in [types.ClassType, types.TypeType]:
22 # t = meta_t
23 globs = sys.modules['__main__'].__dict__.iteritems()
24 print "The user created scantables are:"
25 x = map(lambda x: x[0], filter(lambda x: isinstance(x[1], t), globs))
26 print x
27
28def commands():
29 x = """
30 [The scan container]
31 scantable - a container for integrations/scans
32 (can open asap/rpfits/sdfits and ms files)
33 copy - returns a copy of a scan
34 get_scan - gets a specific scan out of a scantable
35 summary - print info about the scantable contents
36 set_selection - set a specific Beam/IF/Pol for furthrt use
37 get_selection - print out the current selection
38 stats - get specified statistic of the spectra in
39 the scantable
40 stddev - get the standard deviation of the spectra
41 in the scantable
42 get_tsys - get the TSys
43 get_time - get the timestamps of the integrations
44 set_unit - set the units to be used from this point on
45 set_freqframe - set the frame info for the Spectral Axis
46 (e.g. 'LSRK')
47 create_mask - return an mask in the current unit
48 for the given region. The specified regions
49 are NOT masked
50 set_restfreqs - give a list of rest frequencies
51 flag_spectrum - flag a whole Beam/IF/Pol
52 save - save the scantable to disk as either 'ASAP'
53 or 'SDFITS'
54 nbeam,nif,nchan,npol - the number of beams/IFs/Pols/Chans
55 [Math]
56 average_time - return the (weighted) time average of a scan
57 or a list of scans
58 average_pol - average the polarisations together.
59 The dimension won't be reduced and
60 all polarisations will contain the
61 averaged spectrum.
62 quotient - return the on/off quotient
63 scale - returns a scan scaled by a given factor
64 add - returns a scan with given value added
65 bin - return a scan with binned channels
66 smooth - return the spectrally smoothed scan
67 poly_baseline - fit a polynomial baseline to all Beams/IFs/Pols
68
69 fitter
70 auto_fit - return a scan where the function is
71 applied to all Beams/IFs/Pols.
72 commit - return a new scan where the fits have been
73 commited.
74 fit - execute the actual fitting process
75 get_chi2 - get the Chi^2
76 set_scan - set the scantable to be fit
77 set_function - set the fitting function
78 set_parameters - set the parameters for the function(s), and
79 set if they should be held fixed during fitting
80 get_parameters - get the fitted parameters
81 [Reading files]
82 reader - access rpfits/sdfits files
83 read - read in integrations
84 summary - list info about all integrations
85
86 [General]
87 commands - this command
88 print - print details about a variable
89 list_scans - list all scantables created bt the user
90 del - delete the given variable from memory
91 range - create a list of values, e.g.
92 range(3) = [0,1,2], range(2,5) = [2,3,4]
93 help - print help for one of the listed functions
94 execfile - execute an asap script, e.g. execfile('myscript')
95 """
96 print x
97 return
98
99print """Welcome to ASAP - the ATNF Single Dish Analysis Package
100This is a testing pre-release v0.1a
101
102Please report any bugs to:
103Malte.Marquarding@csiro.au
104
105[NOTE: ASAP is 0-based]
106Type commands() to get a list of all available ASAP commands.
107"""
Note: See TracBrowser for help on using the repository browser.