Skip to content
Snippets Groups Projects

first iteration of __isub__ method in RankingStat

Merged Leo Tsukada requested to merge offline_new-workflow-rankingstat-isub into offline_new-workflow
All threads resolved!
@@ -257,6 +257,15 @@ class RankingStat(snglcoinc.LnLikelihoodRatioMixin):
self.allow_impossible_candidates |= other.allow_impossible_candidates
return self
def __isub__(self, other):
if type(other) != type(self):
raise TypeError(other)
self.numerator -= other.numerator
self.denominator -= other.denominator
self.zerolag -= other.zerolag
self.allow_impossible_candidates |= other.allow_impossible_candidates
return self
def copy(self):
new = type(self)(template_ids = self.template_ids, instruments = self.instruments, population_model_file = self.population_model_file, dtdphi_file = self.dtdphi_file, min_instruments = self.min_instruments, delta_t = self.delta_t)
new.numerator = self.numerator.copy()
Loading