mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
comments extended
This commit is contained in:
parent
4d746802d2
commit
2b30623235
1 changed files with 15 additions and 35 deletions
|
@ -144,7 +144,7 @@ class Corr:
|
||||||
if(all([x is None for x in newcontent])):
|
if(all([x is None for x in newcontent])):
|
||||||
raise Exception("Corr could not be symmetrized: No redundant values")
|
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):
|
def anti_symmetric(self):
|
||||||
|
|
||||||
|
@ -205,14 +205,6 @@ class Corr:
|
||||||
return Corr(newcontent)
|
return Corr(newcontent)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def roll(self, dt):
|
def roll(self, dt):
|
||||||
return Corr(list(np.roll(np.array(self.content, dtype=object), dt)))
|
return Corr(list(np.roll(np.array(self.content, dtype=object), dt)))
|
||||||
|
|
||||||
|
@ -365,15 +357,7 @@ class Corr:
|
||||||
self.prange=prange
|
self.prange=prange
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Plotting routine for correlator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#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
|
|
||||||
def show(self, x_range=None, comp=None, logscale=False, plateau=None, fit_res=None, save=None, ylabel=None):
|
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.
|
"""Plots the correlator, uses tag as label if available.
|
||||||
|
|
||||||
|
@ -453,10 +437,6 @@ class Corr:
|
||||||
def print(self, range=[0, None]):
|
def print(self, range=[0, None]):
|
||||||
print(self.__repr__(range))
|
print(self.__repr__(range))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def __repr__(self, range=[0, None]):
|
def __repr__(self, range=[0, None]):
|
||||||
if range[1]:
|
if range[1]:
|
||||||
range[1] += 1
|
range[1] += 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue