captest.CapTest.from_yaml

classmethod CapTest.from_yaml(path, key='captest', meas_loader=None, sim_loader=None)

Construct a CapTest from a yaml config file.

Reads the sub-mapping at the given top-level key of the yaml file and delegates to from_mapping() with base_dir=path.parent so relative meas_path / sim_path values resolve against the yaml’s directory.

Parameters:
  • path (str or Path) – Path to a yaml file.

  • key (str, default 'captest') – Top-level key whose value is the CapTest sub-mapping.

  • meas_loader (callable or None, optional) – Programmatic-only loader callables that override the default resolution (captest.io.load_data / captest.io.load_pvsyst). Supplied here because loader callables cannot be represented in yaml. Useful for downstream wrappers that drive yaml-based construction but need a custom measured-data loader. When None the default resolution applies.

  • sim_loader (callable or None, optional) – Programmatic-only loader callables that override the default resolution (captest.io.load_data / captest.io.load_pvsyst). Supplied here because loader callables cannot be represented in yaml. Useful for downstream wrappers that drive yaml-based construction but need a custom measured-data loader. When None the default resolution applies.

Return type:

CapTest