Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit conversion #16

Open
kdavies4 opened this issue May 6, 2014 · 2 comments
Open

Add unit conversion #16

kdavies4 opened this issue May 6, 2014 · 2 comments

Comments

@kdavies4
Copy link
Owner

kdavies4 commented May 6, 2014

Use the displayUnit by default but allow custom override in SimRes.get_values(), SimRes.get_IV(), etc.

Ideas for implementation:

  • Replace the function f argument to SimRes.get_values(), etc. with a unit argument:
    • If default (None), then use displayUnit.
    • Accept string in Modelica notation (e.g., "m/s2"). The units may contain SI prefixes.
    • Accept values (e.g., m/s**2) where the values are available from a submodule (modelicares.units).
    • Accept functions (e.g., degC, dB), also from a submodule.
    • Build the units into the transformation from the data space to the axis space of matplotlib?
  • Allow configuration of default units (via config file or code).
  • Order of precedence: unit argument, default units, displayUnit attribute, unit attribute
  • Also include constants in the units submodule (e.g., c/(m/s) should return 299792458).
  • Each unit is a class that contains a dimension as well as a value. Use the dimension for dimension checking.
  • List available units and constants in the documentation of modelicares.units.
@kdavies4 kdavies4 added this to the 0.13 milestone Jul 22, 2014
@kdavies4
Copy link
Owner Author

Convert methods like min, max, mean, FV, value, and IV to properties. Remove the f argument to methods where no longer needed.

@kdavies4
Copy link
Owner Author

Unit conversion will be based on natu module (to be published soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant