Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Software Model until v3.1

CosmoSim is written in C++ and Python.
It has evolved over quite some time and there is some technical debt. We will try to explain the architecure as

Architecture

The CosmoSim software suite consists of three layers.

  1. The simulator library, simlib, implemented in C++

  2. The python wrapper, CosmoSimPy - The Python Bindings, implemented in C++ and python.

  3. The python module which several scripts, GUI and an API.

CosmoSim Modules

The mathematical model is implemented in the simulator library, which is consequently the most important part to document properly.

Python modules

Most of the code is packaged as a python module. The only exception is the scripts to generate the formulæ for roulette amplitudes (directory python).

Calculation of roulette amplitudes

For the SIS and SIE lenses, we have analytic formulas for the roulette amplitudes. The python scripts under the python directory compute these formulas by symbolic algebra, and produce the files sie05.txt and sis50.txt which are included in the distribution.

These formulas are imported by the C++ library (simlib) to compute amplitudes during simulation.

More information