fix: bug in Corr.spaghetti_plot fixed which appeared in connection with

the replica separator. Test adjusted.
This commit is contained in:
Fabian Joswig 2022-12-07 12:23:49 +00:00
parent 850be29d20
commit 23708694d6
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -916,7 +916,7 @@ class Corr:
if self.N != 1:
raise Exception("Correlator needs to be projected first.")
mc_names = list(set([item for sublist in [o[0].mc_names for o in self.content if o is not None] for item in sublist]))
mc_names = list(set([item for sublist in [sum(map(o[0].e_content.get, o[0].mc_names), []) for o in self.content if o is not None] for item in sublist]))
x0_vals = [n for (n, o) in zip(np.arange(self.T), self.content) if o is not None]
for name in mc_names:

View file

@ -498,7 +498,8 @@ def test_corr_vector_operations():
def test_spaghetti_plot():
corr = _gen_corr(12, 50)
corr += pe.pseudo_Obs(0.0, 0.1, 'another_ensemble')
corr += pe.pseudo_Obs(0.0, 0.1, 'another_ensemble|r0')
corr += pe.pseudo_Obs(0.0, 0.1, 'another_ensemble|r1')
corr += pe.cov_Obs(0.0, 0.01 ** 2, 'covobs')
corr.spaghetti_plot(True)