make_injection_pipeline¶
- lsst.source.injection.make_injection_pipeline(dataset_type_name: str, reference_pipeline: Pipeline | str, injection_pipeline: Pipeline | str | None = None, exclude_subsets: bool = False, excluded_tasks: set[str] | str = {'fgcmBuildFromIsolatedStars', 'fgcmFitCycle', 'fgcmOutputProducts', 'gbdesAstrometricFit', 'jointcal'}, prefix: str = 'injected_', instrument: str | None = None, config: str | list[str] | None = None, additional_pipelines: list[lsst.pipe.base.pipeline.Pipeline] | list[str] | None = None, subset_name: str | None = None, subset_description: str = '', log_level: int = 20) Pipeline ¶
Make an expanded source injection pipeline.
This function takes a reference pipeline definition file in YAML format and prefixes all post-injection dataset type names with the injected prefix. If an optional injection pipeline definition YAML file is also provided, the injection task will be merged into the pipeline.
Unless explicitly excluded, all subsets from the reference pipeline containing the task which generates the injection dataset type will also be updated to include the injection task. A series of new injected subsets will also be created. These new subsets are copies of existent subsets, but containing only the tasks which are affected by source injection. New injected subsets will be the original subset name with the prefix ‘injected_’ prepended.
- Parameters:
- dataset_type_name
str
Name of the dataset type being injected into.
- reference_pipelinePipeline |
str
Location of a reference pipeline definition YAML file.
- injection_pipelinePipeline |
str
, optional Location of an injection pipeline definition YAML file stub. If not provided, an attempt to infer the injection pipeline will be made based on the injected dataset type name.
- exclude_subsets
bool
, optional If True, do not update pipeline subsets to include the injection task.
- excluded_tasks
set
[str
] |str
Set or comma-separated string of task labels to exclude from the injection pipeline.
- prefix
str
, optional Prefix to prepend to each affected post-injection dataset type name.
- instrument
str
, optional Add instrument overrides. Must be a fully qualified class name.
- config
str
|list
[str
], optional Config override for a task, in the format ‘label:key=value’.
- additional_pipelines: `list`[Pipeline] | `list`[`str`]
Location(s) of additional input pipeline definition YAML file(s). Tasks from these additional pipelines will be added to the output injection pipeline.
- subset_name: `str`, optional
All tasks from any additional pipelines will be added to this subset. The subset will be created if it does not already exist.
- subset_description: `str`, optional
The description given to a new subset which holds tasks from additional pipelines provided. Note: this argument is ignored if the subset already exists.
- log_level
int
, optional The log level to use for logging.
- dataset_type_name
- Returns:
- pipeline
lsst.pipe.base.Pipeline
An expanded source injection pipeline.
- pipeline