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 | if is_ipython():
|
---|
19 | from ipysupport import *
|
---|
20 |
|
---|
21 | # Only use rcParams['verbose'] in standard asap cli mode
|
---|
22 | # not in scripts or casapy
|
---|
23 | if not is_asap_cli():
|
---|
24 | rcParams['verbose'] = False
|
---|
25 |
|
---|
26 | setup_env()
|
---|
27 |
|
---|
28 | # anything which uses matplotlib has to be imported after this!!!
|
---|
29 | if rcParams['useplotter']:
|
---|
30 | try:
|
---|
31 | gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui']
|
---|
32 | if gui:
|
---|
33 | import matplotlib
|
---|
34 | if 'matplotlib.backends' not in matplotlib.sys.modules:
|
---|
35 | matplotlib.use("TkAgg")
|
---|
36 | from asapplotter import asapplotter
|
---|
37 | from matplotlib import pylab
|
---|
38 | xyplotter = pylab
|
---|
39 | plotter = asapplotter(gui)
|
---|
40 | except ImportError:
|
---|
41 | asaplog.push( "Matplotlib not installed. No plotting available")
|
---|
42 | asaplog.post('WARN')
|
---|
43 |
|
---|
44 | from selector import selector
|
---|
45 | from asapmath import *
|
---|
46 | from scantable import scantable
|
---|
47 | from linecatalog import linecatalog
|
---|
48 | from asaplinefind import linefinder
|
---|
49 | from simplelinefinder import simplelinefinder
|
---|
50 | from interactivemask import interactivemask
|
---|
51 | from asapfitter import fitter
|
---|
52 | from opacity import skydip
|
---|
53 | from opacity import model as opacity_model
|
---|
54 |
|
---|
55 | __date__ = '$Date: 2010-08-05 06:07:30 +0000 (Thu, 05 Aug 2010) $'.split()[1]
|
---|
56 | __version__ = 'trunk'
|
---|
57 | __revision__ = get_revision()
|
---|
58 |
|
---|
59 | def welcome():
|
---|
60 | return """Welcome to ASAP v%s (%s) - the ATNF Spectral Analysis Package
|
---|
61 |
|
---|
62 | Please report any bugs via:
|
---|
63 | http://svn.atnf.csiro.au/trac/asap/simpleticket
|
---|
64 |
|
---|
65 | [IMPORTANT: ASAP is 0-based]
|
---|
66 | Type commands() to get a list of all available ASAP commands.""" % (__version__,
|
---|
67 | __date__)
|
---|