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.4b1.tar.gz (33.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.4b1-cp314-cp314t-manylinux_2_28_x86_64.whl (41.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

cosmosim-3.0.4b1-cp314-cp314t-macosx_11_0_arm64.whl (34.9 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.14Windows x86-64

cosmosim-3.0.4b1-cp314-cp314-manylinux_2_28_x86_64.whl (33.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

cosmosim-3.0.4b1-cp314-cp314-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

cosmosim-3.0.4b1-cp313-cp313-manylinux_2_28_x86_64.whl (33.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

cosmosim-3.0.4b1-cp313-cp313-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

cosmosim-3.0.4b1-cp312-cp312-manylinux_2_28_x86_64.whl (33.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

cosmosim-3.0.4b1-cp312-cp312-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

cosmosim-3.0.4b1-cp311-cp311-manylinux_2_28_x86_64.whl (33.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

cosmosim-3.0.4b1-cp311-cp311-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: cosmosim-3.0.4b1.tar.gz
  • Upload date:
  • Size: 33.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.4b1.tar.gz
Algorithm Hash digest
SHA256 a453f94cd7fc3e8b2d2a999eb964c2dd5ce0b9fd137a8083e56bd012d5db90d9
MD5 f289d1381a75196e349528181409b48b
BLAKE2b-256 4c5ba4c669878573765d620231410c7e64b414cc4c2625f62df966adfa2bc6dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c362d6a26e2dd50789b886a126dae8a14c3d56cb7ca6c3c57f97eafcbd263834
MD5 f70744a3405d2d46c8036ab1f623307f
BLAKE2b-256 0aca110ac9cf5dd3693d5df009f754626c7c2bc2735aba1d84e4287d6efb137a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 843b1ed1088de0470021b0dffba6edfb180f64e92ad9259d1a1773c8aa76e34a
MD5 615d2d2685bb3eaddb2b7e9983b9c641
BLAKE2b-256 46ae3c5c832cd8f860127723693e49eb6c2e7e30af471890ba0a30f81cf546fe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4b1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 30.1 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.4b1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 06b642524802f0ad98310fbc0655be680ed11a7f3fdf8d6addb958f1ad323a45
MD5 f94dd014b5c3f71292be0a5fa3c5cb75
BLAKE2b-256 c001239c36239f33e4351988474e27845afd0e3a86cdbf0cd012e9912713e708

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9af5f004d154f45e2d78080a0b90c1c190b6ed1caec2a85f6b8ed3bd0004ef73
MD5 566476ee7405c131f8999ed742023ebc
BLAKE2b-256 0e60ff487c0a510857548418bc93915c0a5b248efab0df57ec2ef3de7e0bd3a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3c3b713a7c269f8b7b8199385adb424971ec2a1c7384e92828f924690bd76457
MD5 3ce6b1f6f0053ae5a6a511ea526024e8
BLAKE2b-256 c90f3997e51f5d768172123b50e3984dbbd0136e910e09150d9735422e4d620a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4b1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 29.5 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.4b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ec6b1243c43ff917ac7ead8df2b7051c3e1a9432e01750ebe84520c24f2309ed
MD5 a08c7bce91585d933de9179688cda7ef
BLAKE2b-256 492167eeae873ec0f79a895656598d0aed2ecabc935b8a0d5d05e921af89227e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d3e733a2382214635d12ab6f98ccbe2aca113bf93e112c1bedbfa74a751daf8
MD5 00c79661b83ba0cdcc31e81997a32e7a
BLAKE2b-256 904d38fc4f378b97b2a7f862adf3425d6f5cd3452a99730e662dbbda69656060

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f8b852a34ad0a99170ea5078d89f9b76300b73ac717b7723a11d5541301f963c
MD5 195a9d86c801f2fffa9f1c41ef353350
BLAKE2b-256 784b7cddef7cced0597c1eae6b9465b84552733e7a45a7d83f93d3fa23892c04

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4b1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 29.5 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.4b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 943c433abc4b9e9cca9f7205b64efc284dad0527f3fb0846cc6420cd5a46b1ff
MD5 b5acaecd4177d14a3637f7105959aea7
BLAKE2b-256 90ad1afffedb958b423fe53574b68a142be80ac848584913f7a7a8e4de6aeb30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c45d7518c5ceb7b790e0fb1fb60d5f4c14b7eb88fe965bc71e576532f2470d8f
MD5 67affbc1f5fa7ca1073fb5790d75be48
BLAKE2b-256 6e62c4ab82e8d969bc4a51ee6d41acf456f62582fbe9bb36c2e5529fd3e8c1f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8143f32b0e17e7cee778a09a22dd3d0fc199cc9d0eeec6e193004a696c63074f
MD5 25769b0d3c0f61d1e1fc93b65b012d79
BLAKE2b-256 c58f71addcfb135ff392a4d1837e380fb02e614ab1ec7d9e1ab979bb1f8142fa

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cosmosim-3.0.4b1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 29.5 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.4b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 56b7d600983855d9c67db2d942c94f183756ee22f7a0f3f0ec99b74b8123e59f
MD5 de1931ef9c1560ab1aad9e91a03848a6
BLAKE2b-256 3d94d08759ab91e3435b1afb727f4fc192fdd03f9c63044678483014c09b33b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d17ea624af32d2e0c96d7467b3674a31d0d026d0e990eb9f5e816ef8910bbd9
MD5 db74369a8ef476c69a4b8f526da2f13f
BLAKE2b-256 86d47981dccd1199f3f962d864f2d46d5632b56f5478c87bd01f70e52c03a620

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.4b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e5788a2d26f13009040930588aacf8d82f193ba799d9a51ebf95960cbb8edc14
MD5 c98862ab171a4ad10b716c4f7aeb726a
BLAKE2b-256 8bd55e348d82ff9ae35e461c105000131c1dc68b294a88adceddc0e8dd11228a

See more details on using hashes here.

Provenance

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