fjosw/pyerrors

Ordering inside key of mesons-dict

s-kuberski opened this issue · 2 comments

The keys for the dictionary that is returned in read_mesons is constructed via

result[(corr_name[c], corr_source[c]) + tuple(sorted(corr_kappa[c]))] = tmp_corr

I think that the sorting may be problematic if mass-derivatives are considered, since it is important to know which is the fist and which is the second quark in the correlation function. Otherwise, the matching of derivative and quark may be wrong. A change of the behavior would sort of break backwards compatibility, but I would consider this a bug, rather than a feature that is changed.

Am I missing something @fjosw?

fjosw commented

I see the problem. I wouldn't be too concerned about backward compatibility for the input routines and as you say this could be rather considered a bug. Would you propose to just remove the sorted?

I think removing sorted such that the key matches the ordering in the input and bdio file would cure the issue.