Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/sphinx/source/whatsnew/v0.16.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Deprecations

Bug fixes
~~~~~~~~~
* Fix incorrect column naming when parsing data from logical record
0500 using :py:func:`~pvlib.iotools.read_bsrn` or
:py:func:`~pvlib.iotools.get_bsrn`.
(:issue:`2835`, :pull:`2841`)
* :py:func:`~pvlib.irradiance.perez` no longer raises ``ZeroDivisionError`` on
scalar ``dhi=0`` input (e.g. nighttime); the scalar path now returns the same
finite value as the array path. (:pull:`2826`)
Expand Down
3 changes: 1 addition & 2 deletions pvlib/iotools/bsrn.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@
BSRN_LR0500_COLUMNS = ['day', 'minute', 'uva_global', 'uva_global_std',
'uva_global_min', 'uva_global_max', 'uvb_direct',
'uvb_direct_std', 'uvb_direct_min', 'uvb_direct_max',
'empty', 'empty', 'empty', 'empty',
'empty', 'empty', 'empty', 'empty', 'empty', 'empty',
'uvb_global', 'uvb_global_std', 'uvb_global_min',
'uvb_global_max', 'uvb_diffuse', 'uvb_diffuse_std',
'uvb_diffuse', 'uvb_diffuse_std',
'uvb_diffuse_min', 'uvb_diffuse_max',
'uvb_reflected', 'uvb_reflected_std',
'uvb_reflected_min', 'uvb_reflected_max']
Expand Down
3 changes: 3 additions & 0 deletions tests/iotools/test_bsrn.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def test_read_bsrn_logical_records(expected_index):
assert 'uva_global' in data.columns
assert 'uvb_reflected_std' in data.columns
assert 'ghi' not in data.columns
# Check that there are no duplicate columns when parsing
# LR0500 data (see #2841)
assert not data.columns.duplicated().any()


def test_read_bsrn_bad_logical_record():
Expand Down
Loading