Skip to content

Keep logical order when saving results #32

@PicoCentauri

Description

@PicoCentauri

If you want to plot data from a file stored in columns it is convention that x values have a lower column index compared to the y values. Currently this is not guaranteed. The current results handling proposed in #17 and #29 handle every possible type appearing in an MDAanalysis AnalysisClass. In our approach 1D arrays are stacked into 2D arrays and saved as CSV files. The logical structure is usually encoded inside the class docstring. For example, in lineardensity.py the docstring has the following structure

"""
    results.x.pos : numpy.ndarray
           mass density in [xyz] direction
    results.x.pos_std : numpy.ndarray
           standard deviation of the mass density in [xyz] direction
    results.x.char : numpy.ndarray
           charge density in [xyz] direction
    results.x.char_std : numpy.ndarray
           standard deviation of the charge density in [xyz] direction
"""

Saving these 1D arrays stacked into a 2D array keep this order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions