Pipeline (skypy.pipeline)

Running SkyPy

The pipeline package contains the functionality to run a SkyPy simulation from end to end. This is implemented in the SkyPyDriver class and can be called using the command line script skypy.

Reference/API

skypy.pipeline Package

This module provides methods to pipeline together multiple models with dependencies and handle their outputs.

skypy.pipeline.driver Module

Driver module.

This module provides methods to run pipelines of functions with dependencies and handle their results.

Classes

SkyPyDriver()

Class for running pipelines.

Class Inheritance Diagram

Inheritance diagram of skypy.pipeline.driver.SkyPyDriver

skypy.pipeline.scripts.skypy Module

skypy Command Line Script

skypy is a command line script that runs a pipeline of functions defined in a config file to generate tables of objects and write them to file.

Using skypy to run one of the example pipelines and write the outputs to fits files:

$ skypy –config examples/herbel_galaxies.yaml –format fits

Config Files

Config files are written in yaml format. The top level should contain the fields cosmology and/or tables. cosmology should contain a dictionary configuring a function that returns an astropy.cosmology.Cosmology object. tables should contain a set of nested dictionaries, first giving the names of each table, then the names of each column within each table. Each column should contain a dictionary configuring a function that returns an array-like object.

Each step in the pipeline is configured by a dictionary specifying:

  • ‘function’ : the name of the function

  • ‘module’ : the name of the the module to import ‘function’ from

  • ‘args’ : a list of positional arguments (by value)

  • ‘kwargs’ : a dictionary of keyword arguments

  • ‘requires’ : a dictionary of keyword arguments

Note that ‘kwargs’ specifices keyword arguments by value, wheras ‘requires’ specifices the names of previous steps in the pipeline and uses their return values as keyword arguments.

Functions

main([args])