forked from IPKM/nmreval
add FID as fallback option for dtype in nmrreader
This commit is contained in:
parent
84d136dd4c
commit
cd9c85c12b
@ -53,11 +53,17 @@ class NMRReader:
|
|||||||
states = pickle.load(fp)
|
states = pickle.load(fp)
|
||||||
|
|
||||||
datalist = OrderedDict()
|
datalist = OrderedDict()
|
||||||
_dtypes = {'pts': Points, 'fit': FitResult, 'fid': FID, 'bds': BDS, 'dsc': DSC}
|
_dtypes = {'pts': Points,
|
||||||
|
'fit': FitResult,
|
||||||
|
'fid': FID,
|
||||||
|
'bds': BDS,
|
||||||
|
'dsc': DSC,
|
||||||
|
'spectrum': Spectrum
|
||||||
|
}
|
||||||
|
|
||||||
for s in states['sets']:
|
for s in states['sets']:
|
||||||
set_id = s.pop('id')
|
set_id = s.pop('id')
|
||||||
dtype = _dtypes[s.pop('mode')]
|
dtype = _dtypes.get(s.pop('mode'), FID)
|
||||||
data = dtype.set_state(s.pop('data'))
|
data = dtype.set_state(s.pop('data'))
|
||||||
datalist[set_id] = (data, s)
|
datalist[set_id] = (data, s)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user