def test_wvm_invalid(clear_sky_index, positions): with pytest.raises(ValueError): scaling.wvm(clear_sky_index, positions, cloud_speed)
def test_wvm_array(clear_sky_index, positions, expect_cs_smooth): cs_sm, _, _ = scaling.wvm(clear_sky_index, positions, cloud_speed, dt=dt) assert_almost_equal(cs_sm[5000:5005], expect_cs_smooth, decimal=4)
def test_wvm_series_xyaslist(clear_sky_index, time, positions, expect_cs_smooth): csi_series = pd.Series(clear_sky_index, index=time) cs_sm, _, _ = scaling.wvm(csi_series, positions.tolist(), cloud_speed) assert_almost_equal(cs_sm[5000:5005], expect_cs_smooth, decimal=4)
def time_wvm(self): scaling.wvm(self.clearsky_index, self.positions, self.cloud_speed, dt=1)