Commit graph

62 commits

Author SHA1 Message Date
Fabian Joswig
3eac9214b4
[Fix] Ruff rules and more precise Excpetion types (#248)
* [Fix] Fix test for membership should be 'not in' (E713)

* [Fix] Fix module imported but unused (F401)

* [Fix] More precise Exception types in dirac, obs and correlator
2024-12-24 15:35:59 +01:00
JanNeuendorf
e1a4d0c218
Additional GEVP method with errors (#195)
* Added the function error_gevp() to compute the gevp with statistical errors.

* Changed method name from error_gevp to error_GEVP and removed automatic gamma method

* added auto_gamma to error_GEVP

* Specified exceptions in Corr.error_GEVP

* Fixed a wrong path. It should be np.linalg.LinAlgError

* Added a test for error_GEVP

* The tests of error_gevp loads a test matrix

* Incorporated eigenvectors with uncertainties in GEVP routine

* Cleaned up GEVP routines

* Cleaned up breaking change from merge

* Released tolerance in test of GEVP

* Repaired broken GEVP test

---------

Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-11-17 18:57:18 +01:00
Fabian Joswig
7f8c2ce33b
feat: added support for addition and multiplication of complex numbers (#209)
to Corr objects.
2023-07-21 14:15:41 +01:00
Fabian Joswig
af28f77ec5
__eq__ method for Corr class (#206)
* feat: implemented __eq__ method for Corr class.

* feat: __eq__ method now respects None entries in correlators.

* feat: Obs can now be compared to None, __ne__ method removed as it is
not required.

* feat: Corr.__eq__ rewritten to give a per element comparison.

* tests: additional test case for correlator comparison added.

* feat: comparison now also works for padding.
2023-07-19 15:06:19 +01:00
Fabian Joswig
66d5f8be24
Corr array initialization generalized (#203)
* feat: corr array initialization generalized.

* feat: additional checks for three-dimensional arrays added.

* docs: Corr docstring improved.

* docs: typos corrected.

* docs: details about None padding added to Corr docstring.
2023-07-18 12:07:46 +01:00
Fabian Joswig
f1150f09c8
Matmul overloaded for correlator class. (#199)
* feat: matmul method added to correlator class.

* feat: corr, corr matmul and correlator matrix trace added.

* tests: tests for matmul and trace added.

* tests: slightly reduced tolerance and good guess bad guess test.

* feat: rmatmul added and __array_priority__ set.

* tests: additional tests for rmatmul added.

* tests: one more tests for rmatmul added.

* docs: docstring added to Corr.trace.

* tests: associative property test added for complex Corr matmul.

* fix: Corr.roll method now also works for correlator matrices by
explicitly specifying the axis.

Co-authored-by: Matteo Di Carlo <matteo.dicarlo93@gmail.com>

* feat: exception type for correlator trace of 1dim correlator changed.

* tests: trace N=1 exception tested.

---------

Co-authored-by: Matteo Di Carlo <matteo.dicarlo93@gmail.com>
2023-07-17 11:48:57 +01:00
Fabian Joswig
9589820253
tests: coverage for all derivative variants extended. 2023-07-10 15:35:37 +01:00
Fabian Joswig
88fd37b241
fix: Corr.symmetric can now deal with None entries. (#145) 2023-01-16 16:10:19 +00:00
Fabian Joswig
b708411830
test: test for idl consistency after multiplication added. 2023-01-06 13:27:12 +01:00
Fabian Joswig
6343968404
fix: complex correlator fix extended to array valued complex
correlators.
2022-12-20 18:13:15 +01:00
Fabian Joswig
f39a70c5a8
fix: Corr.__repr__ also works for complex correlators. 2022-12-20 17:40:41 +01:00
Fabian Joswig
f68a5d044f
tests: test for construction of complex correlator object added. 2022-12-20 17:37:37 +01:00
Fabian Joswig
23708694d6
fix: bug in Corr.spaghetti_plot fixed which appeared in connection with
the replica separator. Test adjusted.
2022-12-07 12:23:49 +00:00
Fabian Joswig
ad1296ae47
tests: Exception for negative matrix in GEVP tested. 2022-11-30 16:47:57 +00:00
Simon Kuberski
9813f741f9 feat: added log-derivatives and symmetric effective mass 2022-10-19 16:08:31 +02:00
Fabian Joswig
2c2890d5ea tests: padding added to is_matrix_symmetric test. 2022-07-19 12:42:45 +01:00
Fabian Joswig
4a6dfe3482 tests: test for is_matrix_symmetric added. 2022-07-19 12:31:10 +01:00
Fabian Joswig
763c759ae0 fix: Corr.m_eff can now returns None entries if the correlator has a
sign flip. Before that the logarithm of a negative number was computed
and a warning was thrown.
2022-06-28 14:40:49 +01:00
Fabian Joswig
338bf8906a refactor: maintainability issues in tests fixed. 2022-06-24 12:28:49 +01:00
Fabian Joswig
612e6c742b tests: matplotlib figures explicitly closed in tests 2022-06-14 14:46:45 +01:00
Fabian Joswig
ed50240d29 fix: check for correlator None entries refactored and added to all
elementary operations. Tests added.
2022-06-13 12:59:54 +01:00
Fabian Joswig
5359a30b97 fix: Bug in Corr.projected fixed which appears in connection with arrays
of None as Corr entry.
2022-06-13 11:59:05 +01:00
Fabian Joswig
78f576a35e fix: Corr.matrix_symmetric now also works if entries of the correlators
are arrays with at least one None entry.
2022-06-09 16:47:13 +01:00
Fabian Joswig
f45b0aa6ec tests: coverage of Corr class improved. 2022-05-18 10:54:09 +01:00
Fabian Joswig
088a7da7e6 feat: Deprecation warning for Corr.GEVP kwarg state removed,
documentation extended.
2022-05-18 10:09:23 +01:00
Fabian Joswig
98ce553521 fix: exception for ts<=t0 generalized, tests added. 2022-05-18 10:02:56 +01:00
Fabian Joswig
2136958fbc feat: sorted_list argument readded to Corr.GEVP with a deprecation
warning.
2022-05-16 13:42:12 +01:00
Fabian Joswig
eb8090a90c tests: GEVP tests extended to all three sorting variants. 2022-05-16 13:28:10 +01:00
Fabian Joswig
410d7618a0 tests: GEVP tests updated to new syntax. 2022-05-16 12:07:36 +01:00
Fabian Joswig
92b19cba9f !feat: GEVP now returns all eigenvectors instead of just the ones for
the specified state.
2022-05-16 11:44:02 +01:00
Fabian Joswig
ba054fa11c refactor: correlators._solve_GEVP simplified and optimized, test added. 2022-05-16 11:35:23 +01:00
Fabian Joswig
10fc8b1f6e feat: GEVP not evaluated for t <= t0, additional checks added,
Eigenvector sort method can now cope with None entries.
2022-05-12 16:40:32 +01:00
Fabian Joswig
165e294b90 tests: test for Corr.matrix_symmetric added. 2022-05-12 16:08:42 +01:00
Fabian Joswig
c852de0688 tests: GEVP test extendd, test case for warning when ts and Eigenvalue
sorting are used at the same time.
2022-05-09 14:16:46 +01:00
Simon Kuberski
b8e5f9dfd4 Implemented the pruning of large correlation matrices by the solution of a GEVP at early times 2022-04-28 17:33:38 +02:00
Fabian Joswig
8d0bfafaab feat: spaghetti_plot method for monitoring exceptional configurations added to Corr class, tests added. 2022-03-08 10:50:46 +00:00
Fabian Joswig
6bfeff4f27 fix: Corr.fit now explicitly checks that the provided fit range is a two
element list.
2022-02-23 16:23:42 +00:00
Fabian Joswig
39dff5a830 tests: tests for GEVP fixed, docstring for Corr.Eigenvalue added, typos
fixed
2022-02-22 21:33:04 +00:00
Fabian Joswig
dd3bee5635 feat: basic arithmetic operations for correlators and np.ndarrays of the
same length work now.
2022-02-22 15:09:06 +00:00
Fabian Joswig
dce7d4bec8 tests: test for corr matrix initialization with none entries added. 2022-02-18 09:16:29 +00:00
Fabian Joswig
5f86aaba4b feat: calls to the gamma_method removed in Corr.__init__ and other
method of the Corr class. Test adjusted by adding additional calls to
the gamma_method
2022-02-15 13:25:01 +00:00
Fabian Joswig
ca04097272 feat: thin method added to Corr class which allows to thin out a
correlator in order suppress correlations between neighbouring entries
2022-02-09 15:32:18 +00:00
Fabian Joswig
60ad91ead6 tests: coverage in correlator increased 2022-02-08 14:43:23 +00:00
Fabian Joswig
6ae53cb575 tests: tests for correlator module corrected and extended 2022-02-08 14:31:49 +00:00
Fabian Joswig
9b63d8e2bd
Merge pull request #49 from fjosw/feature/improved_derivatives
feat!: Implemented improved first and second derivatives for the corresponding methods of the Corr class.
2022-01-31 17:30:22 +00:00
Fabian Joswig
a729def937 feat: backward derivative implemented, additional tests for deriv 2022-01-31 12:10:38 +00:00
Fabian Joswig
fb1f2074ca tests: Tests for matrix Corr methods added. docstrings updated 2022-01-31 11:21:16 +00:00
Fabian Joswig
8165479846 feat!: Implemented improved first and second derivatives for the
corresponding methods of the Corr class. The parameter which
distinguishes between the variant is now a string instead of a bool
which may break current analyses.
2022-01-31 10:50:00 +00:00
Fabian Joswig
8c53d500bf tests: additional tests for correlators with padding added 2022-01-27 17:06:49 +00:00
Fabian Joswig
50d6b0d9f5 tests: Warnings in tests fixed, conftest.py and pytest.ini removed 2022-01-20 13:49:34 +00:00