RPM bug fix created a issue when rescaling hertz · Issue #174 · python-quantities/python-quantities · GitHub
Skip to content

RPM bug fix created a issue when rescaling hertz #174

Open

Description

@seanbrant

The bug fix in commit 393d37e introduced a bug when rescaling rpm's to hertz's.

Example:

import quantities

print(quantities.Quantity(60, 'rpm').rescale('Hz'))

# used to equal 1.0 Hz before the bug fix
# now equals 6.283185307179586 Hz

Activity

  1. changed the title [-]RPM bug fix created a issue when rescaling to a unit based on hertz[/-] [+]RPM bug fix created a issue when rescaling hertz[/+] on Feb 26, 2020
  2. apdavison commented on Feb 27, 2020

    @apdavison
    Contributor

    hi, do you have any suggestions on how this should be fixed? What is the relationship between a cycle and a revolution?

  3. benhamill commented on Feb 27, 2020

    @benhamill

    According to https://www.convertunits.com/from/hertz/to/RPM, 1 hertz = 60 RPM.

    This seems to have occurred because of the more complex modeling of rpm that includes pi (notice that it's saying that 60 rpm = 2pi Hertz). I'm not sure the best way to account for this without simplifying the definition of revolution again or writing special case logic somehow.

  4. benhamill commented on Feb 27, 2020

    @benhamill

    I think it might help if you could explain the cases that rpm being defined in terms of revolution instead of just 1/min was important. The commit that made that change didn't have tests or anything and the Issue that inspired it didn't have a lot of discussion, IIRC.

  5. carl-youngblood commented on Feb 27, 2020

    @carl-youngblood

    If I'm reading this correctly https://en.wikipedia.org/wiki/Revolutions_per_minute then RPM should be 1/60.

    The value that rpm was changed to in 393d37e of 2pi / 60 is the value you would expect when asking for the angular velocity of something completing 1 RPM. Specifically, the value of 2pi / 60 radians per second.

    The key distinction is that revolutions per minute do not have a unit associated with them, but angular velocity does explicitly include radians.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions