Skip to content

Commit d7a6dd5

Browse files
Merge pull request #189 from h2020charisma/fix_rc1_metadata
Fix ngs metadata None
2 parents 7c8c5ff + 189a9a6 commit d7a6dd5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/ramanchada2/io/experimental/rc1_parser/binary_readers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@ def read_ngs_meta(f):
199199
# add units to par names
200200
par = [name + f' [{unit}]' for name, unit in zip(par_names, par_units)]
201201
meta = dict(zip(par, par_values))
202-
return meta
202+
return meta

src/ramanchada2/io/experimental/rc1_parser/io.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def parse(source_path, file_type=None):
3434
)
3535

3636
x_data, y_data, metadata = reader(source_path)
37+
if metadata is None:
38+
metadata = {}
3739
# Get rid of bytes that are found in some of the formats
3840
metadata = cleanMeta(metadata)
3941
# Flatten metadata

0 commit comments

Comments
 (0)