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.4.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.4-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.4-cp314-cp314t-macosx_11_0_arm64.whl (30.7 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.14Windows x86-64

cosmosim-3.0.4-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.4-cp314-cp314-macosx_11_0_arm64.whl (26.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

cosmosim-3.0.4-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.4-cp313-cp313-macosx_11_0_arm64.whl (26.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

cosmosim-3.0.4-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.4-cp312-cp312-macosx_11_0_arm64.whl (26.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

cosmosim-3.0.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: cosmosim-3.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 c74e5e03733eea84a58d49feaeca741bf8bdea8bd75d13e93385fce1363c0ac9
MD5 48f0b729789a4edc4b936f980bfffc89
BLAKE2b-256 50e0ac093ec4832045a5b0664e1bb85c32aaa29a5011952e2b4293bb995a4f66

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f1979ff6ba548c4403d02db36fd78e59cabacca831de00228d1857586505bb81
MD5 bc913d6bdd9a0cabaeec9d96878cf6e8
BLAKE2b-256 ae0227c92268b1f846fda6754ac06b83af0c19a2f7c64f70b067f638632e91bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a3af191e84eff77a01f1d798f4ef334bd7c70188af238c09b2946a50d0ee7d8
MD5 9aa2d30113f108f76c1b698f75adf6ac
BLAKE2b-256 422f1ff14b89013dff7f46dd75001fd6676e1daf00645ddd4f95fe09496df7d5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4-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.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 70ee888e5052ff78d468aa1498663ebf886cfab48c2cd0448058950a998d1635
MD5 2cecb3a5e380966c18c67cafab4e6fec
BLAKE2b-256 f174979e8c96cbfeb8be6a9bc23ec0c0dd282e476a7d503a2ecb34eec431f950

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7e893072b4fb1fad105e96391a11e2b6d117554962f212d1575086dca75b17a
MD5 4666898f4d78b81c44e0b9554e0e41ab
BLAKE2b-256 301977edc8bf34dd2f3c0ae7442e1829fac9301b19f7e935960a30402cdb900d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e3b927e399ccc8901b24d628dfdf2f618b27388690df4fe3c3fe9632349279d
MD5 578fb61588039abb675ec6a8780ba16e
BLAKE2b-256 1f75b06bd46fa34804a4464d6b339983da4170a7481356c1bf74b5360c1503ba

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4-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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5d70c12acf9cd6f36b9e79230e4824748036fd414379c89af0eac378206d1e41
MD5 09a6f8c9f7b429041e6614072dd09ee6
BLAKE2b-256 8e5a5087bae78097a044eb01946db455890aa97745ac00e23fae090d1eca07b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b03bf05c4f9c2eec3b76fe466e3fd6099cec7582f2bc3f07044faba919a07336
MD5 ded2cae6a9c5d4106be9be8ef31429dc
BLAKE2b-256 fe7c5dae0dd16dde7137e7837d3a3b650b0fe0d42e79ffa59d2cda3d29bac7db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5cff31e4ad2d1b09bb6e795041c8bd3005073f575c4a9c27227f2e71bb3bb11c
MD5 8be4ee6757514e358975a1fc59e481e6
BLAKE2b-256 46f70e18b8969354cbdaeb5fd64cc5506c40b91e1cbd1409077937bf76d30841

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4-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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ad786a2d030c67749350675e5267e4bea461c69d542066fc4f5a5d788c58e070
MD5 c62d13be4b88e37720809971d4575d90
BLAKE2b-256 4d1040d44854877f659a674e0ca5eab3964da79e115678149daef82c0a04c1ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 45b8a71f7b41c71375bd59fb9046643e4ce9293363e054222af19af497d61d44
MD5 05e73852e5c4a0ee88d7d85cce507df7
BLAKE2b-256 5da229179f5078a2f9c766fbbcc433875edd1f804a5e4b3b0eb4181999c4361d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5aac2c8a4c0c2d836a6d5496412c0dff2f8247790a07d326837b9cf04dcfcd1b
MD5 2f7f2112fb9073eab743d879451bf6d6
BLAKE2b-256 99ae69550466fb8949eab895e72c9e9185f52788512c255bebb9d8cd51d2db96

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4-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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f70421c083e0faf3ce629daf889f00d1337750985dcd1773e0df49b0c9e18003
MD5 7ffa2450b375b15ee805647d196ea1d4
BLAKE2b-256 643065524fb10eb5342ad760db17c3dd26f87b59d32427e374deca3d16cb6c78

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d3337eb34f6ad8384926c8395f89b01a15297c88b2bc075af4357f58ba36a6a
MD5 5831919a8fcb679971e128e379910176
BLAKE2b-256 e3c49fe4a6813eda8ead5af2934004a038eb48018d3c70c4fafba26a9730a0ef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 24ffda004dbcbec382224235eee790637813c3d9f40f5e8c3fcf393dd4f786ea
MD5 8a912fabc1111b63527f6f73a5c46bb6
BLAKE2b-256 a6881a03ae85d5b02bd0144a49f5ba250ea5d2e03e7251b0b83491801a658f74

See more details on using hashes here.

Provenance

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