Skip to content

Add python helper functions to translate nuclide info #282

Description

@gonuke

It seems like a good time to add some lightweight helper functions to the ALARAJoy code (and elsewhere as appropriate).

def pKZA2str(pKZA):
"""Produce a string from a KZA number with the element, mass number and isomeric character"""
    # fill in here
    pass

def expandKZA(pKZA):
"""Expand a KZA number to the integer values of Z, A, M"""
    # fill in here
    pass

def assembleKZA(Z, A, M):
"""Return a KZA number from the integer values of Z, A, M"""
    # fill in here
    pass

These might make it easier to use the KZA number as the canonical identifier everywhere and only extract the other info at the "last minute" when necessary. For example, in some places, you have dictionaries that include some version of Z, A, and KZA, which is redundant.

Activity

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