SWIFT-Emulator
The SWIFT-emulator (henceforth 'the emulator') was initially designed for SWIFT outputs, and includes utilities to read and write SWIFT data.
The emulator can be used used to predict
outputs of simulations without having to run them, by employing Gaussian Process
Regression with george and sensitivity analysis with SALib.
Dcumentation is available at ReadTheDocs.
Predicting Simulations
The emulator can predict a given scaling relation (the relationship between two output variables in a simulation, for instance the masses of galaxies and their size) when varying the underlying physical model simulated in a continuous way.
As an example from cosmological simulations, imagine varing the energy that supernovae
release when they explode as a parameter x. This affects both the sizes and masses of galaxies.
The emulator, using a few 'base' simulations, performed with the real code,
at various values of x spaced evenly throughout the viable region, can predict
what the shape of the relationship between mass and size would be at other values
of x, given that it has been trained on the base simulation outputs.
Why SWIFT Emulator?
The emulator works at a much higher level than other Gaussian Process Regression
libraries, such as george (which it is built on).
Working with base machine learning libraries can be tricky, as it typically requries knowledge of how to structure input arrays in a specific way (both for training and prediction). They also rarely also include model design routines. Additionally, validation and visualisation routines are typically missing.
The SWIFT Emulator package provides a one-stop solution, with a consistent API, for developing a model design, running it (if using SWIFT), reading in data ( again if using SWIFT), building an emulation model, validating said model, comparing the model against ground-truth data across parameter space (e.g. observations), and visualising the results.
Installation
The package can be installed easily from PyPI under the name swiftemulator,
so:
pip3 install swiftemulator
This will install all necessary dependencies.
The package can be installed from source, by cloning the repository and
then using pip install -e . for development purposes.
Requirements
The package requires a number of numerical and experimental design packages.
These have been tested (and are continuously tested) using GitHub actions CI
to use the latest versions available on PyPI. See requirements.txt for
details for the packages required to develop SWIFT-Emulator. The packages
will be installed automatically by pip when installing from PyPI.
Authors
- Roi Kugel (@Moyoxkit)
- Josh Borrow (@jborrow)
Metadata
Release files for swiftemulator 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swiftemulator-1.3.1.tar.gz | 55.9 kB | Without provenance | Details for swiftemulator-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swiftemulator-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for swiftemulator-1.3.1-py3-none-any.whl |
Total release size: 129.9 kB
Release files / swiftemulator-1.3.1.tar.gz
| Download URL | swiftemulator-1.3.1.tar.gz |
|---|---|
| Size | 55.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0be37fdc156ace7f24356f1fdb88666dda8d067d82df60e2b488c65331a2dc6d
|
|
BLAKE2b-256 checksum How to use checksums |
aeae6976fc10c9c7d10efd5ad49139ce96e8d2fc7bc87cc594ee904d3d780c4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.22
|
Release files / swiftemulator-1.3.1-py3-none-any.whl
| Download URL | swiftemulator-1.3.1-py3-none-any.whl |
|---|---|
| Size | 73.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ef0465847377bfa3bf2f33e93e31ec2dc146f832aff3c31438bc6f2c0ff3eb7
|
|
BLAKE2b-256 checksum How to use checksums |
29c589645e19849334245a191ba0c8084bc5ed0cd76f9b53213d672e308316ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.22
|
Security for swiftemulator 1.3.1
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.