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.0.5.tar.gz (29.0 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.0.5-cp314-cp314t-manylinux_2_28_x86_64.whl (36.9 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

cosmosim-3.0.5-cp314-cp314t-macosx_11_0_arm64.whl (30.7 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

cosmosim-3.0.5-cp314-cp314-win_amd64.whl (25.9 MB view details)

Uploaded CPython 3.14Windows x86-64

cosmosim-3.0.5-cp314-cp314-manylinux_2_28_x86_64.whl (29.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

cosmosim-3.0.5-cp314-cp314-macosx_11_0_arm64.whl (26.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

cosmosim-3.0.5-cp313-cp313-win_amd64.whl (25.2 MB view details)

Uploaded CPython 3.13Windows x86-64

cosmosim-3.0.5-cp313-cp313-manylinux_2_28_x86_64.whl (29.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

cosmosim-3.0.5-cp313-cp313-macosx_11_0_arm64.whl (26.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

cosmosim-3.0.5-cp312-cp312-win_amd64.whl (25.2 MB view details)

Uploaded CPython 3.12Windows x86-64

cosmosim-3.0.5-cp312-cp312-manylinux_2_28_x86_64.whl (29.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

cosmosim-3.0.5-cp312-cp312-macosx_11_0_arm64.whl (26.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cosmosim-3.0.5-cp311-cp311-win_amd64.whl (25.2 MB view details)

Uploaded CPython 3.11Windows x86-64

cosmosim-3.0.5-cp311-cp311-manylinux_2_28_x86_64.whl (29.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

cosmosim-3.0.5-cp311-cp311-macosx_11_0_arm64.whl (26.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file cosmosim-3.0.5.tar.gz.

File metadata

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

File hashes

Hashes for cosmosim-3.0.5.tar.gz
Algorithm Hash digest
SHA256 a86443f03da8516c53c249800afe00e8319dd72be70a2f16095122297897e714
MD5 52454fa364722d0e5d78b10f213c6cc4
BLAKE2b-256 4d3f53e16408ab2184980d9bdc78fe05b30abd23fbe6ce24db373a822b126238

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5.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.0.5-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3595595a5618dbab4dd005e786a3cac27c7a4dc1616d4805563945e7d9f810f2
MD5 54f47bb7a44f3ea3ea41e667a07819e5
BLAKE2b-256 355db7b9b3ccb7aa4658c92baf268e41adb04c32b614b43f70cb287fe42c32d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7ddc1afe550a34b00fae6ca667820685810fd26c81dda915b365014d01563cfd
MD5 7a701e1fc853dfb33f3d2928ac182e2b
BLAKE2b-256 0cd89dd2d13c3fedeb01b8e40e10d96f155b3c00723336f74f6f9e201fbc3df0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.0.5-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 25.9 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.0.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 86a92c362f5b1eabdf7f934d288fe52ff0d28dad652af40cdf3b3a88f992fdd7
MD5 a238247fde0140f7295aa7f6cb41fb5f
BLAKE2b-256 44acf8203f8a21d31f5ea73cfd824ec55e7cb783b1bfaa35e96ddedea4aa5ffe

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 902ef64f23f2f795ce1ad8b6d1bb75d9eefa965300f3571f7cf04f6bf8299ab2
MD5 743128bb12f1f278d2b8abb73af860d9
BLAKE2b-256 f6fafe72a16bdf9f4dc34b1a57f0393b2a160f8f88186157d55537c3ad2dedae

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 730027fac9dc18a2dba931b38c7dbd287d1525379e0b0e104584daa772a0c302
MD5 177e7501cefe445c2fe5d8e77685511a
BLAKE2b-256 7f504f35e5987e53cd9e23a8c197b7c9e3972857790b0356b44113fbad84e476

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.0.5-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 25.2 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.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8b601f30c09756187661931725cf518c17be7fc4f7497a71d69bf86f4e66e94f
MD5 53fda2c320f0679d9a4ee1fd7d20902d
BLAKE2b-256 91f67ea438cf6950142ec657ebe40a4d713d532f351806c0920bab9d53cddbf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b65f756f914ef08a1d00b7827d56525a84d2dec16b6b1a69b7663652fca7d563
MD5 a4ff9eaa555de2f8efd3b73115735890
BLAKE2b-256 c4c82eb7762b5db7eac1031de72692cbe27ef5c54a3dec73a28e24f9fd51ea19

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3981a62b45e66f8e10e3c3a5582fbe949fbad4c1dc1c0e96f60462eae66630d6
MD5 310f91b1bf432a2c44ae0f28bee5001c
BLAKE2b-256 ffc5e1e7171dcdf862ca98480d6a7ee38b1d71e4ed861685bac707f03dcee5de

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.0.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 25.2 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.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0cf4452b6322debc4a050cfbcd0031ae82e9fb30703d45ecd0d03c880aeba4ac
MD5 1ef4ea2ed1f6a26d6d16366c8a8a30b8
BLAKE2b-256 e930a45eebd33ca98b108634821129364816fda3d188024a13ae5658ce8fe951

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 54aaf6ebab4905f952547e650ca24b24c0a6a13d1a4db66caa6344545f31ceb0
MD5 f7bebbb209875983313c1c867814d7c7
BLAKE2b-256 4fa8687bfb4a5b846441c24de8d18b427e49be868a87bb12e8de227ade461c91

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e1b9222f5e6ae355ca5fdc7ea9bdff727b1924d241c593346893f9e255f222f
MD5 52f10ac364fdac7ae7723e556f10d5c8
BLAKE2b-256 935d4926b9cb9ff076b452dad66369d4f79e7462845ec980f3f5aac4bf359db0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cosmosim-3.0.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 25.2 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.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 98fccf34e62e9f1b9b78e46321a8075b20924eac7afe6ca31942df22f89ff6c4
MD5 bca007a35f1fe786ef90163ed0e08726
BLAKE2b-256 8fdf569b4cf521812753818a7790105d6cb01ed518d6d646e74a8821998c219b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d5588d40e7796cf87fff67f7a1cf61ddaec034e5bb13876f897a828a158c6359
MD5 9b311cc402eec3261c1cfc71ffc48b13
BLAKE2b-256 33215d041ed83b3364a0c3de131ea02a8eb18ec8fd90ee49dde1d62f7e9eeca6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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.0.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmosim-3.0.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d1ef5f1c5e4e4f663434065ec43749a70e1be155c857a0d470692f533de5d30b
MD5 4f35716f22adb518fb55e9b8096194ba
BLAKE2b-256 28690f360a6f09010a22a3b0bb57007cb0a941a3cf2f82fba3deeeadb609de1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmosim-3.0.5-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