Installation
Requirements
Python 3.11 or newer.
The scientific stack, pulled in automatically as dependencies:
numpy,scipy,astropy,synphot,matplotlib,pandas,photutils,bokeh,tifffile, andlazuli-exo(the transit models).
Install from source (recommended)
The package is developed on GitHub. Clone it and install in editable mode so
local changes to src/ are picked up at once:
git clone https://github.com/schmidt-observatories/wcc-etc.git
cd wcc-etc
pip install -e .
Optional extras add the development tools, the documentation toolchain, and the light-curve and Exoplanet Archive helpers:
pip install -e ".[dev]" # pytest, ruff, mypy, pre-commit
pip install -e ".[docs]" # Sphinx, nbsphinx, the theme
pip install -e ".[lightcurve]" # transit light-curve modelling
pip install -e ".[exoarchive]" # NASA Exoplanet Archive queries
Using a conda environment
The synphot, astropy and photutils stack is happiest in a dedicated environment:
conda create -n wcc-etc python=3.11
conda activate wcc-etc
pip install -e .
Verify the installation
import wcc_etc
print(wcc_etc.__version__)
from wcc_etc import get_scene, Simulation
scene = get_scene("K3IV", mag=20)
sim = Simulation.from_sensor_and_scene("sony:bb", scene)
print(sim.get_snr(10)["snr"])
If that prints a version string and a signal-to-noise value, continue with Quick start.
Running the test suite
The package ships with a pytest suite. From the repository root:
pip install -e . # editable install so tests see local src/ changes
pytest
Building the documentation locally
The documentation is built with Sphinx and the Read the Docs theme. The tutorial pages are rendered from the Jupyter notebooks by nbsphinx, which needs pandoc installed.
# from the repository root
pip install -e ".[docs]" # the package + Sphinx + theme + nbsphinx
# plus a pandoc binary, e.g. conda install pandoc or brew install pandoc
cd docs/sphinx
make html
Open docs/sphinx/_build/html/index.html in a browser. To force a clean
rebuild, run make clean html. The build re-executes every tutorial
notebook and every figure in the user guide, so it doubles as a smoke test
of the public API and takes several minutes.