viz_utils/eoa_viz.py
def plot_2d_data_np(self, np_variables:list, var_names:list, title='',
                            file_name_prefix='', cmap=None,  flip_data=False,
                            rot_90=False, show_color_bar=True, plot_mode=PlotMode.RASTER, mincbar=np.nan, maxcbar=np.nan):
        '''
        Wrapper function to receive raw 2D numpy data. It calls the 'main' function for 3D plotting
        :param np_variables: Numpy variables. They can be with shape [fields, x, y]  or just a single field with shape [x,y]
        :param var_names:
        :param title:
        :param file_name_prefix:
        :param cmap:
        :param flip_data:
        :param rot_90:
        :param show_color_bar:
        :param plot_mode:
        :param mincbar:
        :param maxcbar:
        :return:
        '''
        npdict_3d = {}
        for i, field_name in enumerate(var_names):
            if len(np_variables.shape) == 3:
                c_np_data = np_variables[i, :, :]
            else:
                c_np_data = np_variables  # Single field

            if rot_90:
                c_np_data = np.rot90(c_np_data)
            if flip_data:
                c_np_data = np.flip(np.flip(c_np_data), axis=1)
            npdict_3d[field_name] = np.expand_dims(c_np_data, axis=0)

        self.plot_3d_data_npdict(npdict_3d, var_names, z_levels=[0], title=title,
                        file_name_prefix=file_name_prefix, cmap=cmap, z_names = [],
                        show_color_bar=show_color_bar, plot_mode=plot_mode, mincbar=mincbar, maxcbar=maxcbar)

        Wrapper function to receive raw 2D numpy data. It calls the 'main' function for 3D plotting
        :param np_variables: Numpy variables. They can be with shape [fields, x, y]  or just a single field with shape [x,y]
        :param var_names:
        :param title:
        :param file_name_prefix:
        :param cmap:
        :param flip_data:
        :param rot_90:
        :param show_color_bar:
        :param plot_mode:
        :param mincbar:
        :param maxcbar:
        :return:
        
Wrapper function to receive raw 2D numpy data. It calls the 'main' function for 3D plotting
Wrapper function to receive raw 2D numpy data . It calls the ' main ' function for 3D plotting
def plot_2d_data_np(self, np_variables:list, var_names:list, title='',
                            file_name_prefix='', cmap=None,  flip_data=False,
                            rot_90=False, show_color_bar=True, plot_mode=PlotMode.RASTER, mincbar=np.nan, maxcbar=np.nan):
        npdict_3d = {}
        for i, field_name in enumerate(var_names):
            if len(np_variables.shape) == 3:
                c_np_data = np_variables[i, :, :]
            else:
                c_np_data = np_variables  
            if rot_90:
                c_np_data = np.rot90(c_np_data)
            if flip_data:
                c_np_data = np.flip(np.flip(c_np_data), axis=1)
            npdict_3d[field_name] = np.expand_dims(c_np_data, axis=0)
        self.plot_3d_data_npdict(npdict_3d, var_names, z_levels=[0], title=title,
                        file_name_prefix=file_name_prefix, cmap=cmap, z_names = [],
                        show_color_bar=show_color_bar, plot_mode=plot_mode, mincbar=mincbar, maxcbar=maxcbar)
def plot_2d_data_np ( self , np_variables : list , var_names : list , title = '' , file_name_prefix = '' , cmap = None , flip_data = False , rot_90 = False , show_color_bar = True , plot_mode = PlotMode . RASTER , mincbar = np . nan , maxcbar = np . nan ) : npdict_3d = { } for i , field_name in enumerate ( var_names ) : if len ( np_variables . shape ) == 3 : c_np_data = np_variables [ i , : , : ] else : c_np_data = np_variables if rot_90 : c_np_data = np . rot90 ( c_np_data ) if flip_data : c_np_data = np . flip ( np . flip ( c_np_data ) , axis = 1 ) npdict_3d [ field_name ] = np . expand_dims ( c_np_data , axis = 0 ) self . plot_3d_data_npdict ( npdict_3d , var_names , z_levels = [ 0 ] , title = title , file_name_prefix = file_name_prefix , cmap = cmap , z_names = [ ] , show_color_bar = show_color_bar , plot_mode = plot_mode , mincbar = mincbar , maxcbar = maxcbar )
Wrapper function to receive raw 2D numpy data.
Wrapper function to receive raw 2D numpy data .
'''
        Wrapper function to receive raw 2D numpy data. It calls the 'main' function for 3D plotting
        :param np_variables: Numpy variables. They can be with shape [fields, x, y]  or just a single field with shape [x,y]
        :param var_names:
        :param title:
        :param file_name_prefix:
        :param cmap:
        :param flip_data:
        :param rot_90:
        :param show_color_bar:
        :param plot_mode:
        :param mincbar:
        :param maxcbar:
        :return:
        ''' # Single field
None
self
np_variables
list
Numpy variables. They can be with shape [fields, x, y]  or just a single field with shape [x,y]
Numpy variables . They can be with shape [ fields x y ] or just a single field with shape [ x y ]
var_names
list
None
title
None
file_name_prefix
None
cmap
None
flip_data
None
rot_90
None
show_color_bar
None
plot_mode
None
mincbar
None
maxcbar
None