[Fix] Removed the possibility to create an Obs from data on several replica #258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request addresses #256:
It removes the possibility to create an
Obs
from data that is based on several ensembles. Whereas the feature is needed internally, it can be considered dangerous for users as the behavior of the function might be unexpected. To allow for internal creation of suchObs
in intermediate steps, the creation is still allowed ifmeans
are passed to the function.Further changes that I introduced along the way because they are coupled to the same problem. It is possible that I have overlooked something. In this case, these changes can be discussed and reverted.
Obs
that already contains several ensembles. The only setting where I see that this could be a valid procedure is the case where algorithmic parameters that do not affect the reweighting but only the autocorrelation time have been changed such that two independent streams are not real replica and instead treated as separate ensembles. Also in this case, I would propose to force the user to reweight before combining the observables.merge_obs
has been adapted to the same rules. The function header is extended to better explain what is done here.Apart form this, the biggest changes in the code are in the JSON and
dobs
I/O, where I had to adapt to the new way to create theObs
and in the tests, where we had used the illegal creation in some cases.It would be an option to add a routine that combines observables from several pseudo-replica by averaging them, either weighted by the number of configs or by the number of independent configs.