CapTest

CapTest organizes a pair of CapData objects (measured and simulated) along with test configuration, and provides methods for computing reporting conditions, running the ASTM E2848 capacity test, and evaluating pass/fail.

captest.CapTest(**kwargs)

Config + state container for an ASTM E2848 capacity test.

Constructors

Alternative constructors for building a CapTest from parameters, YAML files, or mapping objects.

captest.CapTest.from_params(**kwargs)

Construct a CapTest from parameter kwargs.

captest.CapTest.from_yaml(path[, key, ...])

Construct a CapTest from a yaml config file.

captest.CapTest.from_mapping(sub, *[, key, ...])

Construct a CapTest from an already-parsed captest sub-mapping.

Setup

Methods for configuring the test and serializing configuration.

captest.CapTest.setup([verbose])

Resolve TEST_SETUPS, propagate scalars, process regression cols.

captest.CapTest.to_yaml(path[, key, ...])

Serialize the curated CapTest configuration to a yaml file.

captest.CapTest.resolved_setup

Return the resolved TEST_SETUPS entry or raise if setup() not run.

Reporting Conditions

captest.CapTest.rep_cond([which])

Call cd.rep_cond with the resolved preset's rep_conditions.

captest.CapTest.rep_irr_filter_low

Lower irradiance fraction bound derived from rep_irr_filter.

captest.CapTest.rep_irr_filter_high

Upper irradiance fraction bound derived from rep_irr_filter.

Results

Methods for running the capacity test and evaluating pass/fail.

captest.CapTest.captest_results([...])

Compute the capacity test ratio for self.meas vs self.sim.

captest.CapTest.captest_results_check_pvalues([...])

Compute cap ratio with and without p-value filtering.

captest.CapTest.determine_pass_or_fail(cap_ratio)

Determine a pass/fail result from a capacity ratio.

captest.CapTest.get_summary()

Concatenate self.meas.get_summary() and self.sim.get_summary().

Visualization

captest.CapTest.scatter_plots([which])

Create the scatter plot for the active capacity-test setup.

captest.CapTest.overlay_scatters([...])

Overlay the final scatter plot from self.meas and self.sim.

captest.CapTest.residual_plot()

Overlayed residual plots for self.meas and self.sim.

Module-level Functions

Standalone functions used alongside CapTest.

captest.load_config(path[, key])

Load and lightly validate the captest sub-mapping from a yaml file.