Skip to content

elkogerville/VisualAstro

Repository files navigation

            /$$                            /$$                    /$$
           |__/                           | $$                   | $$
 /$$    /$$ /$$  /$$$$$$ /$$  /$$  /$$$$$ | $$  /$$$$$   /$$$$$ /$$$$$$   /$$$$$   /$$$$$$
|  $$  /$$/| $$ /$$____/| $$ | $$ |____ $$| $$ |____ $$ /$$___/|_  $$_/  /$$__ $$ /$$__  $$
 \  $$/$$/ | $$|  $$$$$ | $$ | $$  /$$$$$$| $$  /$$$$$$|  $$$$$  | $$   | $$ \__/| $$  \ $$
  \  $$$/  | $$ \___  $$| $$ | $$ /$$__ $$| $$ /$$__ $$ \___  $$ | $$ /$| $$     | $$  | $$
   \  $/   | $$ /$$$$$$/|  $$$$$/|  $$$$$$| $$|  $$$$$$ /$$$$$$/ |  $$$$| $$     |  $$$$$$/
    \_/    |__/|______/  \_____/  \______/|__/ \______/|______/   \___/ |__/      \______/

VisualAstro

PyPI Version Tests

VisualAstro is an astrophysical visualization system with functions for easy visualization and manipulation of common astronomical data. The package is developed with ease of use in mind, modularity, and making publication-ready plots with minimal commands.

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 cmasher colorspacious dust_extinction matplotlib numpy regions reproject scienceplots scipy specutils tqdm

Optionally, you can install optional dependencies as well if you plan to use related functionalities:

$ conda install -c conda-forge spectral-cube

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!

Features

  • Unified interface for matplotlib, astropy, numpy, spectral-cube, specutils, and other astronomy packages
  • High-level wrappers of common functions and algorithms used in astrophysical research
  • Custom matplotlib style sheets optimized for publication-quality figures
  • Full compatibility with WCS, FITS, and astropy units

Documentation

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

Check the examples/ folder for notebook tutorials!

The full documentation can be found on github at https://github.com/elkogerville/VisualAstro

Dependencies

VisualAstro requires:

astropy, cmasher, colorspacious, dust_extinction, matplotlib, numpy, regions, reproject, scienceplots, scipy, specutils, tol_colors, and tqdm.

Optional dependencies

Optionally, some functionalities of VisualAstro requires:

  • Cube data: spectral-cube

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.

Credits

Fonts

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},
}

About

Astrophysical Plotting System

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages