parameters: (self)
docstring: Make data from the given mesh accessible via GUI.
  
          Note
          ----
          This apparently needs to happen when using the gui since on call the
          cell_arrays will be emptied...
docstring_summary: Make data from the given mesh accessible via GUI.
docstring_tokens: Make data from the given mesh accessible via GUI .
function: def allowMeshParameters(self):
          """
          Make data from the given mesh accessible via GUI.
  
          Note
          ----
          This apparently needs to happen when using the gui since on call the
          cell_arrays will be emptied...
          """
          # enable only when there is something to show
          self.toolbar.btn_apply.setEnabled(True)
          self.toolbar.btn_reset.setEnabled(True)
          self.toolbar.spbx_cmin.setEnabled(True)
          self.toolbar.spbx_cmax.setEnabled(True)
  
          _min = 1e99
          _max = -1e99
          for label, data in self.mesh.cell_arrays.items():
              _mi = min(data)
              _ma = max(data)
              _min = _mi if _mi < _min else _mi
              _max = _ma if _ma > _max else _ma
              self.data[label] = {
                  'orig': {'min': _mi, 'max': _ma},
                  'user': {'min': _mi, 'max': _ma},
                  'data_orig': data,
                  'data_user': None
              }
  
          for label, data in self.mesh.point_arrays.items():
              _mi = min(data)
              _ma = max(data)
              _min = _mi if _mi < _min else _mi
              _max = _ma if _ma > _max else _ma
              self.data[label] = {
                  'orig': {'min': _mi, 'max': _ma},
                  'user': {'min': _mi, 'max': _ma},
                  'data_orig': data,
                  'data_user': None
              }
  
          self.data['glob_min'] = _min
          self.data['glob_max'] = _max
          # supply the combobox with the names to choose from for display
          self.toolbar.cbbx_params.addItems(self.mesh.array_names)
          # get the current set parameter
          curr_param = self.toolbar.cbbx_params.currentText()
          # set the first cMin/cMax
          self.toolbar.spbx_cmin.setValue(
              self.data[curr_param]['orig']['min'])
          self.toolbar.spbx_cmax.setValue(
              self.data[curr_param]['orig']['max'])
          self.updateParameterView(curr_param)
function_tokens: def allowMeshParameters ( self ) : # enable only when there is something to show self . toolbar . btn_apply . setEnabled ( True ) self . toolbar . btn_reset . setEnabled ( True ) self . toolbar . spbx_cmin . setEnabled ( True ) self . toolbar . spbx_cmax . setEnabled ( True ) _min = 1e99 _max = - 1e99 for label , data in self . mesh . cell_arrays . items ( ) : _mi = min ( data ) _ma = max ( data ) _min = _mi if _mi < _min else _mi _max = _ma if _ma > _max else _ma self . data [ label ] = { 'orig' : { 'min' : _mi , 'max' : _ma } , 'user' : { 'min' : _mi , 'max' : _ma } , 'data_orig' : data , 'data_user' : None } for label , data in self . mesh . point_arrays . items ( ) : _mi = min ( data ) _ma = max ( data ) _min = _mi if _mi < _min else _mi _max = _ma if _ma > _max else _ma self . data [ label ] = { 'orig' : { 'min' : _mi , 'max' : _ma } , 'user' : { 'min' : _mi , 'max' : _ma } , 'data_orig' : data , 'data_user' : None } self . data [ 'glob_min' ] = _min self . data [ 'glob_max' ] = _max # supply the combobox with the names to choose from for display self . toolbar . cbbx_params . addItems ( self . mesh . array_names ) # get the current set parameter curr_param = self . toolbar . cbbx_params . currentText ( ) # set the first cMin/cMax self . toolbar . spbx_cmin . setValue ( self . data [ curr_param ] [ 'orig' ] [ 'min' ] ) self . toolbar . spbx_cmax . setValue ( self . data [ curr_param ] [ 'orig' ] [ 'max' ] ) self . updateParameterView ( curr_param )