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.

captest.captest.test_setups([options, ...])

Display test setups available.

captest.captest.validate_test_setup(entry)

Validate a single TEST_SETUPS entry dict.

captest.captest.resolve_test_setup(name[, ...])

Resolve a preset by name plus optional overrides.

captest.captest.perc_wrap(p)

Return a callable that computes the p-th percentile of a Series.

Predefined Test Setups

TEST_SETUPS is a dict that maps preset names to fully-validated test-setup entries. Each entry bundles a regression formula, column mappings for measured and modeled data, default reporting conditions, and a scatter-plot callable. Pass the preset name as test_setup when constructing a CapTest.

captest.TEST_SETUPS

Registry of predefined capacity-test presets. Keys are preset-name strings; values are dicts with required keys description, reg_cols_meas, reg_cols_sim, reg_fml, scatter_plots, and rep_conditions.

Every entry carries a human-readable description key summarizing the setup. Read it programmatically with, e.g., captest.TEST_SETUPS["bifi_e2848_etotal_rear_shade_sim"]["description"]. The summaries below mirror those description strings.

The built-in presets are:

e2848_default

Standard ASTM E2848 regression of AC power against front-side POA irradiance, ambient temperature, and wind speed using the full four-term formula. Default setup for monofacial capacity tests.

bifi_e2848_etotal_rear_shade_sim

Standard ASTM E2848 regression form with total effective irradiance replacing front-side POA as the independent variable. Rear shading and IAM losses are handled in the modeled (PVsyst) data (rpoa_pvsyst = GlobBak + BackShd) while the measured rear sensor is used as-measured (rear_shade = 0). \(E_{Total} = E_{POA} + E_{Rear} \cdot \varphi\), following the NREL modified bifacial approach. See Choosing a test setup in the CapTest user guide for the per-side formulas.

bifi_e2848_etotal_rear_shade_meas

Same regression form as bifi_e2848_etotal_rear_shade_sim, but rear-shading losses are applied on the measured side via the e_total rear_shade factor while the modeled rear maps directly to PVsyst’s unshaded GlobBak. \(E_{Total} = E_{POA} + E_{Rear} \cdot \varphi \cdot (1 - s)\) on the measured side, where \(s\) is the rear_shade fraction.

bifi_power_tc_meas_tbom

Temperature-corrected power regressed against front and rear irradiance. Back-of-module temperature is taken directly from field measurements and used to calculate cell temperature via the Sandia PV Array Performance Model.

bifi_power_tc_calc_tbom

Temperature-corrected power regressed against front and rear irradiance. Back-of-module and cell temperature are both calculated from POA irradiance, ambient temperature, and wind speed via the Sandia model; no dedicated BOM sensor is required.

bifi_power_tc_etotal_rear_shade_sim

Temperature-corrected power regressed against total effective irradiance. Back-of-module temperature is taken from field measurements and used to calculate cell temperature via the Sandia PV Array Performance Model. Rear shading and IAM losses are handled in the modeled (PVsyst) data (rpoa_pvsyst = GlobBak + BackShd) while the measured rear sensor is used as-measured (rear_shade = 0). \(E_{Total} = E_{POA} + E_{Rear} \cdot \varphi\), following the NREL modified bifacial approach.

bifi_power_tc_etotal_rear_shade_meas

Same regression form as bifi_power_tc_etotal_rear_shade_sim, but rear-shading losses are applied on the measured side via the e_total rear_shade factor while the modeled rear maps directly to PVsyst’s unshaded GlobBak. \(E_{Total} = E_{POA} + E_{Rear} \cdot \varphi \cdot (1 - s)\) on the measured side, where \(s\) is the rear_shade fraction.

e2848_spec_corrected_poa

Standard ASTM E2848 regression with a First Solar spectral correction applied to front-side POA before fitting. Requires relative humidity and atmospheric pressure on the measured side and precipitable water from the PVsyst output.

bifi_e2848_etotal_rear_shade_sim_spec_corrected

Standard ASTM E2848 regression with total effective irradiance replacing front-side POA and a First Solar spectral correction applied to the front-side POA used to calculate the total irradiance. Requires relative humidity and atmospheric pressure on the measured side and precipitable water from the PVsyst output. Rear shading and IAM losses are handled in the modeled (PVsyst) data (rpoa_pvsyst = GlobBak + BackShd) while the measured rear sensor is used as-measured (rear_shade = 0). \(E_{Total} = E_{POA} + E_{Rear} \cdot \varphi\) with the spectral correction applied to \(E_{POA}\).

bifi_e2848_etotal_rear_shade_meas_spec_corrected

Same regression form as bifi_e2848_etotal_rear_shade_sim_spec_corrected, but rear-shading losses are applied on the measured side via the e_total rear_shade factor while the modeled rear maps directly to PVsyst’s unshaded GlobBak. \(E_{Total} = E_{POA} + E_{Rear} \cdot \varphi \cdot (1 - s)\) on the measured side, where \(s\) is the rear_shade fraction.