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.1.0.tar.gz (16.8 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.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: casa_cube-0.1.0.tar.gz
  • Upload date:
  • Size: 16.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 4f08377a3348f63e42a87f2ea580984ddeed2607453f60bd56d211dec20ed455
MD5 b2b67ece761292f78065b21706197b1c
BLAKE2b-256 a31c6915a75a76f1ef152f86e455f2ff7bd8544349c16bfdfe7c0747363a2710

See more details on using hashes here.

File details

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

File metadata

  • Download URL: casa_cube-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9581dba442e879a2d27f73064674cdc913de797cf722e357d15c42272052f2c4
MD5 db5bdc50cfcd1daa4cbef5eb75bd7c1b
BLAKE2b-256 f8e63131ce20346a15571fbd65322a5a078042331dc10a9a091ade455ab9e4d9

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