comments extended

This commit is contained in:
Fabian Joswig 2021-10-11 09:40:20 +01:00
parent 4d746802d2
commit 2b30623235

View file

@ -144,7 +144,7 @@ class Corr:
if(all([x is None for x in newcontent])):
raise Exception("Corr could not be symmetrized: No redundant values")
return Corr(newcontent,prange= self.prange if hasattr(self,"prange") else None)
return Corr(newcontent, prange=self.prange if hasattr(self,"prange") else None)
def anti_symmetric(self):
@ -205,14 +205,6 @@ class Corr:
return Corr(newcontent)
def roll(self, dt):
return Corr(list(np.roll(np.array(self.content, dtype=object), dt)))
@ -365,15 +357,7 @@ class Corr:
self.prange=prange
return
#quick and dirty plotting function to view Correlator inside Jupyter
#If one would not want to import pyplot, this could easily be replaced by a call to pe.plot_corrs
#This might be a bit more flexible later
# Plotting routine for correlator
def show(self, x_range=None, comp=None, logscale=False, plateau=None, fit_res=None, save=None, ylabel=None):
"""Plots the correlator, uses tag as label if available.
@ -453,10 +437,6 @@ class Corr:
def print(self, range=[0, None]):
print(self.__repr__(range))
def __repr__(self, range=[0, None]):
if range[1]:
range[1] += 1