[go: up one dir, main page]

File: installing.rst

package info (click to toggle)
spectral-cube 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,960 kB
  • sloc: python: 12,408; makefile: 154
file content (67 lines) | stat: -rw-r--r-- 2,649 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Installing ``spectral-cube``
============================

Requirements
------------

This package has the following dependencies:

* `Python <http://www.python.org>`_ 2.7 or later (Python 3.x is supported)
* `Numpy <http://www.numpy.org>`_ 1.8 or later
* `Astropy <http://www.astropy.org>`__ 1.0 or later
* `radio_beam <https://github.com/radio-astro-tools/radio_beam>`_, used when
  reading in spectral cubes that use the BMAJ/BMIN convention for specifying the beam size.
* `Bottleneck <http://berkeleyanalytics.com/bottleneck/>`_, optional (speeds
  up median and percentile operations on cubes with missing data)
* `Regions <https://astropy-regions.readthedocs.io/en/latest>`_ >=0.3dev, optional
  (Serialises/Deserialises DS9/CRTF region files and handles them. Used when
  extracting a subcube from region)
* `dask <https://dask.org/>`_, used for the :class:`~spectral_cube.DaskSpectralCube` class
* `zarr <https://zarr.readthedocs.io/en/stable/>`_ and `fsspec <https://pypi.org/project/fsspec/>`_,
  used for storing computations to disk when using the dask-enabled classes.
* `six <http://pypi.python.org/pypi/six/>`_

Installation
------------

To install the latest stable release, you can type::

    pip install spectral-cube

or you can download the latest tar file from
`PyPI <https://pypi.python.org/pypi/spectral-cube>`_ and install it using::

    python setup.py install

Developer version
-----------------

If you want to install the latest developer version of the spectral cube code, you
can do so from the git repository::

    git clone https://github.com/radio-astro-tools/spectral-cube.git
    cd spectral-cube
    python setup.py install

You may need to add the ``--user`` option to the last line `if you do not
have root access <https://docs.python.org/2/install/#alternate-installation-the-user-scheme>`_.
You can also install the latest developer version in a single line with pip::

    pip install git+https://github.com/radio-astro-tools/spectral-cube.git

Installing into CASA
--------------------
Installing packages in CASA is fairly straightforward.  The process is described `here <http://docs.astropy.org/en/stable/install.html#installing-astropy-into-casa>`_.  In short, you can do the following:

First, we need to make sure `pip <https://pypi.python.org/pypi/pip>`__ is
installed. Start up CASA as normal, and type::

    CASA <1>: from setuptools.command import easy_install

    CASA <2>: easy_install.main(['--user', 'pip'])

Now, quit CASA and re-open it, then type the following to install ``spectral-cube``::

    CASA <1>: import pip

    CASA <2>: pip.main(['install', 'spectral-cube', '--user'])