reduce

reduce(vis=None, infiles=None, procedure='procedure_hifa_calimage.xml', context=None, name=None, loglevel='info', plotlevel='default', session=None, exitstage=None, startstage=None)[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[str] | None) -- List of measurement sets to process.

  • infiles (list[str] | None) -- Supplementary input files for the pipeline execution.

  • procedure (str) -- XML procedure file defining the pipeline workflow.

  • context (Context | None) -- Existing context object. A new context is created if None.

  • name (str | None) -- Context name, used only if context is None.

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

  • plotlevel (str) -- Plotting verbosity level used during task execution.

  • session (list[str] | None) -- List of session names corresponding to each vis. Defaults to "default".

  • exitstage (int | None) -- If provided, stops execution after this stage number.

  • startstage (int | None) -- 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.

Return type:

Context