Skip to main content
            /$$                            /$$                    /$$
           |__/                           | $$                   | $$
 /$$    /$$ /$$  /$$$$$$ /$$  /$$  /$$$$$ | $$  /$$$$$   /$$$$$ /$$$$$$   /$$$$$   /$$$$$$
|  $$  /$$/| $$ /$$____/| $$ | $$ |____ $$| $$ |____ $$ /$$___/|_  $$_/  /$$__ $$ /$$__  $$
 \  $$/$$/ | $$|  $$$$$ | $$ | $$  /$$$$$$| $$  /$$$$$$|  $$$$$  | $$   | $$ \__/| $$  \ $$
  \  $$$/  | $$ \___  $$| $$ | $$ /$$__ $$| $$ /$$__ $$ \___  $$ | $$ /$| $$     | $$  | $$
   \  $/   | $$ /$$$$$$/|  $$$$$/|  $$$$$$| $$|  $$$$$$ /$$$$$$/ |  $$$$| $$     |  $$$$$$/
    \_/    |__/|______/  \_____/  \______/|__/ \______/|______/   \___/ |__/      \______/

VisualAstro

PyPI Version Tests

VisualAstro is an astrophysical visualization system with functions for easy visualization and manipulation of astronomical data. The package aims to make publication-ready plots with minimal commands.

Features

  • Unified interface for Matplotlib, Astropy, NumPy, spectral-cube, specutils, and other astronomy packages
  • Custom mathtext stylesheets without LaTeX installation as well as many other styles for publication-quality figures
  • Colorblind safe alternative colorsets, and colormaps
  • User-friendly interface with many convenience methods that integrate with Matplotlib and other packages

Installation

Currently, the most stable version of python for VisualAstro is version >=3.10. To install VisualAstro, it is advised to create a new conda environment if possible:

$ conda create -n visualastro -c conda-forge python=3.13
$ conda activate visualastro

Then install the dependencies with:

$ conda install -c conda-forge \
    astropy matplotlib numpy scipy

Optional dependencies can also be installed if you plan to use related functionalities:

$ conda install -c conda-forge \
    colorspacious dust_extinction regions reproject spectral-cube scienceplots specutils tqdm

And finally run:

$ pip install visualastro

For additional interactive functionality inside of jupyter lab:

$ conda install -c conda-forge ipympl ipywidgets jupyterlab

For classic jupyter notebook users:

$ conda install -c conda-forge ipympl ipywidgets notebook jupyter_server notebook-shim

NOTE: To ensure that interactive mode works in notebooks, first activate your conda environment and then run jupyter notebook!

Documentation

VisualAstro is still under development! A full documentation of the package's features is coming soon.

Check the examples folder for notebook tutorials!

Dependencies

VisualAstro requires:

astropy, matplotlib, numpy, and scipy.

Optional dependencies

Optionally, some functionalities of VisualAstro require:

  • Image Data: regions, reproject
  • Cube Data: spectral-cube
  • Spectra: specutils, dust_extinction
  • Extra Stylesheets: scienceplots
  • Color Utilities: cmasher, colorspacious, tol-colors
  • Progress Bar: tqdm

If you try to use functionalities that require an optionally dependent package but do not have that package installed, VisualAstro will raise an ImportError and prompt you to install that package.

Examples

Example colorsets:

Example fontstyles:

Credits

Fonts

VisualAstro includes multiple mathtext fonts:

Concrete Math, distributed under the SIL OPEN FONT LICENSE from a release by:

author = Daniel Flipo
year = 2022-2026
url = https://ctan.org/tex-archive/fonts/concmath-otf?lang=en

Libertinus Math, distributed under the SIL OPEN FONT LICENSE from a release by:

authors = Caleb Maclennan, Libertinus Project Authors
year = 2012-2024
url = https://github.com/alerque/libertinus V7.051

New Computer Modern, distributed under GNU GENERAL PUBLIC LICENSE from a release by:

author = Antonis Tsolomitis
location = Samos, Greece
year = 2019--2026
url = https://ctan.org/texarchive/fonts/newcomputermodern?lang=en

VisualAstro includes Hershey-style TrueType fonts from the smplotlib project by Jiaxuan Li, used under the MIT License. Citation:

@software{jiaxuan_li_2023_8126529,
  author       = {Jiaxuan Li},
  title        = {AstroJacobLi/smplotlib: v0.0.9},
  month        = jul,
  year         = 2023,
  publisher    = {Zenodo},
  version      = {v0.0.9},
  doi          = {10.5281/zenodo.8126529},
  url          = {https://doi.org/10.5281/zenodo.8126529},
}

Metadata

Release files for visualastro 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for visualastro 0.3.1
File Size Uploaded
visualastro-0.3.1.tar.gz 12.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for visualastro 0.3.1
File Interpreter ABI Platform
visualastro-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 MB

Release files / visualastro-0.3.1.tar.gz

Download URL visualastro-0.3.1.tar.gz
Size 12.9 MB
Tags Source
SHA-256 checksum
How to use checksums
2661d9519df9c8a9ccb4604a45a04dd513dde7ee16d5b495fcfa699dc23732f3
BLAKE2b-256 checksum
How to use checksums
39f8925767f657aa135b4048b877922c101296ef9742af7e01684cc8664c0b07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / visualastro-0.3.1-py3-none-any.whl

Download URL visualastro-0.3.1-py3-none-any.whl
Size 13.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
70b755ea29483fde4aed790e9f6989873cc3d7a78fbac2583157aca7549ca627
BLAKE2b-256 checksum
How to use checksums
25cc7b27908ca33205f241f0988c9e438abc559b2f502979a51ce5f4c8c5a9dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.1.62

2 release files

0.1.61

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page