A framework for creating pipelines for the Simons Observatory. Documentation is still under development, but details about how to use this package to create new pipelines can be found below and in CONTRIBUTING.md.
To install BBPipe
, just clone this repository and run
python setup.py install
(add --user
if you don't have permissions, which is probably the case at e.g. NERSC).
Once installed, you can test the installation by running it on the current test power-spectrum pipeline (mostly made out of placeholders). To do so, type:
bbpipe test/test_ini.yml
To create a new pipeline, you must create its corresponding pipeline stages, and link them together through a yaml file.
Creating a new pipeline stage involves creating a python module. Note that this module doesn't have to live in this repo, it just has to be accessible by bbpipe
when you run it. The new repo must:
__init__.py
file that imports from .
all the stages used by your pipeline.__main__.py
file with the same contents as those from the example bbpower_test
directory.bbpipe.PipelineStage
. Each class must have its own name
, inputs
and outputs
attributes (essentially the names of the expected input and output data), and a run
method that executes the stage.run
method should use the parent methods from PipelineStage
to get its inputs and outputs etc.Have a look at the extended comments in bbpower_test/mask_preproc.py for more details on the structure of any pipeline stage.
To create the yaml file that puts your pipeline together, have a look at the test file. This file should contain:
local
one (i.e. launch jobs serially in your machine), but more will be defined. They will be located in bbpipe/sites
.config
) containing configuration options for each individual pipeline stage as well as global options. Have a look at test/config.yml
to see an example for our test power spectrum pipeline.resume
parameter, which determines whether a given stage is run if its outputs already exist.BBPipe
is heavily inspired by ceci
, a pipeline constructor designed within the LSST DESC by Joe Zuntz, Francois Lanusse and others.
BBPipe
uses PARSL.