CapData
The CapData class is the core interface for
capacity testing. It holds raw and filtered data, column group mappings, filter
history, and regression results.
|
Class to store capacity test data and column grouping. |
Setup
Methods that must be called after loading data and before filtering or
fitting a regression. Use set_regression_cols()
to map regression terms to column names or column group ids, then call
process_regression_columns() to validate and
prepare those mappings. custom_param() adds a
column of derived values (e.g. temperature-corrected power or spectral
corrections) directly to the CapData instance;
see Calculation Parameters for the available calculation functions.
|
Create a dictionary linking the regression variables to data. |
Walk the regression column dictionary and calculate parameters. |
|
|
Applies the function func with kwargs and adds result as new column to data. |
Data Management
Methods for inspecting, renaming, copying, and exporting data.
|
Get regression columns renamed with keys from regression_cols. |
Print column_groups with nice formatting. |
|
Create and returns a copy of self. |
|
Return a boolean indicating if the CapData object contains data. |
|
|
Drop columns from CapData data, data_filtered, and column_groups. |
|
Rename columns in data, data_filtered, and column_groups. |
Aggregation
Methods for aggregating sensor readings into single representative columns.
|
Aggregate measurments of the same variable from different sensors. |
|
Aggregate columns in a group. |
|
Traverses, expands, and sorts the agg_map. |
Remove aggregation columns from data and data_filtered attributes. |
Filtering
Methods that apply filters to data_filtered. Each method records the
rows kept and removed in the filter history.
|
Filter on irradiance values. |
|
Filter pvsyst data for off max power point tracking operation. |
|
Remove data during periods of array shading. |
|
Select data for a specified time period. |
|
Select or drop timestamps for days passed. |
|
Apply eliptic envelope from scikit-learn to remove outliers. |
|
Filter data on the power factor. |
|
Remove data above the specified power threshold. |
|
Apply update_summary decorator to passed function. |
|
Drop suspicious measurments by comparing values from different sensors. |
|
Use pvlib detect_clearsky to remove periods with unstable irradiance. |
|
Removes any rows where the regression columns contain missing data (NaNs). |
|
NOT CURRENTLY IMPLEMENTED - Filter on inverter operation state. |
Set data_filtered to data and reset filtering summary. |
Reporting Conditions
Methods for computing ASTM E2848 reporting conditions.
|
Calculate reporting conditions for the current regression formula. |
|
Calculate frequency-grouped reporting conditions. |
Regression
Methods for fitting the ASTM E2848 regression and predicting capacities.
|
Perform a regression with statsmodels on filtered data. |
Calculate expected capacities. |
Results and Uncertainty
Methods for quantifying test results, uncertainty, and completeness.
Calculate random standard uncertainty of the regression. |
|
|
Spatial uncertainties of the independent regression variables. |
|
Calculate expanded uncertainty of the predicted power. |
Returns DataFrame showing which filter removed each filtered time interval. |
|
Print a summary of filtering applied to the data_filtered attribute. |
|
|
print summary data on the number of points collected. |
Get length of test period. |
|
|
Set number of data points required for complete test attribute. |
|
Sets test_complete attribute. |
Visualization
Methods for scatter plots, filter inspection, and interactive dashboards.
|
Create a matplotlib scatter plot of regression lhs vs. |
|
Create a holoviews scatter plot of regression lhs vs. |
|
Create a dashboard to explore timeseries plots of the data. |
Create pandas scatter matrix of regression variables. |
|
Returns an overlay of scatter plots of intervals removed for each filter. |
|
Returns an overlay of scatter plots of intervals removed for each filter. |
Export
Methods for writing data and column groups to Excel.
Write the columns of data to an excel file as a template for a column grouping. |
|
|
Export the column groups attribute to an excel file. |