SPItorch documentation#


If you’re looking for installation instructions, please see the installation page.

Here is a link to the GitHub Repo.


This is a fork of the original SPItorch project by Mike Walmsey and collaborators, which aims to use (conditional) generative modelling techniques to map from photometry to distributions over physical parameters \(\theta\).

There are broadly two components:

  1. Simulation and Dataset Creation

    The first section is for simulation, where you can create a dataset of simulated \((\text{galaxy parmeter}, \text{photometry})\) pairs. This uses Prospector behind the scenes, and should be the first step if you are installing and running this repository for the first time.

    See the Photometry Sampling section for more details about this stage.

  2. Inference

    In this second section of the codebase we deal with the task of estimating the distribution over physical galaxy parameters, which we denote \(\mathbf{y}\), given photometric observations \(\mathbf{x}\); that is, estimating \(p(\mathbf{y} \vert \mathbf{x})\).

    This is a standard supervised machine learning setup. There are several candidate models in the codebase, and the code has been structured such that it is easy to implement new models, and compare them to the existing methods.

    To see how to do this, and for an overview of the existing models, please read the Inference page.

Configurations#

Configurations for the project are set in spt/config.py, not through command line arguments.

Miscellaneous#

We use type hints throughout the code to allow for static type checking using mypy. In general this helps to catch bugs, and makes it clearer to folks unfamiliar with the code what an object is, or what a function is doing.

Tests are written using pytest.