mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
argument name changed in GEVP
This commit is contained in:
parent
8db648ee63
commit
0bac8a417a
1 changed files with 10 additions and 12 deletions
|
@ -245,7 +245,7 @@ class Corr:
|
||||||
# There are two ways, the GEVP metod can be called.
|
# There are two ways, the GEVP metod can be called.
|
||||||
# 1. return_list=False will return a single eigenvector, normalized according to V*C(t_0)*V=1
|
# 1. return_list=False will return a single eigenvector, normalized according to V*C(t_0)*V=1
|
||||||
# 2. return_list=True will return a new eigenvector for every timeslice. The time t_s is used to order the vectors according to. arXiv:2004.10472 [hep-lat]
|
# 2. return_list=True will return a new eigenvector for every timeslice. The time t_s is used to order the vectors according to. arXiv:2004.10472 [hep-lat]
|
||||||
def GEVP(self, t0, ts=None, state=0, return_list=False, sorting="Eigenvalue"):
|
def GEVP(self, t0, ts=None, state=0, sorted_list=None):
|
||||||
"""Solve the general eigenvalue problem on the current correlator
|
"""Solve the general eigenvalue problem on the current correlator
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -257,16 +257,13 @@ class Corr:
|
||||||
If return_list=True and sorting=Eigenvector it gives a reference point for the sorting method.
|
If return_list=True and sorting=Eigenvector it gives a reference point for the sorting method.
|
||||||
state : int
|
state : int
|
||||||
The state one is interested in ordered by energy. The lowest state is zero.
|
The state one is interested in ordered by energy. The lowest state is zero.
|
||||||
return_list : bool
|
sorted list : string
|
||||||
If False - The vector $v$ with G(t_s)v= lambda_state G(t_0)v is returned.
|
if this argument is set, a list of vectors (len=self.T) is returned. If it is left as None, only one vector is returned.
|
||||||
If True - The GEVP is solved once per timeslice and a list (len=T) of vectors is returned.
|
"Eigenvalue" - The eigenvector is chosen according to which einvenvalue it belongs individually on every timeslice.
|
||||||
sorting : string
|
"Eigenvector" - Use the method described in arXiv:2004.10472 [hep-lat] to find the set of v(t) belonging to the state.
|
||||||
Only matters if return_list=True. Determines how the vectors returned at every timeslice are chosen.
|
|
||||||
"Eigenvalue" - The eigenvector is chosen according to which einvenvalue it belongs individually on every timeslice.
|
|
||||||
"Eigenvector" - Use the method described in arXiv:2004.10472 [hep-lat] to find the set of v(t) belonging to the state.
|
|
||||||
The referense state is identified by its eigenvalue at t=ts
|
The referense state is identified by its eigenvalue at t=ts
|
||||||
"""
|
"""
|
||||||
if not return_list:
|
if sorted_list is None:
|
||||||
if (ts is None):
|
if (ts is None):
|
||||||
raise Exception("ts is required if return_list=False")
|
raise Exception("ts is required if return_list=False")
|
||||||
if (self.content[t0] is None) or (self.content[ts] is None):
|
if (self.content[t0] is None) or (self.content[ts] is None):
|
||||||
|
@ -280,7 +277,8 @@ class Corr:
|
||||||
sp_vecs = _GEVP_solver(Gt, G0)
|
sp_vecs = _GEVP_solver(Gt, G0)
|
||||||
sp_vec = sp_vecs[state]
|
sp_vec = sp_vecs[state]
|
||||||
return sp_vec
|
return sp_vec
|
||||||
if return_list:
|
else:
|
||||||
|
|
||||||
all_vecs = []
|
all_vecs = []
|
||||||
for t in range(self.T):
|
for t in range(self.T):
|
||||||
try:
|
try:
|
||||||
|
@ -291,14 +289,14 @@ class Corr:
|
||||||
Gt[i, j] = self.content[t][i, j].value
|
Gt[i, j] = self.content[t][i, j].value
|
||||||
|
|
||||||
sp_vecs = _GEVP_solver(Gt, G0)
|
sp_vecs = _GEVP_solver(Gt, G0)
|
||||||
if sorting == "Eigenvalue":
|
if sorted_list == "Eigenvalue":
|
||||||
sp_vec = sp_vecs[state]
|
sp_vec = sp_vecs[state]
|
||||||
all_vecs.append(sp_vec)
|
all_vecs.append(sp_vec)
|
||||||
else:
|
else:
|
||||||
all_vecs.append(sp_vecs)
|
all_vecs.append(sp_vecs)
|
||||||
except Exception:
|
except Exception:
|
||||||
all_vecs.append(None)
|
all_vecs.append(None)
|
||||||
if sorting == "Eigenvector":
|
if sorted_list == "Eigenvector":
|
||||||
if (ts is None):
|
if (ts is None):
|
||||||
raise Exception("ts is required for the Eigenvector sorting method.")
|
raise Exception("ts is required for the Eigenvector sorting method.")
|
||||||
all_vecs = _sort_vectors(all_vecs, ts)
|
all_vecs = _sort_vectors(all_vecs, ts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue