Skip to main content

Velociraptor Python Library

Documentation Status

Velociraptor catalogues provide a signifciant amount of information, but applying units to it can be painful. Here, the unyt python library is used to automatically apply units to velociraptor data and perform generic halo-catalogue reduction. This library is primarily intended to be used on SWIFT data that has been post-processed with velociraptor, but can be used for any velociraptor catalogue.

The internals of this library are based heavily on the internals of the swiftsimio library, and essentially allow the velociraptor catalogue to be accessed in a lazy, object-oriented way. This enables users to be able to reduce data quickly and in a computationally efficient manner, without having to resort to using the h5py library to manually load data (and hence manually apply units)!

Requirements

The velociraptor library requires:

  • unyt and its dependencies
  • h5py and its dependencies
  • python3.6 or above

Note that for development, we suggest that you have pytest and black installed. To create the plots in the example directory, you will need the plotting framework matplotlib.

Installation

You can install this library from PyPI using:

pip3 install velociraptor

Documentation

Full documentation is available on ReadTheDocs.

Why a custom library?

This custom library, instead of something like pandas, allows us to only load in the data that we require, and provide significant context-dependent features that would not be available for something generic. One example of this is the automatic labelling of properties, as shown in the below example.

from velociraptor import load
from velociraptor.tools import get_full_label

catalogue = load("/path/to/catalogue.properties")

stellar_masses = catalogue.apertures.mass_star_30_kpc
stellar_masses.convert_to_units("msun")

print(get_full_label(stellar_masses))

This outputs "Stellar Mass $M_*$ (30 kpc) $\left[M_\odot\right]$", which is easy to add as, for example, a label on a plot.

Metadata

Release files for velociraptor 0.21.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 velociraptor 0.21.1
File Size Uploaded
velociraptor-0.21.1.tar.gz 88.1 kB Details

Built distribution (wheel)

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

Total release size: 187.4 kB

Release files / velociraptor-0.21.1.tar.gz

Download URL velociraptor-0.21.1.tar.gz
Size 88.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dfe28f14437f391a737b4c7e30aed9f74789683beb17e143fe8b35f4dfcb8aef
BLAKE2b-256 checksum
How to use checksums
5081c7f58cc40325c8db226712c4fc9ca0d0b5ed54fb3d5eb8116616247ca3f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / velociraptor-0.21.1-py3-none-any.whl

Download URL velociraptor-0.21.1-py3-none-any.whl
Size 99.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36ff472cba4efaf68108f4a544a13112e49298add17935ea6278d893b626db89
BLAKE2b-256 checksum
How to use checksums
14f8be93baa618ef8a29d696ddafc726b86f60ea4bbcfa06743182a2c31a8645
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.21.1 This release

2 release files

0.19.0

2 release files

0.16.1

2 release files

0.15.9

1 release file

0.15.6

2 release files

0.15.2

2 release files

0.15.1

1 release file

0.15.0

2 release files

0.14.0

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.3

1 release file

0.12.2

2 release files

0.12.1

1 release file

0.12.0

2 release files

0.11.1

1 release file

0.10.6

1 release file

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.1

2 release files

0.10.0

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.4.1

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

2 release files

0.1.1

2 release files

0.1.0

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