def __init__(self, nodes): self.nodes = LCMSFeatureTreeList(nodes)
def clone(self, deep=False): return LCMSFeatureTreeList(node.clone(deep=deep) for node in self)
def _copy_chunk(self, nodes, *args, **kwargs): x = self.__class__(LCMSFeatureTreeList(nodes)) x.used_as_adduct = list(self.used_as_adduct) return x
def truncate_after(self, time): _, i = self.nodes.find_time(time) if self.nodes[i].time < time: i += 1 self.nodes = LCMSFeatureTreeList(self.nodes[:i]) self._invalidate()
def truncate_before(self, time: float): _, i = self.nodes.find_time(time) if self.nodes[i].time < time: i += 1 self.nodes = LCMSFeatureTreeList(self.nodes[i:]) self._invalidate()