Skip to content

Commit 260aa20

Browse files
authored
Merge pull request #813 from typelogic/hdr_format_issue
Fix format for my header
2 parents f375982 + c9a4e84 commit 260aa20

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

plantcv/plantcv/hyperspectral/read_data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,19 @@ def read_data(filename):
118118
hdata = hdata.replace("{\n", "{")
119119
hdata = hdata.replace("\n}", "}")
120120
hdata = hdata.replace(" \n ", "")
121+
hdata = hdata.replace(" \n", "")
121122
hdata = hdata.replace(";", "")
122123
hdata = hdata.split("\n")
123124

124125
# Loop through and create a dictionary from the header file
125126
for i, string in enumerate(hdata):
126127
if ' = ' in string:
127128
header_data = string.split(" = ")
129+
header_data[0] = header_data[0].lower()
128130
header_dict.update({header_data[0].rstrip(): header_data[1].rstrip()})
129131
elif ' : ' in string:
130132
header_data = string.split(" : ")
133+
header_data[0] = header_data[0].lower()
131134
header_dict.update({header_data[0].rstrip(): header_data[1].rstrip()})
132135

133136
# Reformat wavelengths

0 commit comments

Comments
 (0)