Skip to main content

Simulator of Gravitational Lenses

Project description


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

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.

  1. 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.
  2. 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

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

cosmosim-3.1.0b1.tar.gz (28.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cosmosim-3.1.0b1-cp314-cp314t-manylinux_2_28_x86_64.whl (36.4 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

cosmosim-3.1.0b1-cp314-cp314t-macosx_11_0_arm64.whl (30.1 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

cosmosim-3.1.0b1-cp314-cp314-win_amd64.whl (25.3 MB view details)

Uploaded CPython 3.14Windows x86-64

cosmosim-3.1.0b1-cp314-cp314-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

cosmosim-3.1.0b1-cp314-cp314-macosx_11_0_arm64.whl (25.6 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

cosmosim-3.1.0b1-cp313-cp313-win_amd64.whl (24.7 MB view details)

Uploaded CPython 3.13Windows x86-64

cosmosim-3.1.0b1-cp313-cp313-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

cosmosim-3.1.0b1-cp313-cp313-macosx_11_0_arm64.whl (25.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

cosmosim-3.1.0b1-cp312-cp312-win_amd64.whl (24.7 MB view details)

Uploaded CPython 3.12Windows x86-64

cosmosim-3.1.0b1-cp312-cp312-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

cosmosim-3.1.0b1-cp312-cp312-macosx_11_0_arm64.whl (25.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cosmosim-3.1.0b1-cp311-cp311-win_amd64.whl (24.7 MB view details)

Uploaded CPython 3.11Windows x86-64

cosmosim-3.1.0b1-cp311-cp311-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

cosmosim-3.1.0b1-cp311-cp311-macosx_11_0_arm64.whl (25.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file cosmosim-3.1.0b1.tar.gz.

File metadata

  • Download URL: cosmosim-3.1.0b1.tar.gz
  • Upload date:
  • Size: 28.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosmosim-3.1.0b1.tar.gz
Algorithm Hash digest
SHA256 7a4a0424744229d252807197c639e00f5ca20a29cd3b7f980743339d286887a3
MD5 80e2ee272ba05d26b035295cc78b1fd8
BLAKE2b-256 2ab9593bc4d10fe112b943084a40f4b9d128178961e9f7f5f95077ee66f8591c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1.tar.gz:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d26a325bd6eb818de7fcf3efd49db8fee1f3e6f0312f684ae8cd69b8e4797595
MD5 61e971b5cb9498716aba867c6d26e6a8
BLAKE2b-256 420b4dae4fb4bdbb6e86771c2271f28ae402c89b36c008f3fc14ae699f493219

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp314-cp314t-manylinux_2_28_x86_64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb1de5b5a912516096ffff8fcd385e445842c95399f5046c2a479f61241924b1
MD5 c755a86264944196450d6cb0f3dcb02d
BLAKE2b-256 6b8e38817dda16419e9d813bd3032d5278ef384a9a2598bc5f72b69f69e0e1e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.1.0b1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 25.3 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosmosim-3.1.0b1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 0572063d3ecd4c95934fabf9311193e3974902f3f11e04880ceef8c9800ea1c5
MD5 043c5ff7f9ca3851f86c36cacbcdfc2b
BLAKE2b-256 4abf43064c5a95befaaedad6a91ced341381e36d170004167987ae1d8d89be68

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp314-cp314-win_amd64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53cd5cc2fce10aff41f6a2bdc57b8ef2a7c0fd5b399b87b7e69b4644076b34b6
MD5 d9e8094ed8186713b4f4210f6d6e87a4
BLAKE2b-256 02d13df1fcf337f45e5b21f51c04a9254aa366d1135b70c06eb2399c9f12b6e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp314-cp314-manylinux_2_28_x86_64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89284dd82c25d21cda395935c8b519bca8ccd7de5bcf9e1f1f6ab4a76c075a39
MD5 6c2b93b47df23158fc91d9aa9770abdd
BLAKE2b-256 480d29781932aaa1e0a57d57f830e5f7ca12d36cccce0cceae967ff677ffd6c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.1.0b1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 24.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosmosim-3.1.0b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 483b9c559324ae4a22a5194b4f8954c88c971f6374ffe17f9b76fa86e4ed5cda
MD5 1bd54fb33beee0a7be521692fa3f072c
BLAKE2b-256 9c9a90caff107c77b5b7e0847e9fa8755dd4defc7cc8e0b8fe4bd1138eab5223

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp313-cp313-win_amd64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0c8083716f92415ba040ec0978ff2858f151cf84640c6c5103d2c2d12661c50e
MD5 fd73af640a5c100ad207efc5cfa14773
BLAKE2b-256 26b4110ab9b6b2051205a773e806e968efa4aa09709e727293b2c67e55ca560b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0aee903bd26259e232831d352ba3965da2beea5b810ec1c7563f248a2e68fb54
MD5 5eb5bf79b4ef5caeb5334f660624ec60
BLAKE2b-256 90ea6acc368362408711ab3f5f24c94e37606be9b699a08db4160fe9c08d7e70

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.1.0b1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 24.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosmosim-3.1.0b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e379a86b222d3d5f5e0fc2e0043d01bebd39de3693fa7e9c5df5befed81910b9
MD5 2cd285150377eb1a547973d86824acf4
BLAKE2b-256 35c87395a36c8d1c074f5759ec2274a2419b4c4c8e1b6e26b5b2800bf1f233ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp312-cp312-win_amd64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e39468bad73ec57eaaaf949b1047fa6b0da796b7c6dfd272a52a09a85f33be0a
MD5 9561d0fc28e67f87eb2473a9af59b869
BLAKE2b-256 e5f6df465bfcfab09090fa2d1c31d87788f95d77351ccffe19975b0cae60b8db

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1bb6c39600f547d325689dea035b91dc0b46ba4c604872982e32316e36d49973
MD5 ac9e907034998fdc9c75697164f4c358
BLAKE2b-256 198bfbb35e367ebe7be3284b62354f1816940afd1172acf9fde6a5705b54b5ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.1.0b1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 24.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosmosim-3.1.0b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1349205d870c5d0c689198b7a6cea09e60ee187732a29c0f7b10bbcddc69dd9b
MD5 94342d393fbb6021915dc4cfc51c173f
BLAKE2b-256 6ec690ca7eba3b7687f67b8712853f1d37f0d821ed58bce2729dc8b381b71fa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp311-cp311-win_amd64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68652f33787a11a9f877c0c40897b3a5abe44a3e5f1ddaeca9da02e10ce33c04
MD5 9945aef181b683c91d0546cdca902840
BLAKE2b-256 38161dcd0d2a814344bb98400d5b84bda1ead388a35b844ec76968055ac0142d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmosim-3.1.0b1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.1.0b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f2a89ac0cdb0719152f3d061a2e1d0b0b2025a4f3a44f1c23bfa123266be73e4
MD5 cd337ee3fc5ee90abd1f1d898a4b863d
BLAKE2b-256 d30080d7e15d9a5568a6718adb6047b99269911f1dc57f955d942eaf64130f53

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.1.0b1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: pypideploy.yml on CosmoAI-AES/CosmoSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page