From 9442fda122e5c89ac86ff3a3c7ddcd9d50ace6eb Mon Sep 17 00:00:00 2001 From: fjosw Date: Mon, 1 Aug 2022 15:54:46 +0000 Subject: [PATCH] Documentation updated --- docs/pyerrors/correlators.html | 98 ++++++++++++++++---------------- docs/pyerrors/input/openQCD.html | 16 +++--- docs/pyerrors/input/sfcf.html | 20 +++---- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/docs/pyerrors/correlators.html b/docs/pyerrors/correlators.html index 52f4ee38..a550a580 100644 --- a/docs/pyerrors/correlators.html +++ b/docs/pyerrors/correlators.html @@ -336,7 +336,7 @@ 119 def gamma_method(self, **kwargs): 120 """Apply the gamma method to the content of the Corr.""" 121 for item in self.content: - 122 if not(item is None): + 122 if not (item is None): 123 if self.N == 1: 124 item[0].gamma_method(**kwargs) 125 else: @@ -356,7 +356,7 @@ 139 140 if vector_l is None: 141 vector_l, vector_r = np.asarray([1.] + (self.N - 1) * [0.]), np.asarray([1.] + (self.N - 1) * [0.]) - 142 elif(vector_r is None): + 142 elif (vector_r is None): 143 vector_r = vector_l 144 if isinstance(vector_l, list) and not isinstance(vector_r, list): 145 if len(vector_l) != self.T: @@ -395,7 +395,7 @@ 178 """ 179 if self.N == 1: 180 raise Exception("Trying to pick item from projected Corr") - 181 newcontent = [None if(item is None) else item[i, j] for item in self.content] + 181 newcontent = [None if (item is None) else item[i, j] for item in self.content] 182 return Corr(newcontent) 183 184 def plottable(self): @@ -428,7 +428,7 @@ 211 newcontent.append(None) 212 else: 213 newcontent.append(0.5 * (self.content[t] + self.content[self.T - t])) - 214 if(all([x is None for x in newcontent])): + 214 if (all([x is None for x in newcontent])): 215 raise Exception("Corr could not be symmetrized: No redundant values") 216 return Corr(newcontent, prange=self.prange) 217 @@ -450,7 +450,7 @@ 233 newcontent.append(None) 234 else: 235 newcontent.append(0.5 * (self.content[t] - self.content[self.T - t])) - 236 if(all([x is None for x in newcontent])): + 236 if (all([x is None for x in newcontent])): 237 raise Exception("Corr could not be symmetrized: No redundant values") 238 return Corr(newcontent, prange=self.prange) 239 @@ -751,7 +751,7 @@ 534 newcontent.append(None) 535 else: 536 newcontent.append(0.5 * (self.content[t + 1] - self.content[t - 1])) - 537 if(all([x is None for x in newcontent])): + 537 if (all([x is None for x in newcontent])): 538 raise Exception('Derivative is undefined at all timeslices') 539 return Corr(newcontent, padding=[1, 1]) 540 elif variant == "forward": @@ -761,7 +761,7 @@ 544 newcontent.append(None) 545 else: 546 newcontent.append(self.content[t + 1] - self.content[t]) - 547 if(all([x is None for x in newcontent])): + 547 if (all([x is None for x in newcontent])): 548 raise Exception("Derivative is undefined at all timeslices") 549 return Corr(newcontent, padding=[0, 1]) 550 elif variant == "backward": @@ -771,7 +771,7 @@ 554 newcontent.append(None) 555 else: 556 newcontent.append(self.content[t] - self.content[t - 1]) - 557 if(all([x is None for x in newcontent])): + 557 if (all([x is None for x in newcontent])): 558 raise Exception("Derivative is undefined at all timeslices") 559 return Corr(newcontent, padding=[1, 0]) 560 elif variant == "improved": @@ -781,7 +781,7 @@ 564 newcontent.append(None) 565 else: 566 newcontent.append((1 / 12) * (self.content[t - 2] - 8 * self.content[t - 1] + 8 * self.content[t + 1] - self.content[t + 2])) - 567 if(all([x is None for x in newcontent])): + 567 if (all([x is None for x in newcontent])): 568 raise Exception('Derivative is undefined at all timeslices') 569 return Corr(newcontent, padding=[2, 2]) 570 else: @@ -805,7 +805,7 @@ 588 newcontent.append(None) 589 else: 590 newcontent.append((self.content[t + 1] - 2 * self.content[t] + self.content[t - 1])) - 591 if(all([x is None for x in newcontent])): + 591 if (all([x is None for x in newcontent])): 592 raise Exception("Derivative is undefined at all timeslices") 593 return Corr(newcontent, padding=[1, 1]) 594 elif variant == "improved": @@ -815,7 +815,7 @@ 598 newcontent.append(None) 599 else: 600 newcontent.append((1 / 12) * (-self.content[t + 2] + 16 * self.content[t + 1] - 30 * self.content[t] + 16 * self.content[t - 1] - self.content[t - 2])) - 601 if(all([x is None for x in newcontent])): + 601 if (all([x is None for x in newcontent])): 602 raise Exception("Derivative is undefined at all timeslices") 603 return Corr(newcontent, padding=[2, 2]) 604 else: @@ -846,7 +846,7 @@ 629 newcontent.append(None) 630 else: 631 newcontent.append(self.content[t] / self.content[t + 1]) - 632 if(all([x is None for x in newcontent])): + 632 if (all([x is None for x in newcontent])): 633 raise Exception('m_eff is undefined at all timeslices') 634 635 return np.log(Corr(newcontent, padding=[0, 1])) @@ -871,7 +871,7 @@ 654 newcontent.append(None) 655 else: 656 newcontent.append(np.abs(find_root(self.content[t][0] / self.content[t + 1][0], root_function, guess=guess))) - 657 if(all([x is None for x in newcontent])): + 657 if (all([x is None for x in newcontent])): 658 raise Exception('m_eff is undefined at all timeslices') 659 660 return Corr(newcontent, padding=[0, 1]) @@ -883,7 +883,7 @@ 666 newcontent.append(None) 667 else: 668 newcontent.append((self.content[t + 1] + self.content[t - 1]) / (2 * self.content[t])) - 669 if(all([x is None for x in newcontent])): + 669 if (all([x is None for x in newcontent])): 670 raise Exception("m_eff is undefined at all timeslices") 671 return np.arccosh(Corr(newcontent, padding=[1, 1])) 672 @@ -946,7 +946,7 @@ 729 raise Exception("no plateau range provided") 730 if self.N != 1: 731 raise Exception("Correlator must be projected before getting a plateau.") - 732 if(all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1] + 1)])): + 732 if (all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1] + 1)])): 733 raise Exception("plateau is undefined at all timeslices in plateaurange.") 734 if auto_gamma: 735 self.gamma_method() @@ -1211,7 +1211,7 @@ 994 995 def __mul__(self, y): 996 if isinstance(y, Corr): - 997 if not((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): + 997 if not ((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): 998 raise Exception("Multiplication of Corr object requires N=N or N=1 and T=T") 999 newcontent = [] 1000 for t in range(self.T): @@ -1239,7 +1239,7 @@ 1022 1023 def __truediv__(self, y): 1024 if isinstance(y, Corr): -1025 if not((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): +1025 if not ((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): 1026 raise Exception("Multiplication of Corr object requires N=N or N=1 and T=T") 1027 newcontent = [] 1028 for t in range(self.T): @@ -1622,7 +1622,7 @@ 120 def gamma_method(self, **kwargs): 121 """Apply the gamma method to the content of the Corr.""" 122 for item in self.content: - 123 if not(item is None): + 123 if not (item is None): 124 if self.N == 1: 125 item[0].gamma_method(**kwargs) 126 else: @@ -1642,7 +1642,7 @@ 140 141 if vector_l is None: 142 vector_l, vector_r = np.asarray([1.] + (self.N - 1) * [0.]), np.asarray([1.] + (self.N - 1) * [0.]) - 143 elif(vector_r is None): + 143 elif (vector_r is None): 144 vector_r = vector_l 145 if isinstance(vector_l, list) and not isinstance(vector_r, list): 146 if len(vector_l) != self.T: @@ -1681,7 +1681,7 @@ 179 """ 180 if self.N == 1: 181 raise Exception("Trying to pick item from projected Corr") - 182 newcontent = [None if(item is None) else item[i, j] for item in self.content] + 182 newcontent = [None if (item is None) else item[i, j] for item in self.content] 183 return Corr(newcontent) 184 185 def plottable(self): @@ -1714,7 +1714,7 @@ 212 newcontent.append(None) 213 else: 214 newcontent.append(0.5 * (self.content[t] + self.content[self.T - t])) - 215 if(all([x is None for x in newcontent])): + 215 if (all([x is None for x in newcontent])): 216 raise Exception("Corr could not be symmetrized: No redundant values") 217 return Corr(newcontent, prange=self.prange) 218 @@ -1736,7 +1736,7 @@ 234 newcontent.append(None) 235 else: 236 newcontent.append(0.5 * (self.content[t] - self.content[self.T - t])) - 237 if(all([x is None for x in newcontent])): + 237 if (all([x is None for x in newcontent])): 238 raise Exception("Corr could not be symmetrized: No redundant values") 239 return Corr(newcontent, prange=self.prange) 240 @@ -2037,7 +2037,7 @@ 535 newcontent.append(None) 536 else: 537 newcontent.append(0.5 * (self.content[t + 1] - self.content[t - 1])) - 538 if(all([x is None for x in newcontent])): + 538 if (all([x is None for x in newcontent])): 539 raise Exception('Derivative is undefined at all timeslices') 540 return Corr(newcontent, padding=[1, 1]) 541 elif variant == "forward": @@ -2047,7 +2047,7 @@ 545 newcontent.append(None) 546 else: 547 newcontent.append(self.content[t + 1] - self.content[t]) - 548 if(all([x is None for x in newcontent])): + 548 if (all([x is None for x in newcontent])): 549 raise Exception("Derivative is undefined at all timeslices") 550 return Corr(newcontent, padding=[0, 1]) 551 elif variant == "backward": @@ -2057,7 +2057,7 @@ 555 newcontent.append(None) 556 else: 557 newcontent.append(self.content[t] - self.content[t - 1]) - 558 if(all([x is None for x in newcontent])): + 558 if (all([x is None for x in newcontent])): 559 raise Exception("Derivative is undefined at all timeslices") 560 return Corr(newcontent, padding=[1, 0]) 561 elif variant == "improved": @@ -2067,7 +2067,7 @@ 565 newcontent.append(None) 566 else: 567 newcontent.append((1 / 12) * (self.content[t - 2] - 8 * self.content[t - 1] + 8 * self.content[t + 1] - self.content[t + 2])) - 568 if(all([x is None for x in newcontent])): + 568 if (all([x is None for x in newcontent])): 569 raise Exception('Derivative is undefined at all timeslices') 570 return Corr(newcontent, padding=[2, 2]) 571 else: @@ -2091,7 +2091,7 @@ 589 newcontent.append(None) 590 else: 591 newcontent.append((self.content[t + 1] - 2 * self.content[t] + self.content[t - 1])) - 592 if(all([x is None for x in newcontent])): + 592 if (all([x is None for x in newcontent])): 593 raise Exception("Derivative is undefined at all timeslices") 594 return Corr(newcontent, padding=[1, 1]) 595 elif variant == "improved": @@ -2101,7 +2101,7 @@ 599 newcontent.append(None) 600 else: 601 newcontent.append((1 / 12) * (-self.content[t + 2] + 16 * self.content[t + 1] - 30 * self.content[t] + 16 * self.content[t - 1] - self.content[t - 2])) - 602 if(all([x is None for x in newcontent])): + 602 if (all([x is None for x in newcontent])): 603 raise Exception("Derivative is undefined at all timeslices") 604 return Corr(newcontent, padding=[2, 2]) 605 else: @@ -2132,7 +2132,7 @@ 630 newcontent.append(None) 631 else: 632 newcontent.append(self.content[t] / self.content[t + 1]) - 633 if(all([x is None for x in newcontent])): + 633 if (all([x is None for x in newcontent])): 634 raise Exception('m_eff is undefined at all timeslices') 635 636 return np.log(Corr(newcontent, padding=[0, 1])) @@ -2157,7 +2157,7 @@ 655 newcontent.append(None) 656 else: 657 newcontent.append(np.abs(find_root(self.content[t][0] / self.content[t + 1][0], root_function, guess=guess))) - 658 if(all([x is None for x in newcontent])): + 658 if (all([x is None for x in newcontent])): 659 raise Exception('m_eff is undefined at all timeslices') 660 661 return Corr(newcontent, padding=[0, 1]) @@ -2169,7 +2169,7 @@ 667 newcontent.append(None) 668 else: 669 newcontent.append((self.content[t + 1] + self.content[t - 1]) / (2 * self.content[t])) - 670 if(all([x is None for x in newcontent])): + 670 if (all([x is None for x in newcontent])): 671 raise Exception("m_eff is undefined at all timeslices") 672 return np.arccosh(Corr(newcontent, padding=[1, 1])) 673 @@ -2232,7 +2232,7 @@ 730 raise Exception("no plateau range provided") 731 if self.N != 1: 732 raise Exception("Correlator must be projected before getting a plateau.") - 733 if(all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1] + 1)])): + 733 if (all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1] + 1)])): 734 raise Exception("plateau is undefined at all timeslices in plateaurange.") 735 if auto_gamma: 736 self.gamma_method() @@ -2497,7 +2497,7 @@ 995 996 def __mul__(self, y): 997 if isinstance(y, Corr): - 998 if not((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): + 998 if not ((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): 999 raise Exception("Multiplication of Corr object requires N=N or N=1 and T=T") 1000 newcontent = [] 1001 for t in range(self.T): @@ -2525,7 +2525,7 @@ 1023 1024 def __truediv__(self, y): 1025 if isinstance(y, Corr): -1026 if not((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): +1026 if not ((self.N == 1 or y.N == 1 or self.N == y.N) and self.T == y.T): 1027 raise Exception("Multiplication of Corr object requires N=N or N=1 and T=T") 1028 newcontent = [] 1029 for t in range(self.T): @@ -2888,7 +2888,7 @@ region indentified for this correlator.
120    def gamma_method(self, **kwargs):
 121        """Apply the gamma method to the content of the Corr."""
 122        for item in self.content:
-123            if not(item is None):
+123            if not (item is None):
 124                if self.N == 1:
 125                    item[0].gamma_method(**kwargs)
 126                else:
@@ -2926,7 +2926,7 @@ region indentified for this correlator.
 140
 141        if vector_l is None:
 142            vector_l, vector_r = np.asarray([1.] + (self.N - 1) * [0.]), np.asarray([1.] + (self.N - 1) * [0.])
-143        elif(vector_r is None):
+143        elif (vector_r is None):
 144            vector_r = vector_l
 145        if isinstance(vector_l, list) and not isinstance(vector_r, list):
 146            if len(vector_l) != self.T:
@@ -2987,7 +2987,7 @@ By default it will return the lowest source, which usually means unsmeared-unsme
 179        """
 180        if self.N == 1:
 181            raise Exception("Trying to pick item from projected Corr")
-182        newcontent = [None if(item is None) else item[i, j] for item in self.content]
+182        newcontent = [None if (item is None) else item[i, j] for item in self.content]
 183        return Corr(newcontent)
 
@@ -3068,7 +3068,7 @@ timeslice and the error on each timeslice.

212 newcontent.append(None) 213 else: 214 newcontent.append(0.5 * (self.content[t] + self.content[self.T - t])) -215 if(all([x is None for x in newcontent])): +215 if (all([x is None for x in newcontent])): 216 raise Exception("Corr could not be symmetrized: No redundant values") 217 return Corr(newcontent, prange=self.prange) @@ -3108,7 +3108,7 @@ timeslice and the error on each timeslice.

234 newcontent.append(None) 235 else: 236 newcontent.append(0.5 * (self.content[t] - self.content[self.T - t])) -237 if(all([x is None for x in newcontent])): +237 if (all([x is None for x in newcontent])): 238 raise Exception("Corr could not be symmetrized: No redundant values") 239 return Corr(newcontent, prange=self.prange) @@ -3724,7 +3724,7 @@ Parity quantum number of the correlator, can be +1 or -1 535 newcontent.append(None) 536 else: 537 newcontent.append(0.5 * (self.content[t + 1] - self.content[t - 1])) -538 if(all([x is None for x in newcontent])): +538 if (all([x is None for x in newcontent])): 539 raise Exception('Derivative is undefined at all timeslices') 540 return Corr(newcontent, padding=[1, 1]) 541 elif variant == "forward": @@ -3734,7 +3734,7 @@ Parity quantum number of the correlator, can be +1 or -1 545 newcontent.append(None) 546 else: 547 newcontent.append(self.content[t + 1] - self.content[t]) -548 if(all([x is None for x in newcontent])): +548 if (all([x is None for x in newcontent])): 549 raise Exception("Derivative is undefined at all timeslices") 550 return Corr(newcontent, padding=[0, 1]) 551 elif variant == "backward": @@ -3744,7 +3744,7 @@ Parity quantum number of the correlator, can be +1 or -1 555 newcontent.append(None) 556 else: 557 newcontent.append(self.content[t] - self.content[t - 1]) -558 if(all([x is None for x in newcontent])): +558 if (all([x is None for x in newcontent])): 559 raise Exception("Derivative is undefined at all timeslices") 560 return Corr(newcontent, padding=[1, 0]) 561 elif variant == "improved": @@ -3754,7 +3754,7 @@ Parity quantum number of the correlator, can be +1 or -1 565 newcontent.append(None) 566 else: 567 newcontent.append((1 / 12) * (self.content[t - 2] - 8 * self.content[t - 1] + 8 * self.content[t + 1] - self.content[t + 2])) -568 if(all([x is None for x in newcontent])): +568 if (all([x is None for x in newcontent])): 569 raise Exception('Derivative is undefined at all timeslices') 570 return Corr(newcontent, padding=[2, 2]) 571 else: @@ -3804,7 +3804,7 @@ Available choice: symmetric, forward, backward, improved, default: symmetric589 newcontent.append(None) 590 else: 591 newcontent.append((self.content[t + 1] - 2 * self.content[t] + self.content[t - 1])) -592 if(all([x is None for x in newcontent])): +592 if (all([x is None for x in newcontent])): 593 raise Exception("Derivative is undefined at all timeslices") 594 return Corr(newcontent, padding=[1, 1]) 595 elif variant == "improved": @@ -3814,7 +3814,7 @@ Available choice: symmetric, forward, backward, improved, default: symmetric599 newcontent.append(None) 600 else: 601 newcontent.append((1 / 12) * (-self.content[t + 2] + 16 * self.content[t + 1] - 30 * self.content[t] + 16 * self.content[t - 1] - self.content[t - 2])) -602 if(all([x is None for x in newcontent])): +602 if (all([x is None for x in newcontent])): 603 raise Exception("Derivative is undefined at all timeslices") 604 return Corr(newcontent, padding=[2, 2]) 605 else: @@ -3871,7 +3871,7 @@ Available choice: symmetric, improved, default: symmetric 630 newcontent.append(None) 631 else: 632 newcontent.append(self.content[t] / self.content[t + 1]) -633 if(all([x is None for x in newcontent])): +633 if (all([x is None for x in newcontent])): 634 raise Exception('m_eff is undefined at all timeslices') 635 636 return np.log(Corr(newcontent, padding=[0, 1])) @@ -3896,7 +3896,7 @@ Available choice: symmetric, improved, default: symmetric 655 newcontent.append(None) 656 else: 657 newcontent.append(np.abs(find_root(self.content[t][0] / self.content[t + 1][0], root_function, guess=guess))) -658 if(all([x is None for x in newcontent])): +658 if (all([x is None for x in newcontent])): 659 raise Exception('m_eff is undefined at all timeslices') 660 661 return Corr(newcontent, padding=[0, 1]) @@ -3908,7 +3908,7 @@ Available choice: symmetric, improved, default: symmetric 667 newcontent.append(None) 668 else: 669 newcontent.append((self.content[t + 1] + self.content[t - 1]) / (2 * self.content[t])) -670 if(all([x is None for x in newcontent])): +670 if (all([x is None for x in newcontent])): 671 raise Exception("m_eff is undefined at all timeslices") 672 return np.arccosh(Corr(newcontent, padding=[1, 1])) 673 @@ -4034,7 +4034,7 @@ Decides whether output is printed to the standard output. 730 raise Exception("no plateau range provided") 731 if self.N != 1: 732 raise Exception("Correlator must be projected before getting a plateau.") -733 if(all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1] + 1)])): +733 if (all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1] + 1)])): 734 raise Exception("plateau is undefined at all timeslices in plateaurange.") 735 if auto_gamma: 736 self.gamma_method() diff --git a/docs/pyerrors/input/openQCD.html b/docs/pyerrors/input/openQCD.html index 5daaa3b0..2eab665d 100644 --- a/docs/pyerrors/input/openQCD.html +++ b/docs/pyerrors/input/openQCD.html @@ -245,7 +245,7 @@ 157 config_no = struct.unpack('i', t)[0] 158 configlist[-1].append(config_no) 159 for i in range(nrw): -160 if(version == '2.0'): +160 if (version == '2.0'): 161 tmpd = _read_array_openQCD2(fp) 162 tmpd = _read_array_openQCD2(fp) 163 tmp_rw = tmpd['arr'] @@ -452,7 +452,7 @@ 364 configlist.append([]) 365 while True: 366 t = fp.read(4) -367 if(len(t) < 4): +367 if (len(t) < 4): 368 break 369 nc = struct.unpack('i', t)[0] 370 configlist[-1].append(nc) @@ -842,7 +842,7 @@ 754 755 t = fp.read(12) 756 Ls = struct.unpack('<iii', t) -757 if(Ls[0] == Ls[1] and Ls[1] == Ls[2]): +757 if (Ls[0] == Ls[1] and Ls[1] == Ls[2]): 758 L = Ls[0] 759 if not (supposed_L == L) and supposed_L: 760 raise Exception("It seems the length given in the header and by you contradict each other") @@ -857,7 +857,7 @@ 769 if c > cmax: 770 raise Exception('Flow has been determined between c=0 and c=%lf with tolerance %lf' % (cmax, tol)) 771 -772 if(zthfl == 2): +772 if (zthfl == 2): 773 nfl = 2 # number of flows 774 else: 775 nfl = 1 @@ -865,7 +865,7 @@ 777 778 while True: 779 t = fp.read(4) -780 if(len(t) < 4): +780 if (len(t) < 4): 781 break 782 traj_list.append(struct.unpack('i', t)[0]) # trajectory number when measurement was done 783 @@ -890,7 +890,7 @@ 802 803 while True: 804 t = fp.read(4) -805 if(len(t) < 4): +805 if (len(t) < 4): 806 break 807 traj_list.append(struct.unpack('i', t)[0]) 808 # Wsl @@ -1224,7 +1224,7 @@ 158 config_no = struct.unpack('i', t)[0] 159 configlist[-1].append(config_no) 160 for i in range(nrw): -161 if(version == '2.0'): +161 if (version == '2.0'): 162 tmpd = _read_array_openQCD2(fp) 163 tmpd = _read_array_openQCD2(fp) 164 tmp_rw = tmpd['arr'] @@ -1478,7 +1478,7 @@ Print additional information that is useful for debugging. 365 configlist.append([]) 366 while True: 367 t = fp.read(4) -368 if(len(t) < 4): +368 if (len(t) < 4): 369 break 370 nc = struct.unpack('i', t)[0] 371 configlist[-1].append(nc) diff --git a/docs/pyerrors/input/sfcf.html b/docs/pyerrors/input/sfcf.html index 28f77c65..cb1b8d18 100644 --- a/docs/pyerrors/input/sfcf.html +++ b/docs/pyerrors/input/sfcf.html @@ -147,11 +147,11 @@ 74 75 if version not in known_versions: 76 raise Exception("This version is not known!") - 77 if(version[-1] == "c"): + 77 if (version[-1] == "c"): 78 appended = False 79 compact = True 80 version = version[:-1] - 81 elif(version[-1] == "a"): + 81 elif (version[-1] == "a"): 82 appended = True 83 compact = False 84 version = version[:-1] @@ -325,7 +325,7 @@ 252 lines = fp.readlines() 253 # check, if the correlator is in fact 254 # printed completely -255 if(start_read + T > len(lines)): +255 if (start_read + T > len(lines)): 256 raise Exception("EOF before end of correlator data! Maybe " + path + '/' + item + '/' + sub_ls[cfg] + " is corrupted?") 257 # and start to read the correlator. 258 # the range here is chosen like this, @@ -335,7 +335,7 @@ 262 if k == start_read - 5 - b2b: 263 if lines[k].strip() != 'name ' + name: 264 raise Exception('Wrong format', sub_ls[cfg]) -265 if(k >= start_read and k < start_read + T): +265 if (k >= start_read and k < start_read + T): 266 floats = list(map(float, lines[k].split())) 267 deltas[k - start_read][i][cfg] = floats[-2:][im] 268 else: @@ -346,7 +346,7 @@ 273 # we can iterate over the whole file. 274 # here one can also implement the chekc from above. 275 for k, line in enumerate(fp): -276 if(k >= start_read and k < start_read + T): +276 if (k >= start_read and k < start_read + T): 277 floats = list(map(float, line.split())) 278 if version == "0.0": 279 deltas[k - start][i][cnfg] = floats[im - single] @@ -511,11 +511,11 @@ 75 76 if version not in known_versions: 77 raise Exception("This version is not known!") - 78 if(version[-1] == "c"): + 78 if (version[-1] == "c"): 79 appended = False 80 compact = True 81 version = version[:-1] - 82 elif(version[-1] == "a"): + 82 elif (version[-1] == "a"): 83 appended = True 84 compact = False 85 version = version[:-1] @@ -689,7 +689,7 @@ 253 lines = fp.readlines() 254 # check, if the correlator is in fact 255 # printed completely -256 if(start_read + T > len(lines)): +256 if (start_read + T > len(lines)): 257 raise Exception("EOF before end of correlator data! Maybe " + path + '/' + item + '/' + sub_ls[cfg] + " is corrupted?") 258 # and start to read the correlator. 259 # the range here is chosen like this, @@ -699,7 +699,7 @@ 263 if k == start_read - 5 - b2b: 264 if lines[k].strip() != 'name ' + name: 265 raise Exception('Wrong format', sub_ls[cfg]) -266 if(k >= start_read and k < start_read + T): +266 if (k >= start_read and k < start_read + T): 267 floats = list(map(float, lines[k].split())) 268 deltas[k - start_read][i][cfg] = floats[-2:][im] 269 else: @@ -710,7 +710,7 @@ 274 # we can iterate over the whole file. 275 # here one can also implement the chekc from above. 276 for k, line in enumerate(fp): -277 if(k >= start_read and k < start_read + T): +277 if (k >= start_read and k < start_read + T): 278 floats = list(map(float, line.split())) 279 if version == "0.0": 280 deltas[k - start][i][cnfg] = floats[im - single]