Skip to content
Snippets Groups Projects
Commit 445b41e8 authored by Felix Nippert's avatar Felix Nippert
Browse files

Bugfix for legacy files without "Power Track" attribute

parent 7aa62c6b
No related branches found
Tags v0.0.41
No related merge requests found
Pipeline #285041 passed
......@@ -111,7 +111,7 @@ def Automatic(filename):
if headers["Measurement Type"][1] == "PLE Xe Arc Lamp":
return PLE(axis,keys,values,None,None,headers)
else:
if headers["Power Track"][0] == "Record" or headers["Power Track"][0] == "Correct":
if "Power Track" in headers.keys() and (headers["Power Track"][0] == "Record" or headers["Power Track"][0] == "Correct"):
powers = Data1D(numpy.array(units[2+values.values.shape[0]:2+2*values.values.shape[0]]).astype(numpy.float64),DataType("Power","mW"))
else:
powers = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment