Metadata-Version: 2.4
Name: casa_cube
Version: 0.0.0
Summary: Package to plot data cube from CASA in Python
Home-page: http://github.com/cpinte/casa_cube
Author: Christophe Pinte
Author-email: Christophe Pinte <christophe.pinte@univ-grenoble-alpes.fr>
License: MIT
Project-URL: Homepage, http://github.com/cpinte/casa_cube
Project-URL: Repository, http://github.com/cpinte/casa_cube.git
Keywords: astronomy,CASA,data-cube,visualization
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: astropy
Dynamic: author
Dynamic: home-page

# casa_cube

casa_cube is a python package that provides an interface to data cubes generates by CASA or Gildas.
It allows the user to perform simple tasks such plotting given channel maps, moment maps, line profile in various units, correcting for cloud extinction, reconvolving with a beam taper, ...
The syntax is similar to pymcfost to perform quick and easy comparison with models.

## Installation:

```
git clone https://github.com/cpinte/casa_cube.git
cd casa_cube
python3 setup.py install
```

If you don't have the `sudo` rights, use `python3 setup.py install --user`.

To install in developer mode: (i.e. using symlinks to point directly
at this directory, so that code changes here are immediately available
without needing to repeat the above step):

```
 python3 setup.py develop
```

## Basic usage for 3D molecular line cube
```
import casa_cube as casa

obs = casa.Cube('HD_163296_CO_220GHz.robust_0.5_wcont.image.fits')
obs.plot(iv=0)
```
For a line cube one must specify either the channel number (iv=) or a moment map:
```
obs.plot(moment=1,cmap='RdBu_r')
```

## Basic usage for 2D fits image
```
import casa_cube as casa

obs = casa.Cube('HD169142_2015-05-03_Q_phi.fits',pixelscale=0.01225)
obs.plot()
```

## How to plot with RA and Dec on axes instead of relative offsets from image centre
```
import casa_cube as casa

obs = casa.Cube('IMLup_continuum.fits')
ax = plt.subplot(1,1,1,projection=obs.wcs)
obs.plot(ax)
```
