@@ -306,21 +306,21 @@ def test_spectral_factor_jrc_supplied_ambiguous():
306306
307307@pytest .mark .parametrize ("module_type,expected" , [
308308 ('cdte' , np .array (
309- [0.991926 , 0.999809 , 1.01108 , 0.993319 , 0.956621 , 0.970872 ])),
309+ [0.992801 , 1.00004 , 1.011576 , 0.995003 , 0.950156 , 0.975665 ])),
310310 ('monosi' , np .array (
311- [1.00174 , 0.971769 , 0.986224 , 1.01661 , 1.02026 , 1.0106 ])),
311+ [1.000152 , 0.969588 , 0.984636 , 1.015405 , 1.024238 , 1.005061 ])),
312312 ('cigs' , np .array (
313- [1.00769 , 0.959666 , 0.974438 , 1.02861 , 1.05203 , 1.03117 ])),
313+ [1.004621 , 0.956719 , 0.971668 , 1.0254 , 1.060066 , 1.020196 ])),
314314 ('asi' , np .array (
315- [0.982133 , 1.04674 , 1.04859 , 0.951109 , 0.865328 , 0.919515 ])),
315+ [0.986968 , 1.049725 , 1.051978 , 0.957968 , 0.842258 , 0.941927 ])),
316316])
317317def test_spectral_factor_polo (module_type , expected ):
318- altitude = 500
319318 pws = np .array ([0.96 , 0.96 , 1.85 , 1.88 , 0.66 , 0.66 ])
320319 aods = np .array ([0.085 , 0.085 , 0.16 , 0.19 , 0.088 , 0.088 ])
321320 ams = np .array ([1.34 , 1.34 , 2.2 , 2.2 , 2.6 , 2.6 ])
322321 aois = np .array ([46.0 , 76.0 , 74.0 , 28.0 , 24.0 , 55.0 ])
322+ pressure = np .array ([101300 , 101400 , 100500 , 101325 , 80000 , 120000 ])
323323 alb = np .array ([0.15 , 0.2 , 0.3 , 0.18 , 0.32 , 0.26 ])
324324 out = spectrum .spectral_factor_polo (
325- pws , ams , aods , aois , altitude , module_type = module_type , albedo = alb )
326- assert np .allclose ( expected , out , atol = 1e-8 )
325+ pws , ams , aods , aois , pressure , module_type = module_type , albedo = alb )
326+ np .testing . assert_allclose ( out , expected , atol = 1e-6 )
0 commit comments