[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>
This commit is contained in:
s-kuberski 2025-02-25 16:58:44 +01:00 committed by GitHub
commit 17792418ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 111 additions and 61 deletions

View file

@ -529,7 +529,8 @@ def import_dobs_string(content, full_output=False, separator_insertion=True):
deltas.append(repdeltas)
idl.append(repidl)
res.append(Obs(deltas, obs_names, idl=idl))
obsmeans = [np.average(deltas[j]) for j in range(len(deltas))]
res.append(Obs([np.array(deltas[j]) - obsmeans[j] for j in range(len(obsmeans))], obs_names, idl=idl, means=obsmeans))
res[-1]._value = mean[i]
_check(len(e_names) == ne)