Skip to main content

Welcome to aurel’s documentation!



Aurel is an open source Python package for numerical relativity analysis. Designed with ease of use in mind, it will automatically calculate relativistic terms.

Key Features

  • Comprehensive tensor calculations:
  • Dynamic computation and intelligent caching: Aurel automatically calculates only what's needed and caches results, significantly improving performance for complex calculations
  • Clear user feedback: Progress bars and informative messages guide you through computations
  • Time evolution support: Tools for analyzing data across multiple time steps (documentation, example)
  • Flexible data input: Works seamlessly with numerical simulation data, analytical solutions, or custom numpy arrays
  • Einstein Toolkit integration: Native support for reading Carpet HDF5 outputs from Einstein Toolkit simulations (documentation, example)
  • Advanced finite difference schemes: Multiple discretization schemes for 3D spatial grids
  • Built-in analytical solutions: Pre-implemented spacetimes for testing and validation (examples)

Installation

Requirements:

Install aurel using pip (all other dependencies will be installed automatically):

pip install aurel

To get the latest development version:

pip install git+https://github.com/robynlm/aurel.git@development

Getting started

Start your Python session on a jupyter notebook or in a Python script and import the aurel.AurelCore class:

   
   import aurel
   
   # Define your grid parameters
   param = {
       'Nx': 64, 'Ny': 64, 'Nz': 64,
       'xmin': -1.0, 'ymin': -1.0, 'zmin': -1.0,
       'dx': 0.03125, 'dy': 0.03125, 'dz': 0.03125,
   }
   
   # Initialize the finite difference class
   fd = aurel.FiniteDifference(param)
   
   # Initialize the AurelCore class
   rel = aurel.AurelCore(fd)

At this point you need to provide the spacetime metric, extrinsic curvature and matter fields (see assumed quantities), otherwise these are assumed to correspond to Minkowski vacuum. These are passed as numpy arrays to aurel in the following way:

# Define the xx component of the spacetime metric
rel.data['gxx'] = np.ones((param['Nx'], param['Ny'], param['Nz']))

and so on for the other components and required quantities. In this example $g_{xx} = 1$, but you can pass any numpy array; it can be of numerical relativity simulation data, or an array generated from an analytical expression. Take care to run rel.freeze_data() so that your input data is conserved during the cache cleanup.

With everything defined, you can call any entity listed in the descriptions list. Just call it as:

rel["name_of_the_entity"]

Aurel will automatically do its best to calculate any relativistic term you ask for.

For a more in depth example, see the example notebook for applications. Additionally, a symbolic counterpart that works in a very similar way is also available via the aurel.AurelCoreSymbolic class, see the symbolic example notebook for details.

Calculations over time

If you want calculations over multiple moments in coordinate time, you can use the aurel.over_time function. First, create a dictionary containing the spacetime and matter fields over time:

# Define the spacetime metric gxx over time
data = {
    'gxx': [np.ones((param['Nx'], param['Ny'], param['Nz'])),
            np.ones((param['Nx'], param['Ny'], param['Nz']))],
    ...
}

That is a data dictionary with keys the names of the quantities, and values a list of numpy arrays, one for each time step. Calculations will be performed for each of these time steps as:

data = aurel.over_time(
   data, fd, 
   vars=['name_of_the_entity', ..., {'custom_quantity': custom_quantity}], 
   estimates=['name_of_estimate', ..., {'custom_estimate': custom_estimate}],
   **kwargs)

where vars is a list of entities to calculate at each time step (available terms are in the descriptions list, but you can also pass custom functions to calculate your own quantities). Likewise estimates is a list of estimates to calculate at each time step (available functions are in the estimates list, but you can also pass custom functions to calculate your own estimates). See the time evolution example for more details.

Citation

If you use aurel in your work, please cite or reference the arXiv preprint in the following way:

Munoz, R. L., Byrnes, C. T., & Roper, W. J. (2026). aurel: A Python package for automatic relativistic calculations. DOI:10.48550/arXiv.2602.00155
@misc{aurel2026,
  title         = {aurel: A Python package for automatic relativistic calculations},
  author        = {Robyn L. Munoz and Christian T. Byrnes and Will J. Roper},
  year          = {2026},
  doi           = {10.48550/arXiv.2602.00155},
  eprint        = {2602.00155},
  archivePrefix = {arXiv},
  primaryClass  = {astro-ph.IM},
  url           = {https://robynlm.github.io/aurel/}
}

This code is not published yet, so to add to citation count please also include its predecessor:

Munoz, R. L., & Bruni, M. (2023). EBWeyl: a Code to Invariantly Characterize Numerical Spacetimes. Classical and Quantum Gravity, 40(13), 135010. DOI:10.1088/1361-6382/acd6cf
@article{R.L.Munoz_M.Bruni_2023,
  title     = {EBWeyl: a Code to Invariantly Characterize Numerical Spacetimes},
  author    = {Robyn L. Munoz and Marco Bruni},
  journal   = {Classical and Quantum Gravity},
  volume    = {40},
  number    = {13},
  pages     = {135010},
  year      = {2023},
  month     = {jun},
  doi       = {10.1088/1361-6382/acd6cf},
  archivePrefix = {arXiv},
  eprint    = {2211.08133},
  primaryClass = {gr-qc}
}

Metadata

Release files for aurel 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aurel 0.10.0
File Size Uploaded Provenance Actions
aurel-0.10.0.tar.gz 108.8 kB Without provenance Details for aurel-0.10.0.tar.gz

Built distribution (wheel)

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

Total release size: 198.2 kB

Release files / aurel-0.10.0.tar.gz

Download URL aurel-0.10.0.tar.gz
Size 108.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8215180ef07dbb743e8c0f44414a8c6c7d517b114f27c5dbaa2caffe246a2db8
BLAKE2b-256 checksum
How to use checksums
d99c7d542fd97e42f1fb16ba37ed0ecea6aba7e83f206f381b99b18a96cdd907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / aurel-0.10.0-py3-none-any.whl

Download URL aurel-0.10.0-py3-none-any.whl
Size 89.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92ae9e616bac3667037675f5083e71b73f5c16f631f4322f0617af61db906992
BLAKE2b-256 checksum
How to use checksums
6e42494ced9750fa691d4686e6a9e1ecae5adae8f4b9cdb3118876f0c3054983
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for aurel 0.10.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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