def write(self, handle, name):

        self._check_all_set()

        g = handle.create_group(name)
        g.attrs['type'] = np.string_('sphere'.encode('utf-8'))
        g.attrs['x'] = self.position[0]
        g.attrs['y'] = self.position[1]
        g.attrs['z'] = self.position[2]
        g.attrs['r'] = self.radius
        g.attrs['limb'] = np.string_(bool2str(self.limb))
        Source.write(self, g)

        for i, spot in enumerate(self._spots):
            spot.write(g, 'Spot %i' % i)
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/sources/source.py/SphericalSource.write/original