Skip to main content

plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.

Project description

# plotastrodata Python package to make figures from radio astronomical data by astropy and matplotlib.

## Demo and Usage For the installation, conda and are available. `bash conda install conda-forge::plotastrodata ` or `bash pip install plotastrodata ` The following is the way to install plotastrodata manually. The file example.py will help you find out how to use this package. `bash git clone https://github.com/yusukeaso-astron/plotastrodata cd plotastrodata python example.py ` To keep the package updated, always type the command below in the directory plotastrodata before you use it. `bash git pull ` Also, setting the path in .bashrc (or .zshrc, etc.) will be useful. `bash export PYTHONPATH=${PYTHONPATH}:/YOUR_PATH_TO/plotastrodata ` Or directly in your script, `Python import sys sys.path.append( "/YOUR_PATH_TO/plotastrodata" ) ` The Sphinx html document is available from docs/_build/index.html or [readthedocs](https://plotastrodata.readthedocs.io/en/latest/).

## Features

plotastrodata can do the following things. * Make 3D channel maps, 3D rotatable html cube, or 2D images including position-velocity diagrams. * Color scale can be linear, log, and asinh. * Make a figure of line profiles with Gaussian fitting. * Plot images to externally given fig and ax (2D images only). * Combine color, contour, segment, and RGB maps using images with different spatial grids. * Input fits files or 2D/3D numpy arrays. * Select the R.A.-Dec. style or the offset style as the x/y tick labels. * Fill channel maps with a 2D image. * Add line, arrow, ellipse, rectangle, text, and marker in specified channels. * Use original arguments of matplotlib (pcolormesh, contour, quiver, plot, text, Ellipse, Rectangle). * Other functions for plotting line profiles and a spatial 1D slice. * example_advanced.py includes how to make a movie of channel maps. * There are other utilities for Fourier transform and fitting.

## Requirement

  • astropy

  • corner (only for fitting)

  • dynesty (only for fitting)

  • ffmpeg (only for movie)

  • matplotlib

  • multiprocess (only for fitting)

  • numpy

  • pillow (only for RGB figures)

  • plotly (only for html cube)

  • ptemcee (only for fitting)

  • scikit-image (only for html cube)

  • scipy

  • tqdm (only for fitting)

## Installation

Download from https://github.com/yusukeaso-astron/plotastrodata or git clone. `bash git clone https://github.com/yusukeaso-astron/plotastrodata `

## Note

  • For 3D data, a 1D velocity array or a FITS file with a velocity axis must be given to set up channels on each page.

  • For 2D/3D data, the spatial center can be read from a FITS file or manually given.

  • len(v)=1 (default) means to make a 2D figure.

  • Spatial lengths are in the unit of arcsec, or au if dist (!= 1) is given.

  • Angles are in the unit of degree.

  • For region, line, arrow, label, and marker, a single input can be treated without a list, e.g., anglelist=60, as well as anglelist=[60].

  • Each element of poslist supposes a text coordinate like ‘01h23m45.6s 01d23m45.6s’ or a list of relative x and y like [0.2, 0.3] (0 is left or bottom, 1 is right or top).

  • Parameters for original methods in matplotlib.axes.Axes can be used as kwargs; see the default kwargs0 for reference.

  • Position-velocity diagrams (pv=True) do not yet support region, line, arrow, and segment because the units of abscissa and ordinate are different.

## Author

  • Name: Yusuke Aso

  • Affiliation: Korea Astronomy and Space Science Institute

  • E-mail: yaso@kasi.re.kr

## License

“plotastrodata” is under [GNU General Public License Version 3](https://www.gnu.org/licenses/gpl-3.0.html).

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

plotastrodata-1.1.2.post1.tar.gz (55.4 kB view details)

Uploaded Source

Built Distribution

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

plotastrodata-1.1.2.post1-py3-none-any.whl (56.5 kB view details)

Uploaded Python 3

File details

Details for the file plotastrodata-1.1.2.post1.tar.gz.

File metadata

  • Download URL: plotastrodata-1.1.2.post1.tar.gz
  • Upload date:
  • Size: 55.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/7.0.0 pkginfo/1.11.2 requests/2.32.3 requests-toolbelt/1.0.0 tqdm/4.63.0 CPython/3.13.1

File hashes

Hashes for plotastrodata-1.1.2.post1.tar.gz
Algorithm Hash digest
SHA256 404edddba326c45a59af0b3abc732df19ee3d89e16c1c8ac839feadd580c71ef
MD5 b485e514b38e41f25d90504c1b2a4f20
BLAKE2b-256 1a4a2f83ccc1bbcb788620df1018903dbe34a1bbf6e737f10c7bbdedf9885e5c

See more details on using hashes here.

File details

Details for the file plotastrodata-1.1.2.post1-py3-none-any.whl.

File metadata

  • Download URL: plotastrodata-1.1.2.post1-py3-none-any.whl
  • Upload date:
  • Size: 56.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/7.0.0 pkginfo/1.11.2 requests/2.32.3 requests-toolbelt/1.0.0 tqdm/4.63.0 CPython/3.13.1

File hashes

Hashes for plotastrodata-1.1.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 35578bf1de063c41e34258770b0b7183dd3cc98a08c61b5ecd3f4f35fa27e3bf
MD5 01381f76f890fece5d72f837b160b551
BLAKE2b-256 f0a9ae2628853112181aa4e6de9fd6270e27679e4abb5234b2a10aa1f22ff232

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