pysco is a Python module that contains some plotting routines I usually use and other useful snippets.
- Clone the repository:
git clone https://github.com/asantini29/pysco.git cd pysco - Install uv if you haven't already:
# on MacOS or Linux curl -LsSf https://astral.sh/uv/install.sh | sh # on Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - Install the package and its dependencies using
uv:To include the optionaluv synceryndependencies:uv sync --extra eryn
Run Python commands using uv run to ensure the correct environment is used:
uv run python your_script.py
The package follows a src layout:
pysco/
├── src/pysco/
│ ├── __init__.py
│ ├── pysco.py
│ ├── utils.py
│ ├── eryn.py
│ └── plots/
│ ├── __init__.py
│ ├── plot.py
│ └── journals.py
│ └── mplfiles/
Some of the main routines currently implemented in pysco:
-
plots:
pysco.plotscontains custom settings formatplotlib(here) andcorner(here). Currently, some features ofpysco.plots.cornerare available only when using thedevbranch of my edited fork ofcorner(available here). In order to use another custom fork ofcorneryou have to set its path as an environment variable:export CORNER_PATH=your-path-to-corner.pyThe module contains three different colorblind-friendly color palettes based on the results of arXiv:2107.02270.
-
utils:
pysco.utilscontains basic timing and benchmarking operations. -
eryn: the module
pysco.eryncontains useful routines for the Eryn MCMC sampler. Most of the snippets currently implemented are tailored for a diagnostic plots-orientedupdate_fn.
Sphinx documentation is available under docs/ and can be built locally with:
python -m sphinx -b html docs docs/_build/html
Built documentation is available on GitHub Pages: https://asantini29.github.io/pysco/
We use SemVer for versioning.
Current Version: 0.1.1 (see src/pysco/pysco.py)
This project is licensed under the MIT License - see the LICENSE.md file for details.
If you use pysco in your research, you can cite it in the following way:
@software{pysco_2024_13930440,
author = {Alessandro Santini},
title = {asantini29/pysco: First release},
month = oct,
year = 2024,
publisher = {Zenodo},
version = {v0.0.1},
doi = {10.5281/zenodo.13930440},
url = {https://doi.org/10.5281/zenodo.13930440}
}