def __init__(self, dirpath, **kwargs):
self.dirpath = dirpath
self.dirpath = os.path.abspath(self.dirpath)
self.dirpath = os.path.normpath(self.dirpath)
self.source = self.create_com_object()
self.filter = self.create_com_object_filter()
try:
self.source.OpenDataFile(self.dirpath)
except comtypes.COMError as err:
raise IOError(str(err))
self._TIC = self.source.GetTIC()
self.device = self._TIC.DeviceName
self._n_spectra = self._TIC.TotalDataPoints
self._scan_types_flags = self.source.MSScanFileInformation.ScanTypes
self._producer = self._scan_group_iterator()
self._scan_cache = WeakValueDictionary()
self._index = self._pack_index()
self._get_instrument_info()
评论列表
文章目录