source: trunk/python/__init__.py@ 117

Last change on this file since 117 was 116, checked in by mar637, 20 years ago

Added SDFITS writing.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 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: 2004-12-01 02:47:09 +0000 (Wed, 01 Dec 2004) $'
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 [Reading files]
31 reader - access rpfits/sdfits files
32 read - read in integrations
33 summary - list info about all integrations
34 [The scan container]
35 scantable - a container for integrations/scans
36 copy - returns a copy of a scan
37 get_scan - gets a specific scan out of a scantable
38 summary - print info about the scantable contents
39 set_selection - set a specific Beam/IF/Pol for furthrt use
40 get_selection - print out the current selection
41 rms - get the rms of the spectra 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 a mask in thecurrent unit
48 set_restfreqs - give a list of rest frequencies
49 flag_spectrum - flag a whole Beam/IF/Pol
50 save - save the scantable to disk as either 'ASAP'
51 or 'SDFITS'
52 nbeam,nif,nchan,npol - the number of beams/IFs/Pols/Chans
53 [Math]
54 average_scans - return the rms-weighted (time) average of
55 a scan or a list of scans
56 average_pol - averge the polarisations together.
57 The dimension won't be reduced and
58 all polarisations will contain the
59 averaged spectrum.
60 quotient - return the on/off quotient
61 scale - returns a scan scaled by a given factor
62 bin - return a scan with binned channels
63 hanning - return the hanning smoothed scan
64 poly_baseline - fit a polynomial baseline to all Beams/IFs/Pols
65
66 fitter
67 auto_fit - return a scan where the function is
68 applied to all Beams/IFs/Pols.
69 commit - return a new scan where the fits have been
70 commited.
71 fit - execute the actual fitting process
72 get_chi2 - get the Chi^2
73 set_scan - set the scantable to be fit
74 set_function - set the fitting function
75 set_parameters - set the parameters for the function(s), and
76 set if they should be held fixed during fitting
77 get_parameters - get the fitted parameters
78
79 [General]
80 commands - this command
81 print - print details about a variable
82 list_scans - list all scantables created bt the user
83 del - delete the given variable from memory
84 range - create a list of values, e.g.
85 range(3) = [0,1,2], range(2,5) = [2,3,4]
86 help - print help for one of the listed functions
87 execfile - execute an asap script, e.g. execfile('myscript')
88 """
89 print x
90 return
91
92print """Welcome to ASAP - the ATNF Single Dish Analysis Package
93This is a testing pre-release v0.1a
94
95Please report any bugs to:
96Malte.Marquarding@atnf.csiro.au
97
98[NOTE: ASAP is 0-based]
99Type commands() to get a list of all available ASAP commands.
100"""
Note: See TracBrowser for help on using the repository browser.