1 | """
|
---|
2 | This is the ATNF Single Dish Analysis package.
|
---|
3 |
|
---|
4 | """
|
---|
5 | import os
|
---|
6 | import sys
|
---|
7 |
|
---|
8 | # first import!
|
---|
9 | from asap.env import *
|
---|
10 | # second import!
|
---|
11 | from asap.parameters import *
|
---|
12 | # third import
|
---|
13 | from asap.logging import *
|
---|
14 | from asap.utils import *
|
---|
15 | # explicitly import 'hidden' functions
|
---|
16 | from asap.utils import _n_bools, _is_sequence_or_number, _to_list
|
---|
17 |
|
---|
18 |
|
---|
19 | if is_ipython():
|
---|
20 | from ipysupport import *
|
---|
21 |
|
---|
22 | # use rc parameter to enable/disable logging
|
---|
23 | asaplog.enable(rcParams['verbose'])
|
---|
24 |
|
---|
25 | setup_env()
|
---|
26 |
|
---|
27 | # anything which uses matplotlib has to be imported after this!!!
|
---|
28 | if rcParams['useplotter']:
|
---|
29 | try:
|
---|
30 | gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui']
|
---|
31 | if gui:
|
---|
32 | import matplotlib
|
---|
33 | if 'matplotlib.backends' not in matplotlib.sys.modules:
|
---|
34 | matplotlib.use("TkAgg")
|
---|
35 | from asapplotter import asapplotter
|
---|
36 | from matplotlib import pylab
|
---|
37 | xyplotter = pylab
|
---|
38 | plotter = asapplotter(gui)
|
---|
39 | except ImportError:
|
---|
40 | asaplog.post( "Matplotlib not installed. No plotting available")
|
---|
41 | print_log('WARN')
|
---|
42 |
|
---|
43 | from selector import selector
|
---|
44 | from asapmath import *
|
---|
45 | from scantable import scantable
|
---|
46 | from linecatalog import linecatalog
|
---|
47 | from asaplinefind import linefinder
|
---|
48 | from simplelinefinder import simplelinefinder
|
---|
49 | from interactivemask import interactivemask
|
---|
50 | from asapfitter import fitter
|
---|
51 | from opacity import skydip
|
---|
52 | from opacity import model as opacity_model
|
---|
53 |
|
---|
54 | __date__ = '$Date: 2010-08-03 05:08:49 +0000 (Tue, 03 Aug 2010) $'.split()[1]
|
---|
55 | __version__ = 'trunk'
|
---|
56 | __revision__ = get_revision()
|
---|
57 |
|
---|
58 | def welcome():
|
---|
59 | return """Welcome to ASAP v%s (%s) - the ATNF Spectral Analysis Package
|
---|
60 |
|
---|
61 | Please report any bugs via:
|
---|
62 | http://svn.atnf.csiro.au/trac/asap/simpleticket
|
---|
63 |
|
---|
64 | [IMPORTANT: ASAP is 0-based]
|
---|
65 | Type commands() to get a list of all available ASAP commands.""" % (__version__,
|
---|
66 | __date__)
|
---|