title: The CosmoAI project
The CosmoSim software
This project provides a simulator for gravitational lensing based on Chris Clarkson's Roulettes framework. The code is experimental, and intended for research, with many loose ends. If you think it may be useful, we shall be happy to discuss collaboration and help you get started.
The core team is
- Dr. Ben David Normann - computer science and mathematics
- Hans Georg Schaathun - cosmology and mathematics Documentation is being written at https://cosmoai-aes.github.io/, but it still incomplete and fragmented.
Installation Guide
CosmoSim is set up to build python packages (wheels) that can be installed with pip.
pip install CosmoSim
We successfully build CosmoSim for Linux/x86_64, MacOS/arm, and Windows/amd64, for python 3.11 through 3.14 (the free-threaded 3.14t build is available on Linux and macOS).
To build locally from source, you can run (from the root of the repo),
pip install build
python -m build
This is highly dependent on the local configuration, and may fail for a number of reasons. If it succeeds, the binary file for the python module appears under src/CosmoSim.
If you can build, pip can also install the package from the working directory. Again, from the root of the repo,
pip install .
For non-standard building, see BUILD.md.
Running the GUI
python3 -m CosmoSim.GUI
The GUI tool is hopefully quite self-explanatory.
The images shown are the actual source on the left and the distorted (lensed)
image on the right.
The Command Line Interface (CLI)
An illustrative test set can be generated by the following command.
mkdir images
python3 -m CosmoSim -CR -Z 400 --csvfile Datasets/debug.csv --directory images
This generates a range of images in the newly created images directory.
The flags may be changed; -C centres det distorted image in the centre
of the image (being debugged); -Z sets the image size; -R prints an
axes cross.
Further documentation and examples are found on the web site,
Versions
- The imortant git branches are
- develop is the current state of the art
- pypitest is used for final testing with automatic deployment to the PyPI test index.
- master should be the last stable version
- Releases
- v-test-* are test releases, used to debug workflows. Please ignore.
- see the releases on githun and CHANGELOG.md
- Prior to v2.0.0 some releases have been tagged, but not registered
as releases in github.
- v0.1.0, v0.2.0, v1.0.0 are versions made by the u/g students Spring 2022.
- v1.0.1 is cleaned up to be able to build v1.0.0
Caveats
The simulator makes numerical calculations and there will always be approximation errors.
- The images generated from the same parameters have changed slightly between version. Some changes are because some unfortunate uses of integers and single-precision numbers have later been avoided, and some simply because the order of calculation has changed.
- The SIS model is implemented in two versions, one rotating to have the source on the x-axis and one working directly with arbitrary position. Difference are not perceptible by visual comparison, but the difference image shows noticeable difference.
Contributors
The initial prototype was an undergraduate final year project by Ingebrigtsen, Remøy, Westbø, Nedreberg, and Austnes (2022). The software includes both a GUI simulator for interactive experimentation, and a command line interface for batch generation of datasets.
- Idea and Current Maintainance Hans Georg Schaathun hasc@ntnu.no
- Mathematical Models Ben David Normann
- Initial Prototype Simon Ingebrigtsen, Sondre Westbø Remøy, Einar Leite Austnes, and Simon Nedreberg Runde
- Other Contributors Lars Ivar Hatledal, Oda Hjemli
Release files for CosmoSim 3.1.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 | |
|---|---|---|---|
| cosmosim-3.1.1.tar.gz | 29.2 MB | Details |
Built distributions (wheels)
Total release size:422.7 MB
Release files / cosmosim-3.1.1.tar.gz
| Download URL | cosmosim-3.1.1.tar.gz |
|---|---|
| Size | 29.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bf5bcf97e0301a8eb0419a4e4fa03624bfc66582ae00acd76b20f71b787183f
|
|
BLAKE2b-256 checksum How to use checksums |
124bdde11aac9a4e7940d18b53cad16b5eb4014f72a9be25148cee479685f380
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | cosmosim-3.1.1-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 37.1 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
52b90fa029322e75e1328ae8cb6cfab3b143f72fc8183d5208ae11303e8cbc32
|
|
BLAKE2b-256 checksum How to use checksums |
85c6a5e0a7040621c1686dfed9afee595c9482241a40d6d7792afb7707fc1b4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | cosmosim-3.1.1-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 30.8 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
47ed0b425a6a6f6e146af7241705de17195ba231a5a2473e780e23f5746715df
|
|
BLAKE2b-256 checksum How to use checksums |
b809fe537b88c471c9c0f2b14f2c9e26a4c70ed3f711c1c58dd824fba170af9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp314-cp314-win_amd64.whl
| Download URL | cosmosim-3.1.1-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 26.0 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e458d7e7bdc8422ebc57435e8eb9fb132c125f0bc3ebfb6e8a3ab4ce354c509e
|
|
BLAKE2b-256 checksum How to use checksums |
6eaf73c540bed281f2b54b472dc2bf64166508e0ff0c5d77da4e6a07e4bd280c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | cosmosim-3.1.1-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 29.5 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1114bab171ec1c41bf2ac8e65f81f834ec2d952253aa5c21de1bd4128a7c8cca
|
|
BLAKE2b-256 checksum How to use checksums |
0221b54172818b9683977b84d416643065632aaf083bc3d8aeae1ac6a6b36b32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | cosmosim-3.1.1-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 26.3 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
393db65d92950318f8a3c4a93c591b97f17c9acfdd9397cebbdcad0e29f721e5
|
|
BLAKE2b-256 checksum How to use checksums |
2669a4b786c35a4cc346cdf4591b9ebe4f0e7ff97eeeb271e1f8a04b7121ab34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp313-cp313-win_amd64.whl
| Download URL | cosmosim-3.1.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 25.4 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4a96f64973988aaddd342f7ff6957619f650b740f1ea01b6251bb615f0115663
|
|
BLAKE2b-256 checksum How to use checksums |
ded80001e0145b0fab538208e09a7b0a1bbd0d37edf130a95dd9d5b4083867df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | cosmosim-3.1.1-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 29.5 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e84a01377dcf6b2ad9f63121e29b02a3d24dc856244779cd1ef3e9ef61ef0b10
|
|
BLAKE2b-256 checksum How to use checksums |
537262882a973c46ed47a7a4a4bfa35e13a1f6ab6c74ffa26b6b305eb4bded45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | cosmosim-3.1.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 26.3 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1dfe03307cd2d3d0933cbb64d18112ad3b556728dcf9ceeac5bd55c0ba1baa89
|
|
BLAKE2b-256 checksum How to use checksums |
c78d14a020705b502518dc4b06bf1b6e05654230665e24e091066a31af20d874
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp312-cp312-win_amd64.whl
| Download URL | cosmosim-3.1.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 25.4 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
eb0fc3706fc8e3f647d34b559c1a1e70546d5e93e5ee7f99cff397725c5e63a0
|
|
BLAKE2b-256 checksum How to use checksums |
eda7e206a1511ac69b6bc04f01707ab3fe0a776f1dd332ca7b70cf2b97dab2a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | cosmosim-3.1.1-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 29.5 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
cee60530d651916a46a59ec6ca26dfb677394581482dbf3255bfa78b04ecf1c7
|
|
BLAKE2b-256 checksum How to use checksums |
58cfbbd60907b0f5ef0d85f4a60ee9ebfa1fdcabdd751794f3c78e9b4b293e94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | cosmosim-3.1.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 26.3 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8b743fa95ba5802415afcc09cfd121b728ecb92563104b31b8e4df1272c465cc
|
|
BLAKE2b-256 checksum How to use checksums |
6f2d0d10c9e91cbe6ffe854eaaa6a64d6b66ae5d8dc1fb93f467ca487864296f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp311-cp311-win_amd64.whl
| Download URL | cosmosim-3.1.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 25.4 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
75b36ba304bffafe6b61468167279e815c8111f72efb80a542105e6801fc26d0
|
|
BLAKE2b-256 checksum How to use checksums |
d212821b3fb14edb53596839254b67f99a3835df38f32f3320f2c88b88837774
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | cosmosim-3.1.1-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 29.5 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2bdc289fe444251ede87fbc46d7a6518a93311b8066ca1922b76c2bc28081f8a
|
|
BLAKE2b-256 checksum How to use checksums |
45bec566099be87b1bf89cb44ec3bb2b563eb8bbcc9595c66dd518680f829373
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency logRelease files / cosmosim-3.1.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | cosmosim-3.1.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 26.3 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d8056338c959f8060ab148116119850b352800f2514ecd83cc0775e539b501e1
|
|
BLAKE2b-256 checksum How to use checksums |
54c32d9b314cb0572905576d8424f9ddd0689f6a129b97851146878341fb340b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 1, 2026.
Transparency log