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.
|
Config + state container for an ASTM E2848 capacity test. |
Constructors
Alternative constructors for building a CapTest
from parameters, YAML files, or mapping objects.
|
Construct a CapTest from parameter kwargs. |
|
Construct a CapTest from a yaml config file. |
|
Construct a CapTest from an already-parsed captest sub-mapping. |
Setup
Methods for configuring the test and serializing configuration.
|
Resolve TEST_SETUPS, propagate scalars, process regression cols. |
|
Serialize the curated CapTest configuration to a yaml file. |
Return the resolved TEST_SETUPS entry or raise if setup() not run. |
Reporting Conditions
|
Call |
Lower irradiance fraction bound derived from |
|
Upper irradiance fraction bound derived from |
Results
Methods for running the capacity test and evaluating pass/fail.
Compute the capacity test ratio for |
|
Compute cap ratio with and without p-value filtering. |
|
|
Determine a pass/fail result from a capacity ratio. |
Concatenate |
Visualization
|
Create the scatter plot for the active capacity-test setup. |
Overlay the final scatter plot from |
|
Overlayed residual plots for |
Module-level Functions
Standalone functions used alongside CapTest.
|
Load and lightly validate the captest sub-mapping from a yaml file. |
Validate a single |
|
|
Resolve a preset by name plus optional overrides. |
Return a callable that computes the |
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, andrep_conditions.
The built-in presets are:
e2848_defaultStandard 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_etotalStandard ASTM E2848 regression form with total effective irradiance replacing front-side POA as the independent variable. \(E_{Total} = E_{POA} + E_{Rear} \cdot \varphi\), following the NREL modified bifacial approach.
bifi_power_tc_meas_tbomTemperature-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_tbomTemperature-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.
e2848_spec_corrected_poaStandard 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.