Fabian Joswig
56edf58289
Merge 8c7cd5a74b into 30d109413d
2026-06-15 12:04:20 +01:00
s-kuberski
934a61e124
[Fix] removed unnecessary lines that raised the flake8 error code F824 ( #262 )
...
Co-authored-by: Simon Kuberski <simon.kuberski@cern.ch>
2025-04-22 10:19:14 +02:00
s-kuberski
17792418ed
[Fix] Removed the possibility to create an Obs from data on several replica ( #258 )
...
* [Fix] Removed the possibility to create an Obs from data on several replica
* [Fix] extended tests and corrected a small bug in the previous commit
---------
Co-authored-by: Simon Kuberski <simon.kuberski@cern.ch>
2025-02-25 16:58:44 +01:00
Fabian Joswig
5c4f44fa01
[Feat] Prevent objects with uuid names to be serialized to json.
2024-11-20 19:19:36 +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
Justus Kuhlmann
26447d658c
better docstrings ( #144 )
...
* first example of returns statement in docstring
* added a some return statements for pandas API
* last return statements in pandas input
* added returns to bdio docstrings
* few returns statements added to docstring
* finished docstrings for hadrons submodule
* also finished docstrings for json submodule
* finished misc submodule
* added returns in docstrings in openqQCD
* made some cosmetic chanes to dostrings
* added return nad return statement in docstring
* linting
* Improved docstrings of mpm, fits, roots, misc to have return statements
returns added for misc.py
returns added for mpm.py
reutrns added for fits.py
* linting...
* Some polishing of docstrings
2023-01-16 14:57:22 +00:00
Fabian Joswig
a53fb18821
feat: removed attribute is_merged.
2023-01-06 13:34:26 +01:00
Fabian Joswig
6eba4ee473
fix: typo in input.json corrected.
2022-11-30 16:57:31 +00:00
Simon Kuberski
9ba46870d0
feat: JSON export can handle numpy.int64 entries
2022-10-25 16:16:07 +02:00
Fabian Joswig
d531b98234
fix: fixed value assignment for json format reconstruction when the
...
average of the r_values is not equal to value
2022-05-19 15:50:47 +01:00
Fabian Joswig
5f7adf839f
build: json.gz format version bumped to 1.1
2022-05-19 14:39:57 +01:00
Simon Kuberski
9239905ee8
bugfix: Deltas in JSON file are now relative to o.value and not o.r_values[r_name]
2022-05-19 10:14:55 +02:00
Simon Kuberski
78ab077eb8
Use rapidjson instead of json for I/O
2022-05-09 12:51:58 +02:00
Fabian Joswig
498a251072
refactor!: if clause in Obs.__init__ eliminated, empty observables need
...
to be initialized with means=[] from now on.
2022-02-28 13:43:49 +00:00
Simon Kuberski
8e5938ebe3
Added version number of JSON file format to 1.0
2022-02-21 18:47:47 +01:00
Simon Kuberski
005f54e0d1
Reduce RAM requirements when reading a JSON file
2022-02-16 11:26:06 +01:00
Simon Kuberski
bd20057f52
Cut RAM requirements for reading JSON in half
2022-02-16 11:13:11 +01:00
Fabian Joswig
d772e09d50
fix: Special case were no replica separator is specified accounted for
2022-02-10 15:29:00 +00:00
Fabian Joswig
c5c82dae21
fix: erroneous replica separator in json format caught and corrected
2022-02-10 14:57:37 +00:00
Fabian Joswig
8788891d5f
refactor: import order corrected
2022-02-10 11:23:25 +00:00
Fabian Joswig
471eabeb8c
fix: Bug in export of derivative of correlator containing covobs fixed,
...
test added.
2022-02-09 14:18:36 +00:00
Simon Kuberski
0dc4d4008a
Introduced JSON I/O for dictionaries
2022-02-03 10:33:24 +01:00
JanNeuendorf
696ab4503c
linting fixed in exception
2022-01-28 13:24:04 +01:00
JanNeuendorf
55804c8c1d
check if the tag is a dict
2022-01-28 13:19:24 +01:00
JanNeuendorf
0098c973af
The json routines for corr now have a dictionary as a tag and the entry tag of this dictionary contains the old tag.
...
This should be compatible with the old way of saving.
2022-01-28 12:21:28 +01:00
Fabian Joswig
dc35690c3e
feat!: correlator json output can now handle gaps in the data. Tags of
...
correlators written with the previous version will have the prefix X|Y|
which contain the padding. Paddings written with previous versions will
be lost and have to be restored by the user.
2022-01-27 14:01:22 +00:00
Fabian Joswig
78ff4bb117
refactor: moved _assert_equal_properties from input.json to misc
2022-01-19 10:55:51 +00:00
Fabian Joswig
d778a3b238
feat!: merged the parameters padding_front and padding_back of Corr into
...
one parameter padding
2022-01-18 14:50:18 +00:00
Fabian Joswig
56fe126593
docs: docstrings of input/json module updated
2022-01-18 14:31:09 +00:00
Fabian Joswig
f282ecdaf6
feat: json import export for correlator class implemented, tests added
2022-01-18 12:13:20 +00:00
Simon Kuberski
5338982060
Allow Obs in json format to be pure Covobs, i.e., to have empty deltas
2021-12-14 16:27:05 +01:00
Simon Kuberski
76b483d730
Pretty output for cov and grad in json
2021-12-14 15:54:52 +01:00
Simon Kuberski
b7bc508dcf
Added covobs to json file format
2021-12-14 15:47:14 +01:00
Fabian Joswig
f6dc78f587
feat!: json format timezone is now outputted in +0000 format.
2021-12-10 10:40:49 +00:00
Fabian Joswig
2ce73fb3f2
fix: import_json_string now correctly reconstructs obs from string, test
...
added
2021-12-10 10:37:50 +00:00
Fabian Joswig
b49c707127
refactor: created function import_json_string
2021-12-09 15:49:01 +00:00
Fabian Joswig
d837e47777
refactor: formatting improvements
2021-12-02 11:32:28 +00:00
Fabian Joswig
a67e83f77b
feat: Minor improvemens to json file format
2021-12-02 11:14:05 +00:00
Simon Kuberski
e5cd5c4a99
Adjusted handling of tags: All are written, if any is None; Removed unused parameter fname from create_json_string; Created a fail-save version for the replacement of quotation marks in workaround for delta lists
2021-12-01 11:53:11 +01:00
Simon Kuberski
71e9d6c29c
Removed unnecessary cast
2021-11-30 17:46:33 +01:00
Simon Kuberski
d740f8d3c4
utf-8 for plain json files and a bugfix for reading arrays
2021-11-30 16:26:46 +01:00
Simon Kuberski
5937a519d7
Added dictionary output of json input routine: It is possible to import and export any structure that is JSON serializable as description (or Obs.tag)
2021-11-30 14:50:16 +01:00
Simon Kuberski
d7c2f125fe
Created routine to get jsonstring itself, allowed for the I/O of uncompressed files, fixed bug for 1d-Arrays
2021-11-30 14:28:07 +01:00
Simon Kuberski
63dd627e20
First implemenation of a json I/O
2021-11-29 15:27:28 +01:00