def setupperenergy(self, value):
    ' Method to set the upper state energy.\n\n            Parameters\n            ----------\n            value : float\n                The value to set the upper state energy to.\n\n            Returns\n            -------\n            None\n        '
    if isinstance(value, float):
        self.energies[1] = value
    elif isinstance(value, int):
        self.energies[1] = float(value)
    else:
        raise Exception('Energy must be a number')
Method to set the upper state energy.

Parameters
----------
value : float
    The value to set the upper state energy to.

Returns
-------
None
def setupperenergy(self, value):
    ' Method to set the upper state energy.\n\n            Parameters\n            ----------\n            value : float\n                The value to set the upper state energy to.\n\n            Returns\n            -------\n            None\n        '
    if isinstance(value, float):
        self.energies[1] = value
    elif isinstance(value, int):
        self.energies[1] = float(value)
    else:
        raise Exception('Energy must be a number')