rail.projects.pipeline_holder module

class rail.projects.pipeline_holder.RailPipelineInstance(**kwargs)[source]

Bases: Configurable

Simple class for holding a pipeline configuraiton

Parameters:

kwargs (Any)

build(project)[source]
Return type:

int

Parameters:

project (RailProject)

config_options: dict[str, StageParameter] = {'flavor': Parameter(Pipeline flavor, type: <class 'str'>, default: None [required]), 'kwargs': Parameter(Keywords to provide Pipeline c'tor, type: <class 'dict'>, default: {} [optional]), 'name': Parameter(Pipeline name, type: <class 'str'>, default: None [required]), 'path': Parameter(Path to pipeline file, type: <class 'str'>, default: None [required]), 'pipeline_overrides': Parameter(Parameters to override from template, type: <class 'dict'>, default: {} [optional]), 'pipeline_template': Parameter(Name of PipelineTemplate to use, type: <class 'str'>, default: None [required])}
get_input_files(project, **kwargs)[source]

Get the input files needed to run this instandce

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • **kwargs – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Input files, keyed by label

Return type:

dict[str, str]

make_pipeline_catalog_commands(project, **kwargs)[source]

Make the command to run a pipeline on an entire catalog

Return type:

list[tuple[list[list[str]], str]]

Parameters:
  • project (RailProject) – Object with project configuration

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

commands – Commands to run

Return type:

list[tuple[list[list[str]], str]]

make_pipeline_single_input_command(project, **kwargs)[source]

Make the command to run a single instance

Return type:

list[str]

Parameters:
  • project (RailProject) – Object with project configuration

  • **kwargs – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Commands to run

Return type:

list[str]

yaml_tag: str = 'PipelineInstance'
class rail.projects.pipeline_holder.RailPipelineTemplate(**kwargs)[source]

Bases: Configurable

Simple class for holding a pipeline configuraiton

Parameters:

kwargs (Any)

config_options: dict[str, StageParameter] = {'input_catalog_basename': Parameter(Basename to use for input catalog, type: <class 'str'>, default:  [optional]), 'input_catalog_template': Parameter(Template to use for input catalog, type: <class 'str'>, default:  [optional]), 'input_file_templates': Parameter(Templates to use for input files, type: <class 'dict'>, default: {} [optional]), 'kwargs': Parameter(Keywords to provide Pipeline c'tor, type: <class 'dict'>, default: {} [optional]), 'name': Parameter(Pipeline name, type: <class 'str'>, default: None [required]), 'output_catalog_template': Parameter(Template to use for output catalog, type: <class 'str'>, default:  [optional]), 'pipeline_class': Parameter(Full class name for Pipeline, type: <class 'str'>, default: None [required])}
make_instance(project, flavor, pipeline_overrides)[source]
Return type:

RailPipelineInstance

Parameters:
  • project (RailProject)

  • flavor (str)

  • pipeline_overrides (dict[str, Any])

yaml_tag: str = 'PipelineTemplate'
rail.projects.pipeline_holder.blending_convert_commands(sink_dir, **_kwargs)[source]
Return type:

list[list[str]]

Parameters:
  • sink_dir (str)

  • _kwargs (Any)

rail.projects.pipeline_holder.estimate_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the estimate pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.estimate_recalib_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the estimate pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.estimate_sompz_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the estimate pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.evaluate_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the evalute pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.inform_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the inform pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.inform_recalib_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the inform pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.inform_somlike_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the inform pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.inform_sompz_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the inform pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.photometric_errors_convert_commands(sink_dir, **_kwargs)[source]
Return type:

list[list[str]]

Parameters:
  • sink_dir (str)

  • _kwargs (Any)

rail.projects.pipeline_holder.prepare_convert_commands(sink_dir, **_kwargs)[source]
Return type:

list[list[str]]

Parameters:
  • sink_dir (str)

  • _kwargs (Any)

rail.projects.pipeline_holder.pz_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the pz pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.somlike_recalib_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the somlike recalib pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.spectroscopic_selection_convert_commands(sink_dir, **kwargs)[source]
Return type:

list[list[str]]

Parameters:
  • sink_dir (str)

  • kwargs (Any)

rail.projects.pipeline_holder.tomography_input_callback(project, pipeline_name, sink_dir, **kwargs)[source]

Make dict of input tags and paths for the tomography pipeline

Return type:

dict[str, str]

Parameters:
  • project (RailProject) – Object with project configuration

  • pipeline_name (str) – Name of the pipeline to run

  • sink_dir (str) – Path to output directory

  • kwargs (Any) – Additional parameters to specify pipeline, e.g., flavor, selection, …

Returns:

Dictionary of input file tags and paths

Return type:

dict[str, str]

rail.projects.pipeline_holder.truth_to_observed_convert_commands(sink_dir, **_kwargs)[source]
Return type:

list[list[str]]

Parameters:
  • sink_dir (str)

  • _kwargs (Any)