From d5c8cf5a22bb08d60976e0126180d537cafec9e1 Mon Sep 17 00:00:00 2001 From: Michael Deceglie Date: Thu, 18 Apr 2024 15:22:46 -0600 Subject: [PATCH] Use csi clearsky filter in a number of tests --- rdtools/test/analysis_chains_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rdtools/test/analysis_chains_test.py b/rdtools/test/analysis_chains_test.py index cb635754..b6a8b23a 100644 --- a/rdtools/test/analysis_chains_test.py +++ b/rdtools/test/analysis_chains_test.py @@ -248,6 +248,7 @@ def test_filter_ad_hoc_warnings(workflow, sensor_parameters): rd_analysis.sensor_analysis(analyses=['yoy_degradation']) components = rd_analysis.sensor_filter_components else: + rd_analysis.filter_params['clearsky_filter'] = {'model':'csi'} rd_analysis.clearsky_analysis(analyses=['yoy_degradation']) components = rd_analysis.clearsky_filter_components @@ -345,6 +346,7 @@ def clearsky_parameters(basic_parameters, sensor_parameters, # functions to generate the data. rd_analysis = TrendAnalysis(**sensor_parameters) rd_analysis.set_clearsky(**cs_input) + rd_analysis.filter_params['clearsky_filter'] = {'model':'csi'} rd_analysis._clearsky_preprocess() poa = rd_analysis.poa_global_clearsky clearsky_parameters = basic_parameters @@ -357,6 +359,7 @@ def clearsky_parameters(basic_parameters, sensor_parameters, def clearsky_analysis(cs_input, clearsky_parameters): rd_analysis = TrendAnalysis(**clearsky_parameters) rd_analysis.set_clearsky(**cs_input) + rd_analysis.filter_params['clearsky_filter'] = {'model':'csi'} rd_analysis.clearsky_analysis(analyses=['yoy_degradation']) return rd_analysis @@ -404,6 +407,7 @@ def clearsky_analysis_exp_power(clearsky_parameters, clearsky_optional): clearsky_parameters['power_expected'] = power_expected rd_analysis = TrendAnalysis(**clearsky_parameters) rd_analysis.set_clearsky(**clearsky_optional) + rd_analysis.filter_params['clearsky_filter'] = {'model':'csi'} rd_analysis.clearsky_analysis(analyses=['yoy_degradation']) return rd_analysis @@ -483,6 +487,7 @@ def soiling_analysis_clearsky(soiling_parameters, cs_input): soiling_analysis = TrendAnalysis(**soiling_parameters) soiling_analysis.set_clearsky(**cs_input) np.random.seed(1977) + soiling_analysis.filter_params['clearsky_filter'] = {'model':'csi'} with pytest.warns(UserWarning, match='20% or more of the daily data'): soiling_analysis.clearsky_analysis(analyses=['srr_soiling'], srr_kwargs={'reps': 10}) @@ -548,13 +553,10 @@ def test_errors(sensor_parameters, clearsky_analysis): rdtemp._sensor_preprocess() # clearsky analysis with no tilt/azm - clearsky_analysis.pv_tilt = None - clearsky_analysis.poa_global_clearsky = None with pytest.raises(ValueError, match='pv_tilt and pv_azimuth must be provided'): clearsky_analysis._clearsky_preprocess() # clearsky analysis with no pvlib.loc - clearsky_analysis.pvlib_location = None with pytest.raises(ValueError, match='pvlib location must be provided'): clearsky_analysis._clearsky_preprocess()