Likelihood and Theory codes for the Simons Observatory.
Project description
SOLikeT is a centralized package for likelihood and theory implementations for the Simons Observatory. For more extensive details please see our main documentation pages at: http://soliket.readthedocs.io/.
Installation
For a set of detailed requirements and installation instructions for different machines (e.g. NERSC, M1 Mac), please see the installation page.
A preferred and convenient way to install SOLikeT and its dependents is through using the conda environment defined in soliket-tests.yml. After installing an anaconda distribution (e.g. as described here), you can create the environment and install a locally cloned version of SOLikeT using pip:
git clone https://github.com/simonsobs/soliket cd soliket conda env create -f soliket-tests.yml conda activate soliket-tests pip install -e .
Running an Example
SOLikeT is a collection of modules for use within the Cobaya cosmological inference and sampling workflow manager. Please see the Cobaya documentation for detailed instructions on how to use Cobaya to perform cosmological calculations and generate constraints on cosmological parameters.
SOLikeT examples and explanatory notebooks are under construction, but will be run using standard [yaml](https://en.wikipedia.org/wiki/YAML) format (which can in turn be read in as Python dictionaries). The examples will be run using something similar to:
cobaya-run soliket-example.yml
Developing SOLikeT Theories and Likelihoods
If you wish to develop your own Theory and Likelihood codes for use in SOLikeT please see the detailed instructions on the Developer Guidelines page.
Running Tests
Tests run a set of SOLikeT calculations with known expected results. There are (at least) two reasons you might want to run tests:
Checking code in development
To see if codes you have written when developing SOLikeT are valid and will pass the Continuous Integration (CI) tests which we require for merging on github.
If you are using conda, the easiest way to run tests (and the way we run them) is to use tox-conda:
pip install tox-conda tox -e test
This will create a fresh virtual environment replicating the one which is used for CI then run the tests (i.e. without touching your current environment). Note that any args after a ‘–’ string will be passed to pytest, so:
tox -e test -- -k my_new_module
will only run tests which have names containing the string ‘my_new_model’, and
tox -e test -- -pdb
will start a pdb debug instance when (sorry, if) a test fails.
Checking environment configuration
Check SOLikeT is working as intended in a python environment of your own specification (i.e. you have installed SOLikeT not using the solike-tests conda environment).
For this you need to make sure all of the required system-level and python dependencies described in the installation instructions are working correctly, then run:
pytest -v soliket
Good luck!
Please raise an issue if you have trouble installing or any of the tests fail.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file soliket-0.1rc1.tar.gz
.
File metadata
- Download URL: soliket-0.1rc1.tar.gz
- Upload date:
- Size: 27.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56e220e17d005c6477f41820ee7a2190f3caf7a434b4719a1a4a7a95e3b50f87 |
|
MD5 | 5f5b69bde5051cf323ce2d553e198715 |
|
BLAKE2b-256 | e30ff3ef55b1f5b6b3265fbc72fd1943496bd77c00a19a3cadaebcf8ff7232c3 |
File details
Details for the file soliket-0.1rc1-py3-none-any.whl
.
File metadata
- Download URL: soliket-0.1rc1-py3-none-any.whl
- Upload date:
- Size: 27.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1b6cc2006e3ceaffe68291df87a9700b45df7391e3d75d54a61a7f071c772ab |
|
MD5 | e27567576a3dbcc036f0438f17fb1853 |
|
BLAKE2b-256 | 51f7de5b35818abb30f220e05f7320c9767405093f66a238c69ce47526d375e8 |