forked from pvlib/pvlib-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_panond.py
More file actions
32 lines (26 loc) · 1.14 KB
/
test_panond.py
File metadata and controls
32 lines (26 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
test iotools for panond
"""
from pvlib.iotools import read_panond
from pvlib.tests.conftest import TESTS_DATA_DIR
PAN_FILE = TESTS_DATA_DIR / 'ET-M772BH550GL.PAN'
OND_FILE = TESTS_DATA_DIR / 'CPS SCH275KTL-DO-US-800-250kW_275kVA_1.OND'
def test_read_panond():
# test that returned contents have expected keys, types, and structure
pan = read_panond(PAN_FILE, encoding='utf-8-sig')
assert list(pan.keys()) == ['PVObject_']
pan = pan['PVObject_']
assert pan['PVObject_Commercial']['Model'] == 'ET-M772BH550GL'
assert pan['Voc'] == 49.9
assert pan['PVObject_IAM']['IAMProfile']['Point_5'] == [50.0, 0.98]
assert pan['BifacialityFactor'] == 0.7
assert pan['FrontSurface'] == 'fsARCoating'
assert pan['Technol'] == 'mtSiMono'
ond = read_panond(OND_FILE, encoding='utf-8-sig')
assert list(ond.keys()) == ['PVObject_']
ond = ond['PVObject_']
assert ond['PVObject_Commercial']['Model'] == 'CPS SCH275KTL-DO/US-800'
assert ond['TanPhiMin'] == -0.75
assert ond['NbMPPT'] == 12
assert ond['Converter']['ModeOper'] == 'MPPT'
assert ond['Converter']['ProfilPIOV2']['Point_5'] == [75795.9, 75000.0]