cavcalc.output.MultiOutput#

Overview

class cavcalc.output.MultiOutput(targets: dict[cavcalc.parameters.parameter.TargetParameter, tuple[cavcalc.parameters.enums.ParameterType]], phys_args: tuple[cavcalc.parameters.parameter.ArgParameter])#

Bases: BaseOutput

Storage and manipulation of multiple target parameters computed via calculate().

Use MultiOutput.as_singles() to easily construct SingleOutput instances from a multi-output object.

Properties

MultiOutput.results

A dictionary of results, mapping the names of the target parameters to their values (as pint.Quantity instances).

Methods

MultiOutput.__init__(targets, phys_args)

MultiOutput.as_single(ptype)

A SingleOutput instance constructed, from this multi-output, for a single desired parameter type.

MultiOutput.as_singles(*args)

A dictionary of SingleOutput instances, for given ParameterType objects, constructed from this multi-output.

MultiOutput.get(key[, default])

Retrieve a target result, or a collection of these, using a suitable key.

MultiOutput.plot([filename, show])

Plots all the outputs which have array-like target parameters.