Velociraptor catalogue reading routines.
Project description
Velociraptor Python Library
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:
unytand its dependenciesh5pyand its dependenciespython3.6or 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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file velociraptor-0.20.0.tar.gz.
File metadata
- Download URL: velociraptor-0.20.0.tar.gz
- Upload date:
- Size: 88.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da0c0120324be4c4a9d966028e3fe0e1c8d7631c74fffc49538366580e464106
|
|
| MD5 |
4e8f2be4c111b6fc2736cdabca6034ee
|
|
| BLAKE2b-256 |
d872c589341c58c62079fd70f22ef7cdcd1ddf503f9116bc0ee61b5f5496cd23
|
Provenance
The following attestation bundles were made for velociraptor-0.20.0.tar.gz:
Publisher:
python-publish.yml on SWIFTSIM/velociraptor-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
velociraptor-0.20.0.tar.gz -
Subject digest:
da0c0120324be4c4a9d966028e3fe0e1c8d7631c74fffc49538366580e464106 - Sigstore transparency entry: 231064238
- Sigstore integration time:
-
Permalink:
SWIFTSIM/velociraptor-python@f5085e3341d0a34af24bf848220c5e6024ccf1e1 -
Branch / Tag:
refs/tags/v0.20.0 - Owner: https://github.com/SWIFTSIM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f5085e3341d0a34af24bf848220c5e6024ccf1e1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file velociraptor-0.20.0-py3-none-any.whl.
File metadata
- Download URL: velociraptor-0.20.0-py3-none-any.whl
- Upload date:
- Size: 99.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f788847d7c8d7cb195a5b829e5cf7e015a7eef8bd3dfd91ca9717e5c0a25258
|
|
| MD5 |
5be04e8b1a33c005efbb57aab945739a
|
|
| BLAKE2b-256 |
b765487b01bfe7fee902ab0321ea7160197ba65d8cdc04699fe5c65f60a798a7
|
Provenance
The following attestation bundles were made for velociraptor-0.20.0-py3-none-any.whl:
Publisher:
python-publish.yml on SWIFTSIM/velociraptor-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
velociraptor-0.20.0-py3-none-any.whl -
Subject digest:
4f788847d7c8d7cb195a5b829e5cf7e015a7eef8bd3dfd91ca9717e5c0a25258 - Sigstore transparency entry: 231064244
- Sigstore integration time:
-
Permalink:
SWIFTSIM/velociraptor-python@f5085e3341d0a34af24bf848220c5e6024ccf1e1 -
Branch / Tag:
refs/tags/v0.20.0 - Owner: https://github.com/SWIFTSIM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f5085e3341d0a34af24bf848220c5e6024ccf1e1 -
Trigger Event:
release
-
Statement type: