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.0.tar.gz (29.2 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.0-cp314-cp314t-manylinux_2_28_x86_64.whl (37.1 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: cosmosim-3.1.0.tar.gz
  • Upload date:
  • Size: 29.2 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.0.tar.gz
Algorithm Hash digest
SHA256 651b95473bb5fcb38bc313fa84157c57e7b79fac8fbb9cbf8ca3d19198448b24
MD5 3f658837074d182e94ea81ad55953cca
BLAKE2b-256 dc7106bf414a9a5690c4452b6a59e6520fd72a641c2c6404dc1706d100d6514a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1dbaf38da8a980d4df6d310fd83cc078ffe3800dec98a9c7e6d6201bbe8818f9
MD5 19fdf3ff647eb177d2cbca94f15fb324
BLAKE2b-256 011414c3e36402e5c8f14a0acd4a39924373ecb586d2804bc144751e8212a737

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a13100b7e36a360c433841c17f82edd388b3851bbc9b97de3696b1afa93870d8
MD5 324fad8c56a103561c7ba87b7133b145
BLAKE2b-256 e4cb972cbbf51be84f9e7d54b6712c486da040341faef7b70de51da6f24d7724

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.1.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 26.0 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.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 b8dfbcf0970f31f83668c63d7e7e62af71e0d3aa5e8b07b3b3619c428b2ed6a4
MD5 fc6481c9ea38c8a1cec77c9cf58fa682
BLAKE2b-256 573aea85670ec79b94d29b68bd1ae3344f5bcf547cffbcfa9d300b22c8377881

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d159f83084ca9d91b2a3ba924d21400022aeef7e9c4065b960695156985f1b91
MD5 495a816b600902329c7e427c9bc53d7e
BLAKE2b-256 f82fad22e0e012532ec69111084b245bf9b03119abd6b21efb3732b81010542f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0dc4f397ec0c424114d53a7d61c84c8706973b479a58ee421c44e68f68c31f62
MD5 e54950e6f5e124b58b44f69b47ae0f2c
BLAKE2b-256 b7d4179b23c2e4cbc75ccc3fd409a76b37f5e25164cc05a6c7e43d145b302a21

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 25.4 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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9ae68493617d008eed3e307d17cbea13ed571b06a487984d57e7f7a276b6a11d
MD5 3aa1186f482e537f12dde808c0a0fcc0
BLAKE2b-256 debcccb4ace2212f42804c5722138e8ead9a62c33591e8b6b485105e42273db9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a324031933c5efb57352be84e2acf95ce6fce860a710ec61ed0c57977482f15a
MD5 c4dc9d85ef74321b477086dad4e6bd85
BLAKE2b-256 36656b8e294ccd26890e1e23c1b0f8228e8cd432d284d955082200fa9d7cc219

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dcb3977ed4b3502a289a3b24e2621b991491f9cccc909e4c0af00daf72616cfb
MD5 db616ac47574c9744a440d96dfeabf0c
BLAKE2b-256 88f5cb07fe4b3a6d09b996a46d351c08a0e53b2b7629bb424b1951b90850d728

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 25.4 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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fa9f4545e0a1712b0608760ecbba681a2470ffe3e470562e4a7e8908d2a53eda
MD5 c2d89019b56f3ac1bca4f8af6e794e5b
BLAKE2b-256 5dc77ed0ac5e3b828c63fe9082147aa2652093a25abf14a6c956bfcf58007faa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b09a50a1311374a73010d8fc9d192ff733cba4f937d6ec40e4bd6a6f1b4dd31e
MD5 e10bd39267d070fafa2da8d6768b3796
BLAKE2b-256 d8dd1a44e84743a21f5f490202cbe86488a46112f4fa18f713740a9d27de7e0a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd152a3788a9b8f0a0d11a79823e0110f63b9dfc6e0099a43fb3668b20f198be
MD5 44c5c11f1daf30380abfd50387d54f2e
BLAKE2b-256 084c9263bebbfd7889c702031c22f373eb15e7866d4193d37dcaaf15c1df9922

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 25.4 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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2708a47afffd69415645513ee324e01c1e3de110b73759af51ed9bd2668137be
MD5 51462c0c23f99db556c87972987c045a
BLAKE2b-256 dab70c851551a8792531ddd0d7ecb3e5e37ac8d56addbfc4a68d491df3b09426

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d2d797b3a4f88141857d3782c2a4f5fe9b57c4bf01bc8b8f3184b78e979c4930
MD5 01940e5d8d3b24254e601a1f843abc88
BLAKE2b-256 9f90a21f0e8c64a8c2f8320aad28cef9f1dd9bc66360d4c5e115f4ada11ef9c3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6cc327a0724b6a9d004d4e6b4293e950c5dc17d5385bc275702bda8b89fcce43
MD5 3c2c1dc2d0e0614e8e0b542325c8cda3
BLAKE2b-256 7f6fc2f301b485d8001db8a7b650d428cf9f8696f52972b7a1b50ec1ae539e03

See more details on using hashes here.

Provenance

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