find_levels

Physics.Radiation.Lines.Molec.find_levels(transitions, key='both')

This extracts energy levels from a list of transitions according to a key such as ‘q lower’ or ‘q upper’ or some other key. Redundancy is eliminated. The list items contain the quantum numbers and the energy if the key is ‘q upper’ or ‘q lower’. Otherwise, the list just contains the selected key values.