Skip to content

Commit 666597c

Browse files
committed
Add 'close' function to ThermoRaw and fix read_scans
1 parent e8dccc4 commit 666597c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

dimspy/portals/thermo_raw_portal.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,6 @@ def scan_dependents(self):
146146
for i, d in enumerate(gsd.ScanDependentDetailArray):
147147
l.append([scan_id, d.ScanIndex])
148148
return l
149+
150+
def close(self):
151+
self.run.Close()

dimspy/process/replicate_processing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ def read_scans(fn, source, function_noise, min_scans=1, filter_scan_events=None)
116116
scans[h] = run.peaklists(sids, function_noise)
117117
else:
118118
logging.warning('Not enough scans for [{}] [{} < {}]. Scan event {} has been removed.'.format(h, len(scans), min_scans, h))
119+
120+
if fn.lower().endswith(".raw"):
121+
run.close()
122+
119123
return scans
120124

121125

0 commit comments

Comments
 (0)