Skip to content

Commit

Permalink
Correct the unit for density and streamline frequency units
Browse files Browse the repository at this point in the history
Changed nomenclature from 'KILOGRAMS_PER_CC' to 'KILOGRAMS_PER_M3' for accurate representation in the 'DensityUnitEnum' class and removed 'PHASE_DEG' and 'PHASE_RAD' from 'FrequencyUnitEnum' for clarity and conciseness. These changes will improve readability and maintain correctness of the units in the code.
  • Loading branch information
tasansal committed Dec 4, 2023
1 parent 9e4603b commit 2f81e0c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mdio/schemas/v1/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DensityUnitEnum(UnitEnum):
"""Enum class representing units of density."""

GRAMS_PER_CC = ureg.gram / ureg.centimeter**3
KILOGRAMS_PER_CC = ureg.kilogram / ureg.meter**3
KILOGRAMS_PER_M3 = ureg.kilogram / ureg.meter**3
POUNDS_PER_GAL = ureg.pounds / ureg.gallon


Expand Down Expand Up @@ -81,9 +81,7 @@ class AngleUnitEnum(UnitEnum):
class FrequencyUnitEnum(UnitEnum):
"""Enum class representing units of frequency."""

FREQUENCY = ureg.hertz
PHASE_DEG = ureg.degree
PHASE_RAD = ureg.radian
HERTZ = ureg.hertz


FrequencyUnitModel = create_unit_model(
Expand Down

0 comments on commit 2f81e0c

Please sign in to comment.