reduce

reduce(vis: list[str] | None = None, infiles: list[str] | None = None, procedure: str = 'procedure_hifa_calimage.xml', context: Context | None = None, name: str | None = None, loglevel: str = 'info', plotlevel: str = 'default', session: list[str] | None = None, exitstage: int | None = None, startstage: int | None = None) Context[source]

Executes a CASA Pipeline data reduction procedure.

This function triggers the execution of pipeline tasks defined in a given XML recipe procedure, managing context creation and task sequencing.

Parameters:
  • vis -- List of measurement sets to process.

  • infiles -- Supplementary input files for the pipeline execution.

  • procedure -- XML procedure file defining the pipeline workflow.

  • context -- Existing context object. A new context is created if None.

  • name -- Context name, used only if context is None.

  • loglevel -- Logging level (e.g., 'info', 'debug').

  • plotlevel -- Plotting verbosity level used during task execution.

  • session -- List of session names corresponding to each vis. Defaults to "default".

  • exitstage -- If provided, stops execution after this stage number.

  • startstage -- If provided, begins execution from this stage number.

Returns:

The pipeline context object with updated state.

Raises:

exceptions.PipelineException -- Raised if a pipeline task fails with tracebacks.