Skip to content

Update Isotope.half_life_unit values#160

Merged
lmmentel merged 2 commits intomasterfrom
fix/half-life-units
Jun 1, 2024
Merged

Update Isotope.half_life_unit values#160
lmmentel merged 2 commits intomasterfrom
fix/half-life-units

Conversation

@lmmentel
Copy link
Copy Markdown
Owner

@lmmentel lmmentel commented Jun 1, 2024

Isotope half life units are updated to be unambiguous, following these substitutions:

unit_subs = {
    'Ey': "Eyear",
    'Gy': "Gyear",
    'My': "Myear",
    'Py': "Pyear",
    'Ty': "Tyear",
    'Yy': "Yyear",
    'Zy': "Zyear",
    'as': "asec",
    'd': "day",
    'h': "hour",
    'ky': "kyear",
    'm': "minute",
    'ms': "msec",
    'ns': "nsec",
    'ps': "psec",
    's': "sec",
    'us': "usec",
    'y': "year",
    'ys': "ysec",
    'zs': "zsec",
}

With this change units can now be correctly parsed by pint.

Changes

  • updated values in isotopes.half_life_unit according to substitution rules above
  • added a test to check that all values are substituted
  • added annotation in propertymetdata.annotations for row with isotopes.half_life_unit with information from the source paper that " 1 year = 365.2422 days = 31 556 926 sec"

fixes #157

@lmmentel lmmentel added enhancement New feature or request data Data update labels Jun 1, 2024
@lmmentel lmmentel marked this pull request as ready for review June 1, 2024 18:21
@lmmentel lmmentel merged commit 88510cc into master Jun 1, 2024
@lmmentel lmmentel deleted the fix/half-life-units branch June 1, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Data update enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Isotope.half_life_unit values are ambiguous

1 participant