Commit graph

355 commits

Author SHA1 Message Date
Fabian Joswig
7d2f8adf94
tests: trace N=1 exception tested. 2023-07-17 11:12:21 +01:00
Fabian Joswig
4467a2777f
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>
2023-07-13 18:40:47 +01:00
Fabian Joswig
bbbacc7bb4
tests: associative property test added for complex Corr matmul. 2023-07-13 17:08:00 +01:00
Fabian Joswig
c30c8ebe0b
tests: one more tests for rmatmul added. 2023-07-13 16:54:31 +01:00
Fabian Joswig
ff9dd3e3e0
tests: additional tests for rmatmul added. 2023-07-13 16:52:15 +01:00
Fabian Joswig
199e06c5f9
tests: slightly reduced tolerance and good guess bad guess test. 2023-07-13 12:23:04 +01:00
Fabian Joswig
319232f964
tests: tests for matmul and trace added. 2023-07-13 12:18:28 +01:00
Fabian Joswig
db79cb2d95
tests: test for print_config added. 2023-07-10 15:44:06 +01:00
Fabian Joswig
9589820253
tests: coverage for all derivative variants extended. 2023-07-10 15:35:37 +01:00
Fabian Joswig
525c61ed20
Fix another edge case in _compute_drho (#194)
* tests: failing test for compute_drho edge case added.

* tests: example file for failing compute_drho added.

* tests: assertion that dvalue stays the same added to compute drho test.

* fix: another edge case in computation of drho fixed.
2023-06-02 15:04:15 +01:00
Justus Kuhlmann
9489b87a7e
fix nan to None test (#192) 2023-06-01 14:07:16 +01:00
Fabian Joswig
bb43a8afb7
Fix Obs in f-strings without specifier (#190)
* fix: Conversion of an array with ndim > 0 to a scalar deprecation fixed.

* fix: adjusted maximal value for rho in test_gamma_method_irregular.

* fix: obs in f-strings now work again when no specifier is provided.
2023-05-31 18:07:38 +01:00
s-kuberski
34fe7f44fc
Bug fix for edge case in _compute_drho (#189) 2023-05-30 15:29:22 +01:00
Fabian Joswig
095f7c8a46
fix: adjusted maximal value for rho in test_gamma_method_irregular. (#188) 2023-05-30 14:03:01 +01:00
Fabian Joswig
dc73456759
tests: np.alltrue replaced by np.all. 2023-05-30 12:52:10 +01:00
Justus Kuhlmann
1a811b04f3
Feat/files idl xsf (#185)
* added kwrg idl to ms5_xsf_read

* change output, warn user if expected idl not found
2023-05-26 13:01:52 +01:00
Justus Kuhlmann
e97cc519a9
taking care of cols with only None values (#184) 2023-05-22 12:37:46 +01:00
s-kuberski
81e4f37934
Restored JSON output of dicts with non-string keys (#179)
* Restored JSON output of dicts with non-string keys

* Use numpy.integer instead of deprecated numpy.int
2023-05-19 14:58:56 +01:00
Justus Kuhlmann
a5b6f69160
Slightly better Typechecking when exporting to SQL (#174)
* corret type clause

* add tests, changes in create_json_string

* create json-string now gives back None

* revert changes

* fix panda sql export

* add SQL test

* fixed None type export for csv and sql.gz

* move None parsing to json io

* alter regex

* revert changes

* only replace None with empty str when necessary

* fixed deserialze_df for python 3.7

* add more tesets

* fix case where gz was ignored

* hand voer gz explicitly

* replace nan  by None in non-Obs columns

* moved warning to csv export, mroe tests

* only values able to be nan are put in np.isnan()

* added python float for warning
2023-05-18 17:11:52 +01:00
s-kuberski
3198088f9c
Feat/flow (#176)
* fix: String conversion of Obs can now handle a dvalue that is NaN or inf

* Feat: Added extraction of w0/a from openQCD files

* Removed unnecessary round in w0 routine

* Improved error handling in fit_t0

* Allowed to change the reference flow time in t0 and w0 determinations.

* Added doc string to fit_t0
2023-05-16 18:29:13 +01:00
Justus Kuhlmann
5155effbbf
Fix/sort names (#177)
* cosmetic fix in sort_names

* bug fix, more tests
2023-05-16 18:28:32 +01:00
s-kuberski
15d07de87f
fix: String conversion of Obs can now handle a dvalue that is NaN or inf (#173) 2023-05-03 16:30:59 +02:00
s-kuberski
65a9128a7d
Fix/merge idx (#172)
* Fix: Corrected merging of idls

* Fix: Computation of drho in cases where tau_int is large compared to the chain length

* Removed unnecessary imports

* Refactor list comparisons in obs.py
2023-04-28 18:14:51 +01:00
Fabian Joswig
be061fdc23
Feat/str format (#170)
* feat: _format_uncertainty now accepts a significance.

* feat: __format__ now accepts significance.

* feat: explicit + sign added to format.

* fix: - option removed from format specifier.

* feat: space format added.
2023-04-20 17:31:37 +01:00
s-kuberski
a214465413
Fix/gaps (#169)
* fix: Fixed range detection in gamma_method

* Corrected test in dobsio

* Changed expansion paradigm in gamma_method

* Extended tests

* Updated docstrings

* Removed unnecessary intermediate variable

* Removed unnecessary code

* Fixed previously introduced bug in output in obs.details()

* Fixed previously introduced bug in window determination

* New criterion for matching gapped replica, fixed determination of w_max and fixed tau_exp analysis with gaps

* tests: split up consistency test for gamma method.

---------

Co-authored-by: Fabian Joswig <fabian.joswig@ed.ac.uk>
2023-04-20 17:30:57 +01:00
nils-ht
2363b755dd
NHT changes plots combined fit (#166)
* NHT changes plots combined fit

* feat: Exception for illegal combination added and test fixed.

---------

Co-authored-by: Fabian Joswig <fabian.joswig@ed.ac.uk>
2023-03-17 13:52:07 +00:00
Justus Kuhlmann
83204ce794
fixed appended mode reading (#165) 2023-03-16 13:12:03 +00:00
Justus Kuhlmann
41fec09816
Impr/fix refactor sfcf read (#164)
* refactor read_sfcf

* adding tests for find_corr and read_compact_file

* add necessary broken data for tests

* fixed appended mode reading

* factored out sort_names and find_files

* now also using sort_files in sfcf.py

* edited tests to fit with new structure

* added find_files function

* shifted helpfunctions to bottom of file

* removed some debug lines

* linting

* Fixed requested changes, added silent mode

* added Exception if correlator is not found by read_append_rep

* use tmp_path fixture

* linting silent keyword

* try to fix testing for a_bb

* tests: Exception testing in test_find_corr made more explicit.

---------

Co-authored-by: Fabian Joswig <fabian.joswig@ed.ac.uk>
2023-03-15 17:46:12 +00:00
Fabian Joswig
3c942b380d
Serialize list of Obs in pandas.to_sql (#162)
* feat: Added serialization of list of Obs in pandas.to_sql.

* tests: test for list of Obs to sql added.

* feat: auto_gamma functionality added for deserialization of lists of
Obs.
2023-03-10 14:17:20 +00:00
Fabian Joswig
a7a098b861
fix: chisquare, dof and p-value also calculated when dof is 0. Test for
dof and chisquare_over_dof added.
2023-03-09 15:32:27 +00:00
Fabian Joswig
06ba2015be
tests: test for different methods in prior fit added. 2023-03-09 15:00:52 +00:00
Fabian Joswig
80f4eef912
chore: Exception in least_squares specified. 2023-03-08 16:45:29 +00:00
Fabian Joswig
839d9214ed
Improved prior fit (#161)
* refactor: merged combined fit and prior fit without breaking the
routine. Fitting with priors does not work yet.

* refactor: correlated fits without priors work now.

* refactor: prior error propagation and dof fixed.

* refactor: old prior fit implementation moved to tests.

* refactor: moved _extract_val_and_dval out of least_squares.

* refactor: comment removed.

* tests: additional tests and exceptions added.

* tests: test for constrained prior fit added.

* docs: least_squares docstring extended.

* fix: linting errors fixed.

* feat: additional if cause for fits without priors added to achieve
original speed.

* tests: test_constrained_and_prior_fit fixed.

* fix: fix array cast of least_squares dict mode.

* tests: test for lists in dict fit added.

* fix: additional asarray added in resplot.

Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-03-07 16:15:16 +00:00
Fabian Joswig
82cd2f11ea
fix: multi dim fits fixed in least squares. Test added. (#160)
Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-03-03 16:35:26 +00:00
Fabian Joswig
9ef7e504a0
chore: Exceptions in Obs.__init__ made more explicit. 2023-03-02 18:54:08 +00:00
Fabian Joswig
dc7033e51f
refactor: _standard_fit method made redundant. (#154)
* refactor: _standard_fit method made redundant.

* fix: xs and yz in Corr.fit promoted to arrays.

* fix: x promoted to array in _combined_fit if input is just a list.

* feat: residual_plot and qqplot now work with combined fits with
dictionary inputs.

* tests: test for combined fit resplot and qqplot added.

* docs: docstring of fits.residual_plot extended.
2023-03-01 10:00:35 +00:00
Fabian Joswig
d81d6ea0b8
fix: loop range in standard windowing procedure adjusted by gapsize
- Test added

Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-02-27 21:43:29 +00:00
Fabian Joswig
8bc204fc31
tests: nan obs test added. 2023-02-26 18:56:46 +00:00
Justus Kuhlmann
0bc08be634
Impr/refactor find files (#153)
* wrote small test for ms5_xsf read method

* small bug in ms5_xsf found

* first version of refactoring with test

* built _find_files into openQCD module

* postfix can now be used as before

* altered test data to be smaller

* read_rwms throws better Exception now

* typo corrected

* better tests for postfixes, also added similar solution for ext variable

* added method to sort names of files and replica better
2023-02-17 11:51:00 +00:00
Justus Kuhlmann
cef3c3e793
Impr/refactor find files (#151)
* wrote small test for ms5_xsf read method

* small bug in ms5_xsf found

* first version of refactoring with test

* built _find_files into openQCD module

* postfix can now be used as before

* altered test data to be smaller

* read_rwms throws better Exception now

* typo corrected

* better tests for postfixes, also added similar solution for ext variable
2023-02-08 14:52:29 +00:00
Fabian Joswig
3ca79581f3
Merge pull request #148 from PiaLJP/feature/correlated_combined_fit
Feature/correlated combined fit
2023-02-03 17:05:36 +00:00
ppetrak
ba54545b4e feat/tests: Correlated fits now also work for combined fits. 2023-02-03 14:54:54 +01:00
Fabian Joswig
ae68e5baad
test: small bug in non overlapping test fixed. 2023-02-02 16:06:35 +00:00
Fabian Joswig
925f212e61
test: test for non overlapping configs fixed. 2023-02-02 15:22:35 +00:00
Fabian Joswig
2e66f0323a
Merge pull request #147 from fjosw/fix/non_overlapping_cnfgs
Fix non overlapping configurations
2023-02-02 15:15:04 +00:00
Fabian Joswig
3236ba54e7
Merge pull request #134 from PiaLJP/develop
sample implementation of a (uncorrelated) combined fit
2023-02-02 15:09:11 +00:00
Fabian Joswig
37c59a198e
test: test for values added to non overlapping tests. 2023-02-02 15:08:22 +00:00
Simon Kuberski
dc5116aa2f dobs: Zeros are written if config is not part of the Obs, these are ignored on input 2023-02-02 15:31:46 +01:00
Fabian Joswig
e34d49d88d
test: additional test for non overlapping configurations added. 2023-02-02 14:19:16 +00:00
Fabian Joswig
79d185aa7d
test: non_overlapping tests refined. 2023-02-02 13:57:58 +00:00