mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
feat: Deprecation warning for Corr.GEVP kwarg state removed,
documentation extended.
This commit is contained in:
parent
98ce553521
commit
088a7da7e6
2 changed files with 10 additions and 5 deletions
|
@ -245,7 +245,11 @@ class Corr:
|
|||
r'''Solve the generalized eigenvalue problem on the correlator matrix and returns the corresponding eigenvectors.
|
||||
|
||||
The eigenvectors are sorted according to the descending eigenvalues, the zeroth eigenvector(s) correspond to the
|
||||
largest eigenvalue(s).
|
||||
largest eigenvalue(s). The eigenvector(s) for the individual states can be accessed via slicing
|
||||
```python
|
||||
C.GEVP(t0=2)[0] # Ground state vector(s)
|
||||
C.GEVP(t0=2)[:3] # Vectors for the lowest three states
|
||||
```
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
@ -259,6 +263,11 @@ class Corr:
|
|||
- "Eigenvalue": The eigenvector is chosen according to which eigenvalue it belongs individually on every timeslice.
|
||||
- "Eigenvector": Use the method described in arXiv:2004.10472 to find the set of v(t) belonging to the state.
|
||||
The reference state is identified by its eigenvalue at $t=t_s$.
|
||||
|
||||
Other Parameters
|
||||
----------------
|
||||
state : int
|
||||
Returns only the vector(s) for a specified state. The lowest state is zero.
|
||||
'''
|
||||
|
||||
if self.N == 1:
|
||||
|
@ -310,7 +319,6 @@ class Corr:
|
|||
raise Exception("Unkown value for 'sort'.")
|
||||
|
||||
if "state" in kwargs:
|
||||
warnings.warn("Argument 'state' is deprecated, use slicing instead.", DeprecationWarning)
|
||||
return reordered_vecs[kwargs.get("state")]
|
||||
else:
|
||||
return reordered_vecs
|
||||
|
|
|
@ -256,9 +256,6 @@ def test_GEVP_warnings():
|
|||
with pytest.warns(DeprecationWarning):
|
||||
corr_mat.GEVP(0, sorted_list="Eigenvalue")
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
corr_mat.GEVP(0, state=0)
|
||||
|
||||
def test_GEVP_exceptions():
|
||||
corr_aa = _gen_corr(1)
|
||||
corr_ab = 0.5 * corr_aa
|
||||
|
|
Loading…
Add table
Reference in a new issue