Improve `planar_base` decorator and use in `transport/velocity`
With the soon finished decorator for planar modules we should use this in the velocity module as well. However, there are a few things that should be included before:
Symmetrizing
The dielectric module and the velocity module can symmetrize their profiles. This should be added to the decorator. I propose a function similar to np.sum
def symmetrize_array(a, axis=None):
"""Symmetrize an array along a given axis."""
...
return symmetrized_along_axis
This function should then applied to all arrays in the results
dictionary except the position list (results['z']
).
General error estimate
@schlaicha implemented the nice error estimator of B. Hess inside the velocity module. This general error estimator should be made also available as a function and applied to the results of the velocity module.
Binning with respect to box coordinates
In periodic boundaries typically only the box length is relevant and correspondingly only this information is stored in MDAnalysis. Currently, MAICoS assumes that the box coordinates are in [0,L], however also other choices like [-L/2,L/2] are possible. This does not change the physics at all but is typically inconvenient for the user when visualizing the data. MAICoS should allow for shifting the binned results with respect to a certain reference group's coordinates.