Skip to content

Scale data in Comparer #490

@jsmariegaard

Description

@jsmariegaard

I propose a new method scale() in Comparer and ComparerCollection that should scale all primary variables (not aux data) by a factor and set a new unit. The use case is e.g. that want to show all my plots, tables etc with "cm" unit instead of "meter" but all the data files are in meter so it is a bit cumbersome to change the units before the comparison (it would require me to load all the data in the dfsu).

  • The ComparerCollection should only allow scale if unit is the same across all contained comparers.
  • Signature should be scale(factor=None, *, offset=None, new_unit=None)
  • The new_unit argument should be required if factor is not None and old unit is not undefined.
  • Optionally, we could allow the same functionality on Timeseries (for completeness)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions