Skip to main content

Package to plot data cube from CASA in Python

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

casa_cube-0.0.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

casa_cube-0.0.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file casa_cube-0.0.0.tar.gz.

File metadata

  • Download URL: casa_cube-0.0.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for casa_cube-0.0.0.tar.gz
Algorithm Hash digest
SHA256 fee15f54b81a5e6f5a292de338f6f0ffdc4b1c5150885eefa85a5b2a9af3361d
MD5 1fd1478883eaa9db932d55f1cbf2ad57
BLAKE2b-256 93d296e227c064b96f23a72fd601705e34a0e623a14bf9f190a49bc84edf4fe9

See more details on using hashes here.

File details

Details for the file casa_cube-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: casa_cube-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for casa_cube-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79aaed9b6b0e91cff56c622eae4d5c9f7243c6dfe1de88e096b7f62084ca9d00
MD5 2b9ebb3d0a3af74d4eedc5cebc545216
BLAKE2b-256 87ae8a46fb2b89b785e3b5c6810b7d8448d17b35d93efb32029bc27ef2a5b9cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page