@classmethod
    def read(cls, handle):

        self = cls()

        self._read_luminosity(handle)

        self.name = handle.attrs['name'].decode('utf-8')

        self.peeloff = str2bool(handle.attrs['peeloff'])

        if handle.attrs['spectrum'] == b'spectrum':
            self.spectrum = Table(np.array(handle['spectrum']))
        elif handle.attrs['spectrum'] == b'temperature':
            self.temperature = handle.attrs['temperature']
        elif handle.attrs['spectrum'] == b'lte':
            pass
        else:
            raise ValueError('Unexpected value for `spectrum`: %s' % handle.attrs['spectrum'])

        return self
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/sources/source.py/Source.read/original