https://github.com/astrofrog/cube-viewer
Experiments with 3-d spectral cube viewing
https://github.com/astrofrog/cube-viewer
Last synced: 6 months ago
JSON representation
Experiments with 3-d spectral cube viewing
- Host: GitHub
- URL: https://github.com/astrofrog/cube-viewer
- Owner: astrofrog
- License: bsd-2-clause
- Created: 2015-03-15T10:09:00.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-15T03:10:41.000Z (almost 11 years ago)
- Last Synced: 2025-05-29T20:24:00.722Z (about 1 year ago)
- Language: Python
- Size: 332 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
About
-----
This is an experimental package to show isocontours of FITS spectral cubes using VTK and Qt. This can be used either as a standalone tool, or as a [glue](http://www.glueviz.org) data viewer.
Dependencies
------------
The following dependencies are required:
* [Numpy](http://www.numpy.org)
* [Astropy](http://www.astropy.org)
* [spectral-cube](http://spectral-cube.readthedocs.org)
* [PyQt4](http://www.riverbankcomputing.co.uk/software/pyqt/intro)
* [VTK](http://www.vtk.org/)
* [Palettable](https://jiffyclub.github.io/palettable/)
* [six](https://pypi.python.org/pypi/six)
* [glue](https://www.glueviz.org)
You can easily create a conda environment with these dependencies using:
```
conda create -n vtk-viewer-test python=2.7 --yes
source activate vtk-viewer-test
conda install pyqt vtk numpy astropy pip --yes
pip install spectral_cube palettable
```
[Anaconda](https://store.continuum.io/cshop/anaconda/) or [Miniconda](http://conda.pydata.org/miniconda.html) are highly recommended since VTK and PyQt4 are tricky dependencies to install.
Using as a standalone tool
--------------------------
To run:
```
cube-viewer filename [levels] [--stretch-spectral=value]
```
e.g.
```
cube-viewer ../L1448_13CO.fits 1 2 3 4 5 --stretch-spectral=2.
```

Using as a Glue plugin
----------------------
To use this as a glue plugin, simply install this package, and glue should
recognize it at startup. However, note that this will not work with the Glue
Mac app, but will work with glue when installed as a normal Python package.
Note that you can install glue with conda:
```
conda install glueviz
```
At the moment, this plugin only supports viewing of the main data in a cube,
and does not show subsets.
When you drag a 3-d dataset onto the main canvas, one of the viewers available
will then be 'VTK Isosurfaces'.