Skip to main content

yt astrophysical analysis modules extension

Project description

The yt Astro Analysis Extension

PyPI version Anaconda-Server Badge DOI Powered by NumFOCUS

CircleCI codecov Documentation Status status

yt-project Code style: black Imports: isort

This is yt_astro_analysis, the yt extension package for astrophysical analysis. This package contains functionality for:

  • Halo finding and analysis
  • Lightcones
  • Planning cosmological simulations for making lightcones and lightrays
  • Exporting to the RADMC-3D radiation transport code
  • Creating PPV FITS cubes

This is primarily machinery that used to be in yt's analysis_modules. These were made into a separate package to allow yt to become less astro-specifc and to allow these modules to be developed on their own schedule.


Full installation documentation can also be found here.


Get the latest release via pip as

python -m pip install yt-astro-analysis

Or with conda, as

conda install -c conda-forge yt-astro-analysis

Note, the package name is spelled with hyphens (yt-astro-analysis) when installing from pip or conda. With pip, the package name can be spelled with either hyphens or underscores, but with conda it must always be hyphens.

From source

To build yt_astro_analysis from source, clone the git repository and install as

git clone
cd yt_astro_analysis
python -m pip install -e .

Installing with Rockstar support

In order to run the Rockstar halo finder from within yt_astro_analysis, it is necessary to install yt_astro_analysis from source. You will need to install rockstar-galaxies from either John Wise's repository or Peter Behroozi's repository. To install Rockstar, do the following:

git clone
cd rockstar-galaxies
make lib

Then, go into the yt_astro_analysis source directory and add a file called "rockstar.cfg" with the path the Rockstar repo you just cloned. Then, install yt_astro_analysis.

cd yt_astro_analysis
echo <path_to_rockstar> > rockstar.cfg
python -m pip install -e .

Finally, you'll need to make sure that the location of is in your LD_LIBRARY_PATH.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_rockstar>

Importing from yt_astro_analysis

For every module that was moved from yt's analysis_modules to yt_astro_analysis, all imports can be changed simply by substituting yt.analysis_modules with yt.extensions.astro_analysis. For example, the following

from yt.analysis_modules.ppv_cube.api import PPVCube


from yt.extensions.astro_analysis.ppv_cube.api import PPVCube


We really want your contributions! As an official yt-project extension, everything in the yt Contributor Guide applies here.

If you'd rather make your own standalone package, we want to support that, too! Please, consider making your package a yt extension.


As an extension of the yt-project, the yt resources are available for help.

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

yt_astro_analysis-1.1.2.tar.gz (1.6 MB view hashes)

Uploaded source

Built Distributions

yt_astro_analysis-1.1.2-cp311-cp311-win32.whl (226.4 kB view hashes)

Uploaded cp311

yt_astro_analysis-1.1.2-cp310-cp310-win32.whl (226.2 kB view hashes)

Uploaded cp310

yt_astro_analysis-1.1.2-cp39-cp39-win32.whl (225.5 kB view hashes)

Uploaded cp39

yt_astro_analysis-1.1.2-cp38-cp38-win32.whl (235.6 kB view hashes)

Uploaded cp38

Supported by

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