Generalized read_xy, so that WL can be float
This commit is contained in:
parent
3d493a69f8
commit
b483d8e5fb
1 changed files with 3 additions and 1 deletions
|
|
@ -576,10 +576,12 @@ def read_xy(data, options={}, index=0):
|
|||
#if 'wavelength' not in data.keys():
|
||||
# Get wavelength from scan
|
||||
|
||||
|
||||
if 'wavelength' in data.keys() and not type(data['wavelength']) == list:
|
||||
data['wavelength'] = [data['wavelength']]
|
||||
|
||||
if not 'wavelength' in data.keys() or not data['wavelength'][index]:
|
||||
wavelength = read_metadata_from_xy(path=data['path'][index])['wavelength']
|
||||
|
||||
else:
|
||||
wavelength = data['wavelength'][index]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue