How to use the sunpy.Spatial.loadData function in sunpy

To help you get started, we’ve selected a few sunpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ofringer / suntanspy / SUNTANS / suntvtk.py View on Github external
def loadData(self):
        """
        Overloaded loadData function - updates the unstructured grid object
        """
        Spatial.loadData(self)
        if self.is3D:
            self.data=np.ravel(self.data[self.mask3D])
        else:
            self.data=np.ravel(self.data)
            
        self.ug.cell_data.scalars = self.data
        self.ug.cell_data.scalars.name = 'suntans_scalar' 
        self.ug.modified()