| [100] | 1 | """
 | 
|---|
 | 2 | This is the ATNF Single Dish Analysis package.
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 | """
 | 
|---|
| [1824] | 5 | import os
 | 
|---|
 | 6 | import sys
 | 
|---|
| [226] | 7 | 
 | 
|---|
| [1824] | 8 | # first import!
 | 
|---|
 | 9 | from asap.env import *
 | 
|---|
 | 10 | # second import!
 | 
|---|
 | 11 | from asap.logging import *
 | 
|---|
 | 12 | from asap.parameters import *
 | 
|---|
 | 13 | from asap.utils import *
 | 
|---|
 | 14 | # explicitly import 'hidden' functions
 | 
|---|
 | 15 | from asap.utils import _n_bools, _is_sequence_or_number, _to_list
 | 
|---|
| [1472] | 16 | 
 | 
|---|
| [1080] | 17 | 
 | 
|---|
| [1824] | 18 | if is_ipython():
 | 
|---|
 | 19 |     from ipysupport import *
 | 
|---|
| [226] | 20 | 
 | 
|---|
| [1824] | 21 | # use rc parameter to enable/disable logging
 | 
|---|
 | 22 | asaplog.enable(rcParams['verbose'])
 | 
|---|
| [226] | 23 | 
 | 
|---|
| [1824] | 24 | setup_env()
 | 
|---|
| [226] | 25 | 
 | 
|---|
| [1824] | 26 | # anything which uses matplotlib has to be imported after this!!!
 | 
|---|
| [928] | 27 | if rcParams['useplotter']:
 | 
|---|
| [1295] | 28 |     try:
 | 
|---|
| [1423] | 29 |         gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui']
 | 
|---|
 | 30 |         if gui:
 | 
|---|
| [1422] | 31 |             import matplotlib
 | 
|---|
| [1824] | 32 |             if 'matplotlib.backends' not in matplotlib.sys.modules:
 | 
|---|
 | 33 |                 matplotlib.use("TkAgg")
 | 
|---|
 | 34 |         from asapplotter import asapplotter
 | 
|---|
| [1691] | 35 |         from matplotlib import pylab
 | 
|---|
| [1422] | 36 |         xyplotter = pylab
 | 
|---|
| [1423] | 37 |         plotter = asapplotter(gui)
 | 
|---|
| [1295] | 38 |     except ImportError:
 | 
|---|
| [1819] | 39 |         asaplog.post( "Matplotlib not installed. No plotting available")
 | 
|---|
 | 40 |         print_log('WARN')
 | 
|---|
| [285] | 41 | 
 | 
|---|
| [1824] | 42 | from asapreader import reader
 | 
|---|
 | 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 | 
 | 
|---|
| [574] | 54 | __date__ = '$Date: 2010-08-02 09:40:09 +0000 (Mon, 02 Aug 2010) $'.split()[1]
 | 
|---|
| [1824] | 55 | __version__  = 'trunk'
 | 
|---|
 | 56 | __revision__ = get_revision()
 | 
|---|
| [100] | 57 | 
 | 
|---|
| [706] | 58 | def welcome():
 | 
|---|
 | 59 |     return """Welcome to ASAP v%s (%s) - the ATNF Spectral Analysis Package
 | 
|---|
| [100] | 60 | 
 | 
|---|
| [1035] | 61 | Please report any bugs via:
 | 
|---|
| [1378] | 62 | http://svn.atnf.csiro.au/trac/asap/simpleticket
 | 
|---|
| [100] | 63 | 
 | 
|---|
| [378] | 64 | [IMPORTANT: ASAP is 0-based]
 | 
|---|
| [1824] | 65 | Type commands() to get a list of all available ASAP commands.""" % (__version__,
 | 
|---|
 | 66 |                                                                     __date__)
 | 
|---|