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.
It seems like a good time to add some lightweight helper functions to the ALARAJoy code (and elsewhere as appropriate).
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.