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 and MacOS/arm, for python 3.11 trough 3.14, and 3.14.t Building on Windows (amd64, python 3.11-3.14) sometimes works, but currently not.

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.3.tar.gz (32.4 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.3-cp314-cp314t-manylinux_2_28_x86_64.whl (40.7 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

cosmosim-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl (34.4 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

cosmosim-3.0.3-cp314-cp314-manylinux_2_28_x86_64.whl (33.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

cosmosim-3.0.3-cp314-cp314-macosx_11_0_arm64.whl (29.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

cosmosim-3.0.3-cp313-cp313-manylinux_2_28_x86_64.whl (33.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

cosmosim-3.0.3-cp313-cp313-macosx_11_0_arm64.whl (29.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

cosmosim-3.0.3-cp312-cp312-manylinux_2_28_x86_64.whl (33.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

cosmosim-3.0.3-cp312-cp312-macosx_11_0_arm64.whl (29.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cosmosim-3.0.3-cp311-cp311-manylinux_2_28_x86_64.whl (33.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

cosmosim-3.0.3-cp311-cp311-macosx_11_0_arm64.whl (29.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: cosmosim-3.0.3.tar.gz
  • Upload date:
  • Size: 32.4 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.3.tar.gz
Algorithm Hash digest
SHA256 925ed1ea47b8cc0be71dbb25bfbeaba62b6fa99bfb21e09ee51193d2d6c96071
MD5 e7851dac07fee7cb69f88279cecf2f3e
BLAKE2b-256 a1b85bed14dddd530e357cd692342587104fb85a2ed58b8fe634b4d30d0379eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 73f07185827243b9972d14789d06aa2297829e376a1b5d2f630b599ee10f122d
MD5 c3282604f4a62730efc4b97dbbd25236
BLAKE2b-256 605c378212101aedcf50d0b1ff2ac482b4fcd27bb2035c8aea69bf18c7816025

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b6d5590993dc10b957c1b1e6f6360991e818c514521a4767ee4027527512109
MD5 2bc7619ecc188a9a05169c582e9cd269
BLAKE2b-256 489e8478787bab2bbdcb7295df8bd7e9df39b6fe58bf722538029e76a69b7001

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a61101a660add0e700297aa1d1c10d337f40381de1952d44345838e4b3431d21
MD5 76d11d09d90253320faea7f0ec80834a
BLAKE2b-256 b01f16bd0ef664e0737b23199e7946944da18c6783a0260f38141cd491429ee0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3393fd9ab89d9031347680452c1b62235d1686d7c30ba9c2bd69a247d6f062a0
MD5 632b264c1794e8cef19e3bac690bc615
BLAKE2b-256 5c0e5c49a0fb1f48ff51046c0f1ab0139ec079023ca127918e0409c82cd11962

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 064dfe0c1c040227d9088e15be4e07353f00591ef711cec6240c08b41577a34a
MD5 522d8d07b772fecfb998bb99f09e94d7
BLAKE2b-256 6de9ab3c45d599c3af9ebea5b0d17d67560e5e4f6caca62a1c8032342107d5b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c09a35da8f06dde6925f81ae2f76413277d686143673e6b94024d4a4097eb545
MD5 a728f06f284ce9730f296274d6d57fd8
BLAKE2b-256 360d8a96e74f418e0558188dc3790dac2ecffe6c75c99f56c1c4224dd823f532

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0527c10e4e900ae312b1df72733fb645e685371542b69376c18ad193be786aa8
MD5 405dfe2cf4251318fa5bba3ad1b796c9
BLAKE2b-256 dfd744482838329498aa354c5cf7b94de1ad4827ed997ea2b9b29b2ef226da33

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a58ff6816408a57075e6b63afcc450b2a0f635791e6e3012746d37ddc69870ca
MD5 16efc73de5d5b778a6087a0645cbae5e
BLAKE2b-256 adb76e53aafd0d262046f73c0c46dd4ac51af8dcfb7de082b90c8be100e06850

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 942dc79152f1abaa41c9b26616278d8fd47d956e8ab266e9339dfdb3acf19327
MD5 56971932d2bb33663ad9139306c02c48
BLAKE2b-256 d33aed8ca72eab3124df1af0e43ba7edc08f514e27078846e06274a0c7c8011f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmosim-3.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2298143afc3eb8c15a70e47559c3fb193bff3842945760fc10749ed82d0b7872
MD5 45a4fb4dd0facf7bfbd17bb465368c55
BLAKE2b-256 fe8b041a58ce9d3b5074eeec2f8fca3ed12ae83e7a7020ee1ee94f6e39c00f90

See more details on using hashes here.

Provenance

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