Skip to main content

SWIFTsim (swiftsim.com) i/o routines for python.

Project description

SWIFTsimIO

Build Status Documentation Status JOSS Status

The SWIFT astrophysical simulation code (http://swift.dur.ac.uk) is used widely. There exists many ways of reading the data from SWIFT, which outputs HDF5 files. These range from reading directly using h5py to using a complex system such as yt; however these either are unsatisfactory (e.g. a lack of unit information in reading HDF5), or too complex for most use-cases. swiftsimio provides an object-oriented API to read (dynamically) data from SWIFT.

Full documentation is available at ReadTheDocs.

Getting set up with swiftsimio is easy; it (by design) has very few requirements. There are a number of optional packages that you can install to make the experience better and these are recommended.

Requirements

This requires python v3.8.0 or higher. Unfortunately it is not possible to support swiftsimio on versions of python lower than this. It is important that you upgrade if you are still a python2 user.

Python packages

  • numpy, required for the core numerical routines.
  • h5py, required to read data from the SWIFT HDF5 output files.
  • unyt, required for symbolic unit calculations (depends on sympy`).

Optional packages

  • numba, highly recommended should you wish to use the in-built visualisation tools.
  • scipy, required if you wish to generate smoothing lengths for particle types that do not store this variable in the snapshots (e.g. dark matter)
  • tqdm, required for progress bars for some long-running tasks. If not installed no progress bar will be shown.
  • py-sphviewer, if you wish to use our integration with this visualisation code.

Installing

swiftsimio can be installed using the python packaging manager, pip, or any other packaging manager that you wish to use:

pip install swiftsimio

Citing

Please cite swiftsimio using the JOSS paper:

@article{Borrow2020,
  doi = {10.21105/joss.02430},
  url = {https://doi.org/10.21105/joss.02430},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {52},
  pages = {2430},
  author = {Josh Borrow and Alexei Borrisov},
  title = {swiftsimio: A Python library for reading SWIFT data},
  journal = {Journal of Open Source Software}
}

If you use any of the subsampled projection backends, we ask that you cite our relevant SPHERIC paper. Note that citing the arXiv version here is recommended as the ADS cannot track conference proceedings well.

@article{Borrow2021
  title={Projecting SPH Particles in Adaptive Environments}, 
  author={Josh Borrow and Ashley J. Kelly},
  year={2021},
  eprint={2106.05281},
  archivePrefix={arXiv},
  primaryClass={astro-ph.GA}
}

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

swiftsimio-9.0.2.tar.gz (118.9 kB view details)

Uploaded Source

Built Distribution

swiftsimio-9.0.2-py3-none-any.whl (134.0 kB view details)

Uploaded Python 3

File details

Details for the file swiftsimio-9.0.2.tar.gz.

File metadata

  • Download URL: swiftsimio-9.0.2.tar.gz
  • Upload date:
  • Size: 118.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for swiftsimio-9.0.2.tar.gz
Algorithm Hash digest
SHA256 3d2a5fd121e90070288cdf6f4612e60dbe9a6327ec17841997ce21092feac05f
MD5 318afaf43c5f22ba68d9fb2eca504e9e
BLAKE2b-256 f400a29a0b505ecce8ec495f743d0d9d4bebf1899dbd3668b7dbacce4163b960

See more details on using hashes here.

File details

Details for the file swiftsimio-9.0.2-py3-none-any.whl.

File metadata

  • Download URL: swiftsimio-9.0.2-py3-none-any.whl
  • Upload date:
  • Size: 134.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for swiftsimio-9.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06e5511f9cc547e09085c816ab80bb50f23280c900135ae3ea4fdc894834a54d
MD5 2848512e22f3ed2bf863c3890d649e0f
BLAKE2b-256 3fb3041d2761b3eaf8f3f87c44a68651ac9f8a1e26d87de3f8211110db84db5f

See more details on using hashes here.

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