repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_documentation_string
stringlengths
1
47.2k
func_code_url
stringlengths
85
339
titusjan/argos
argos/config/qtctis.py
createPenStyleCti
def createPenStyleCti(nodeName, defaultData=0, includeNone=False): """ Creates a ChoiceCti with Qt PenStyles. If includeEmtpy is True, the first option will be None. """ displayValues=PEN_STYLE_DISPLAY_VALUES configValues=PEN_STYLE_CONFIG_VALUES if includeNone: displayValues = [''] +...
python
def createPenStyleCti(nodeName, defaultData=0, includeNone=False): """ Creates a ChoiceCti with Qt PenStyles. If includeEmtpy is True, the first option will be None. """ displayValues=PEN_STYLE_DISPLAY_VALUES configValues=PEN_STYLE_CONFIG_VALUES if includeNone: displayValues = [''] +...
Creates a ChoiceCti with Qt PenStyles. If includeEmtpy is True, the first option will be None.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L41-L51
titusjan/argos
argos/config/qtctis.py
createPenWidthCti
def createPenWidthCti(nodeName, defaultData=1.0, zeroValueText=None): """ Creates a FloatCti with defaults for configuring a QPen width. If specialValueZero is set, this string will be displayed when 0.0 is selected. If specialValueZero is None, the minValue will be 0.1 """ # A pen line wid...
python
def createPenWidthCti(nodeName, defaultData=1.0, zeroValueText=None): """ Creates a FloatCti with defaults for configuring a QPen width. If specialValueZero is set, this string will be displayed when 0.0 is selected. If specialValueZero is None, the minValue will be 0.1 """ # A pen line wid...
Creates a FloatCti with defaults for configuring a QPen width. If specialValueZero is set, this string will be displayed when 0.0 is selected. If specialValueZero is None, the minValue will be 0.1
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L54-L65
titusjan/argos
argos/config/qtctis.py
fontFamilyIndex
def fontFamilyIndex(qFont, families): """ Searches the index of qFont.family in the families list. If qFont.family() is not in the list, the index of qFont.defaultFamily() is returned. If that is also not present an error is raised. """ try: return families.index(qFont.family()) ...
python
def fontFamilyIndex(qFont, families): """ Searches the index of qFont.family in the families list. If qFont.family() is not in the list, the index of qFont.defaultFamily() is returned. If that is also not present an error is raised. """ try: return families.index(qFont.family()) ...
Searches the index of qFont.family in the families list. If qFont.family() is not in the list, the index of qFont.defaultFamily() is returned. If that is also not present an error is raised.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L68-L80
titusjan/argos
argos/config/qtctis.py
fontWeightIndex
def fontWeightIndex(qFont, weights): """ Searches the index of qFont.family in the weight list. If qFont.weight() is not in the list, the index of QFont.Normal is returned. If that is also not present an error is raised. """ try: return weights.index(qFont.weight()) except ValueE...
python
def fontWeightIndex(qFont, weights): """ Searches the index of qFont.family in the weight list. If qFont.weight() is not in the list, the index of QFont.Normal is returned. If that is also not present an error is raised. """ try: return weights.index(qFont.weight()) except ValueE...
Searches the index of qFont.family in the weight list. If qFont.weight() is not in the list, the index of QFont.Normal is returned. If that is also not present an error is raised.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L83-L95
titusjan/argos
argos/config/qtctis.py
ColorCti._enforceDataType
def _enforceDataType(self, data): """ Converts to str so that this CTI always stores that type. """ qColor = QtGui.QColor(data) # TODO: store a RGB string? if not qColor.isValid(): raise ValueError("Invalid color specification: {!r}".format(data)) return qColor
python
def _enforceDataType(self, data): """ Converts to str so that this CTI always stores that type. """ qColor = QtGui.QColor(data) # TODO: store a RGB string? if not qColor.isValid(): raise ValueError("Invalid color specification: {!r}".format(data)) return qColor
Converts to str so that this CTI always stores that type.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L107-L113
titusjan/argos
argos/config/qtctis.py
ColorCti._nodeGetNonDefaultsDict
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict """ dct = {} if self.data != self.defaultData: dct['data'] = self.data.name() return dct
python
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict """ dct = {} if self.data != self.defaultData: dct['data'] = self.data.name() return dct
Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L127-L134
titusjan/argos
argos/config/qtctis.py
ColorCti.createEditor
def createEditor(self, delegate, parent, option): """ Creates a ColorCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return ColorCtiEditor(self, delegate, parent=parent)
python
def createEditor(self, delegate, parent, option): """ Creates a ColorCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return ColorCtiEditor(self, delegate, parent=parent)
Creates a ColorCtiEditor. For the parameters see the AbstractCti constructor documentation.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L145-L149
titusjan/argos
argos/config/qtctis.py
ColorCtiEditor.finalize
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self.pickButton.clicked.disconnect(self.openColorDialog) super(ColorCtiEditor, self).finalize()
python
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self.pickButton.clicked.disconnect(self.openColorDialog) super(ColorCtiEditor, self).finalize()
Is called when the editor is closed. Disconnect signals.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L177-L181
titusjan/argos
argos/config/qtctis.py
ColorCtiEditor.openColorDialog
def openColorDialog(self): """ Opens a QColorDialog for the user """ try: currentColor = self.getData() except InvalidInputError: currentColor = self.cti.data qColor = QtWidgets.QColorDialog.getColor(currentColor, self) if qColor.isValid(): ...
python
def openColorDialog(self): """ Opens a QColorDialog for the user """ try: currentColor = self.getData() except InvalidInputError: currentColor = self.cti.data qColor = QtWidgets.QColorDialog.getColor(currentColor, self) if qColor.isValid(): ...
Opens a QColorDialog for the user
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L184-L196
titusjan/argos
argos/config/qtctis.py
ColorCtiEditor.getData
def getData(self): """ Gets data from the editor widget. """ text = self.lineEditor.text() if not text.startswith('#'): text = '#' + text validator = self.lineEditor.validator() if validator is not None: state, text, _ = validator.validate(text, 0...
python
def getData(self): """ Gets data from the editor widget. """ text = self.lineEditor.text() if not text.startswith('#'): text = '#' + text validator = self.lineEditor.validator() if validator is not None: state, text, _ = validator.validate(text, 0...
Gets data from the editor widget.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L205-L218
titusjan/argos
argos/config/qtctis.py
FontCti.data
def data(self, data): """ Sets the font data of this item. Does type conversion to ensure data is always of the correct type. Also updates the children (which is the reason for this property to be overloaded. """ self._data = self._enforceDataType(data) # Enforce self._d...
python
def data(self, data): """ Sets the font data of this item. Does type conversion to ensure data is always of the correct type. Also updates the children (which is the reason for this property to be overloaded. """ self._data = self._enforceDataType(data) # Enforce self._d...
Sets the font data of this item. Does type conversion to ensure data is always of the correct type. Also updates the children (which is the reason for this property to be overloaded.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L269-L279
titusjan/argos
argos/config/qtctis.py
FontCti.defaultData
def defaultData(self, defaultData): """ Sets the data of this item. Does type conversion to ensure default data is always of the correct type. """ self._defaultData = self._enforceDataType(defaultData) # Enforce to be a QFont self.familyCti.defaultData = fontFamilyIndex(self....
python
def defaultData(self, defaultData): """ Sets the data of this item. Does type conversion to ensure default data is always of the correct type. """ self._defaultData = self._enforceDataType(defaultData) # Enforce to be a QFont self.familyCti.defaultData = fontFamilyIndex(self....
Sets the data of this item. Does type conversion to ensure default data is always of the correct type.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L290-L299
titusjan/argos
argos/config/qtctis.py
FontCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the font config settings to the target widget's font. That is the targetWidget.setFont() is called with a font create from the config values. """ font = self.data if self.familyCti.configValue: font.setFamily(self.fami...
python
def _updateTargetFromNode(self): """ Applies the font config settings to the target widget's font. That is the targetWidget.setFont() is called with a font create from the config values. """ font = self.data if self.familyCti.configValue: font.setFamily(self.fami...
Applies the font config settings to the target widget's font. That is the targetWidget.setFont() is called with a font create from the config values.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L324-L337
titusjan/argos
argos/config/qtctis.py
FontCti._nodeGetNonDefaultsDict
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict """ dct = {} if self.data != self.defaultData: dct['data'] = self.data.toString() # calls QFont....
python
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict """ dct = {} if self.data != self.defaultData: dct['data'] = self.data.toString() # calls QFont....
Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L340-L347
titusjan/argos
argos/config/qtctis.py
FontCti._nodeSetValuesFromDict
def _nodeSetValuesFromDict(self, dct): """ Sets values from a dictionary in the current node. Non-recursive auxiliary function for setValuesFromDict """ if 'data' in dct: qFont = QtGui.QFont() success = qFont.fromString(dct['data']) if not success:...
python
def _nodeSetValuesFromDict(self, dct): """ Sets values from a dictionary in the current node. Non-recursive auxiliary function for setValuesFromDict """ if 'data' in dct: qFont = QtGui.QFont() success = qFont.fromString(dct['data']) if not success:...
Sets values from a dictionary in the current node. Non-recursive auxiliary function for setValuesFromDict
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L350-L362
titusjan/argos
argos/config/qtctis.py
FontCti.createEditor
def createEditor(self, delegate, parent, option): """ Creates a FontCtiEditor. For the parameters see the AbstractCti documentation. """ return FontCtiEditor(self, delegate, parent=parent)
python
def createEditor(self, delegate, parent, option): """ Creates a FontCtiEditor. For the parameters see the AbstractCti documentation. """ return FontCtiEditor(self, delegate, parent=parent)
Creates a FontCtiEditor. For the parameters see the AbstractCti documentation.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L365-L369
titusjan/argos
argos/config/qtctis.py
FontCtiEditor.finalize
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self.pickButton.clicked.disconnect(self.execFontDialog) super(FontCtiEditor, self).finalize()
python
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self.pickButton.clicked.disconnect(self.execFontDialog) super(FontCtiEditor, self).finalize()
Is called when the editor is closed. Disconnect signals.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L396-L400
titusjan/argos
argos/config/qtctis.py
FontCtiEditor.execFontDialog
def execFontDialog(self): """ Opens a QColorDialog for the user """ currentFont = self.getData() newFont, ok = QtGui.QFontDialog.getFont(currentFont, self) if ok: self.setData(newFont) else: self.setData(currentFont) self.commitAndClose()
python
def execFontDialog(self): """ Opens a QColorDialog for the user """ currentFont = self.getData() newFont, ok = QtGui.QFontDialog.getFont(currentFont, self) if ok: self.setData(newFont) else: self.setData(currentFont) self.commitAndClose()
Opens a QColorDialog for the user
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L403-L412
titusjan/argos
argos/config/qtctis.py
FontChoiceCti.createEditor
def createEditor(self, delegate, parent, option): """ Creates a ChoiceCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return FontChoiceCtiEditor(self, delegate, parent=parent)
python
def createEditor(self, delegate, parent, option): """ Creates a ChoiceCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return FontChoiceCtiEditor(self, delegate, parent=parent)
Creates a ChoiceCtiEditor. For the parameters see the AbstractCti constructor documentation.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L464-L468
titusjan/argos
argos/config/qtctis.py
FontChoiceCtiEditor.finalize
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self.comboBox.activated.disconnect(self.comboBoxActivated) super(FontChoiceCtiEditor, self).finalize()
python
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self.comboBox.activated.disconnect(self.comboBoxActivated) super(FontChoiceCtiEditor, self).finalize()
Is called when the editor is closed. Disconnect signals.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L498-L502
titusjan/argos
argos/config/qtctis.py
PenCti.configValue
def configValue(self): """ Creates a QPen made of the children's config values. """ if not self.data: return None else: pen = QtGui.QPen() pen.setCosmetic(True) pen.setColor(self.colorCti.configValue) style = self.styleCti.confi...
python
def configValue(self): """ Creates a QPen made of the children's config values. """ if not self.data: return None else: pen = QtGui.QPen() pen.setCosmetic(True) pen.setColor(self.colorCti.configValue) style = self.styleCti.confi...
Creates a QPen made of the children's config values.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L560-L573
titusjan/argos
argos/config/qtctis.py
PenCti.createPen
def createPen(self, altStyle=None, altWidth=None): """ Creates a pen from the config values with the style overridden by altStyle if the None-option is selected in the combo box. """ pen = self.configValue if pen is not None: style = self.findByNodePath('style')....
python
def createPen(self, altStyle=None, altWidth=None): """ Creates a pen from the config values with the style overridden by altStyle if the None-option is selected in the combo box. """ pen = self.configValue if pen is not None: style = self.findByNodePath('style')....
Creates a pen from the config values with the style overridden by altStyle if the None-option is selected in the combo box.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/qtctis.py#L576-L592
titusjan/argos
argos/utils/masks.py
replaceMaskedValue
def replaceMaskedValue(data, mask, replacementValue, copyOnReplace=True): """ Replaces values where the mask is True with the replacement value. :copyOnReplace makeCopy: If True (the default) it makes a copy if data is replaced. """ if mask is False: result = data elif mask is True: ...
python
def replaceMaskedValue(data, mask, replacementValue, copyOnReplace=True): """ Replaces values where the mask is True with the replacement value. :copyOnReplace makeCopy: If True (the default) it makes a copy if data is replaced. """ if mask is False: result = data elif mask is True: ...
Replaces values where the mask is True with the replacement value. :copyOnReplace makeCopy: If True (the default) it makes a copy if data is replaced.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L231-L251
titusjan/argos
argos/utils/masks.py
replaceMaskedValueWithFloat
def replaceMaskedValueWithFloat(data, mask, replacementValue, copyOnReplace=True): """ Replaces values where the mask is True with the replacement value. Will change the data type to float if the data is an integer. If the data is not a float (or int) the function does nothing. Otherwise it will ca...
python
def replaceMaskedValueWithFloat(data, mask, replacementValue, copyOnReplace=True): """ Replaces values where the mask is True with the replacement value. Will change the data type to float if the data is an integer. If the data is not a float (or int) the function does nothing. Otherwise it will ca...
Replaces values where the mask is True with the replacement value. Will change the data type to float if the data is an integer. If the data is not a float (or int) the function does nothing. Otherwise it will call replaceMaskedValue with the same parameters. :copyOnReplace makeCopy: I...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L254-L270
titusjan/argos
argos/utils/masks.py
maskedNanPercentile
def maskedNanPercentile(maskedArray, percentiles, *args, **kwargs): """ Calculates np.nanpercentile on the non-masked values """ #https://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html#accessing-the-data awm = ArrayWithMask.createFromMaskedArray(maskedArray) maskIdx = awm.maskIndex() ...
python
def maskedNanPercentile(maskedArray, percentiles, *args, **kwargs): """ Calculates np.nanpercentile on the non-masked values """ #https://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html#accessing-the-data awm = ArrayWithMask.createFromMaskedArray(maskedArray) maskIdx = awm.maskIndex() ...
Calculates np.nanpercentile on the non-masked values
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L274-L293
titusjan/argos
argos/utils/masks.py
maskedEqual
def maskedEqual(array, missingValue): """ Mask an array where equal to a given (missing)value. Unfortunately ma.masked_equal does not work with structured arrays. See: https://mail.scipy.org/pipermail/numpy-discussion/2011-July/057669.html If the data is a structured array the mask is appl...
python
def maskedEqual(array, missingValue): """ Mask an array where equal to a given (missing)value. Unfortunately ma.masked_equal does not work with structured arrays. See: https://mail.scipy.org/pipermail/numpy-discussion/2011-July/057669.html If the data is a structured array the mask is appl...
Mask an array where equal to a given (missing)value. Unfortunately ma.masked_equal does not work with structured arrays. See: https://mail.scipy.org/pipermail/numpy-discussion/2011-July/057669.html If the data is a structured array the mask is applied for every field (i.e. forming a lo...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L338-L367
titusjan/argos
argos/utils/masks.py
ArrayWithMask.mask
def mask(self, mask): """ The mask values. Must be an array or a boolean scalar.""" check_class(mask, (np.ndarray, bool, np.bool_)) if isinstance(mask, (bool, np.bool_)): self._mask = bool(mask) else: self._mask = mask
python
def mask(self, mask): """ The mask values. Must be an array or a boolean scalar.""" check_class(mask, (np.ndarray, bool, np.bool_)) if isinstance(mask, (bool, np.bool_)): self._mask = bool(mask) else: self._mask = mask
The mask values. Must be an array or a boolean scalar.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L84-L90
titusjan/argos
argos/utils/masks.py
ArrayWithMask.checkIsConsistent
def checkIsConsistent(self): """ Raises a ConsistencyError if the mask has an incorrect shape. """ if is_an_array(self.mask) and self.mask.shape != self.data.shape: raise ConsistencyError("Shape mismatch mask={}, data={}" .format(self.mask.shape != ...
python
def checkIsConsistent(self): """ Raises a ConsistencyError if the mask has an incorrect shape. """ if is_an_array(self.mask) and self.mask.shape != self.data.shape: raise ConsistencyError("Shape mismatch mask={}, data={}" .format(self.mask.shape != ...
Raises a ConsistencyError if the mask has an incorrect shape.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L105-L110
titusjan/argos
argos/utils/masks.py
ArrayWithMask.createFromMaskedArray
def createFromMaskedArray(cls, masked_arr): """ Creates an ArrayWithMak :param masked_arr: a numpy MaskedArray or numpy array :return: ArrayWithMask """ if isinstance(masked_arr, ArrayWithMask): return masked_arr check_class(masked_arr, (np.ndarray, ...
python
def createFromMaskedArray(cls, masked_arr): """ Creates an ArrayWithMak :param masked_arr: a numpy MaskedArray or numpy array :return: ArrayWithMask """ if isinstance(masked_arr, ArrayWithMask): return masked_arr check_class(masked_arr, (np.ndarray, ...
Creates an ArrayWithMak :param masked_arr: a numpy MaskedArray or numpy array :return: ArrayWithMask
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L114-L130
titusjan/argos
argos/utils/masks.py
ArrayWithMask.asMaskedArray
def asMaskedArray(self): """ Creates converts to a masked array """ return ma.masked_array(data=self.data, mask=self.mask, fill_value=self.fill_value)
python
def asMaskedArray(self): """ Creates converts to a masked array """ return ma.masked_array(data=self.data, mask=self.mask, fill_value=self.fill_value)
Creates converts to a masked array
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L133-L136
titusjan/argos
argos/utils/masks.py
ArrayWithMask.maskAt
def maskAt(self, index): """ Returns the mask at the index. It the mask is a boolean it is returned since this boolean representes the mask for all array elements. """ if isinstance(self.mask, bool): return self.mask else: return self.mask...
python
def maskAt(self, index): """ Returns the mask at the index. It the mask is a boolean it is returned since this boolean representes the mask for all array elements. """ if isinstance(self.mask, bool): return self.mask else: return self.mask...
Returns the mask at the index. It the mask is a boolean it is returned since this boolean representes the mask for all array elements.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L139-L148
titusjan/argos
argos/utils/masks.py
ArrayWithMask.maskIndex
def maskIndex(self): """ Returns a boolean index with True if the value is masked. Always has the same shape as the maksedArray.data, event if the mask is a single boolan. """ if isinstance(self.mask, bool): return np.full(self.data.shape, self.mask, dtype=np.bool) ...
python
def maskIndex(self): """ Returns a boolean index with True if the value is masked. Always has the same shape as the maksedArray.data, event if the mask is a single boolan. """ if isinstance(self.mask, bool): return np.full(self.data.shape, self.mask, dtype=np.bool) ...
Returns a boolean index with True if the value is masked. Always has the same shape as the maksedArray.data, event if the mask is a single boolan.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L151-L159
titusjan/argos
argos/utils/masks.py
ArrayWithMask.transpose
def transpose(self, *args, **kwargs): """ Transposes the array and mask separately :param awm: ArrayWithMask :return: copy/view with transposed """ tdata = np.transpose(self.data, *args, **kwargs) tmask = np.transpose(self.mask, *args, **kwargs) if is_an_array(se...
python
def transpose(self, *args, **kwargs): """ Transposes the array and mask separately :param awm: ArrayWithMask :return: copy/view with transposed """ tdata = np.transpose(self.data, *args, **kwargs) tmask = np.transpose(self.mask, *args, **kwargs) if is_an_array(se...
Transposes the array and mask separately :param awm: ArrayWithMask :return: copy/view with transposed
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L184-L192
titusjan/argos
argos/utils/masks.py
ArrayWithMask.replaceMaskedValue
def replaceMaskedValue(self, replacementValue): """ Replaces values where the mask is True with the replacement value. """ if self.mask is False: pass elif self.mask is True: self.data[:] = replacementValue else: self.data[self.mask] = replacem...
python
def replaceMaskedValue(self, replacementValue): """ Replaces values where the mask is True with the replacement value. """ if self.mask is False: pass elif self.mask is True: self.data[:] = replacementValue else: self.data[self.mask] = replacem...
Replaces values where the mask is True with the replacement value.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L195-L203
titusjan/argos
argos/utils/masks.py
ArrayWithMask.replaceMaskedValueWithNan
def replaceMaskedValueWithNan(self): """ Replaces values where the mask is True with the replacement value. Will change the data type to float if the data is an integer. If the data is not a float (or int) the function does nothing. """ kind = self.data.dtype.kind ...
python
def replaceMaskedValueWithNan(self): """ Replaces values where the mask is True with the replacement value. Will change the data type to float if the data is an integer. If the data is not a float (or int) the function does nothing. """ kind = self.data.dtype.kind ...
Replaces values where the mask is True with the replacement value. Will change the data type to float if the data is an integer. If the data is not a float (or int) the function does nothing.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/masks.py#L206-L224
titusjan/argos
argos/widgets/pluginsdialog.py
RegistryTab.importRegItem
def importRegItem(self, regItem): """ Imports the regItem Writes this in the statusLabel while the import is in progress. """ self.statusLabel.setText("Importing {}...".format(regItem.fullName)) QtWidgets.qApp.processEvents() regItem.tryImportClass() self.tabl...
python
def importRegItem(self, regItem): """ Imports the regItem Writes this in the statusLabel while the import is in progress. """ self.statusLabel.setText("Importing {}...".format(regItem.fullName)) QtWidgets.qApp.processEvents() regItem.tryImportClass() self.tabl...
Imports the regItem Writes this in the statusLabel while the import is in progress.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/pluginsdialog.py#L133-L142
titusjan/argos
argos/widgets/pluginsdialog.py
RegistryTab.tryImportAllPlugins
def tryImportAllPlugins(self): """ Tries to import all underlying plugin classes """ for regItem in self.registeredItems: if not regItem.triedImport: self.importRegItem(regItem) logger.debug("Importing finished.")
python
def tryImportAllPlugins(self): """ Tries to import all underlying plugin classes """ for regItem in self.registeredItems: if not regItem.triedImport: self.importRegItem(regItem) logger.debug("Importing finished.")
Tries to import all underlying plugin classes
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/pluginsdialog.py#L145-L152
titusjan/argos
argos/widgets/pluginsdialog.py
RegistryTab.setCurrentRegItem
def setCurrentRegItem(self, regItem): """ Sets the current item to the regItem """ check_class(regItem, ClassRegItem, allow_none=True) self.tableView.setCurrentRegItem(regItem)
python
def setCurrentRegItem(self, regItem): """ Sets the current item to the regItem """ check_class(regItem, ClassRegItem, allow_none=True) self.tableView.setCurrentRegItem(regItem)
Sets the current item to the regItem
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/pluginsdialog.py#L162-L166
titusjan/argos
argos/widgets/pluginsdialog.py
RegistryTab.currentItemChanged
def currentItemChanged(self, _currentIndex=None, _previousIndex=None): """ Updates the description text widget when the user clicks on a selector in the table. The _currentIndex and _previousIndex parameters are ignored. """ self.editor.clear() self.editor.setTextColor(QCOLOR...
python
def currentItemChanged(self, _currentIndex=None, _previousIndex=None): """ Updates the description text widget when the user clicks on a selector in the table. The _currentIndex and _previousIndex parameters are ignored. """ self.editor.clear() self.editor.setTextColor(QCOLOR...
Updates the description text widget when the user clicks on a selector in the table. The _currentIndex and _previousIndex parameters are ignored.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/pluginsdialog.py#L170-L194
titusjan/argos
argos/widgets/pluginsdialog.py
PluginsDialog.tryImportAllPlugins
def tryImportAllPlugins(self): """ Refreshes the tables of all tables by importing the underlying classes """ logger.debug("Importing plugins: {}".format(self)) for tabNr in range(self.tabWidget.count()): tab = self.tabWidget.widget(tabNr) tab.tryImportAllPlugins(...
python
def tryImportAllPlugins(self): """ Refreshes the tables of all tables by importing the underlying classes """ logger.debug("Importing plugins: {}".format(self)) for tabNr in range(self.tabWidget.count()): tab = self.tabWidget.widget(tabNr) tab.tryImportAllPlugins(...
Refreshes the tables of all tables by importing the underlying classes
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/pluginsdialog.py#L243-L249
titusjan/argos
argos/repo/rtiplugins/hdf5.py
dimNamesFromDataset
def dimNamesFromDataset(h5Dataset): """ Constructs the dimension names given a h5py dataset. First looks in the dataset's dimension scales to see if it refers to another dataset. In that case the referred dataset's name is used. If not, the label of the dimension scale is used. Finally, if ...
python
def dimNamesFromDataset(h5Dataset): """ Constructs the dimension names given a h5py dataset. First looks in the dataset's dimension scales to see if it refers to another dataset. In that case the referred dataset's name is used. If not, the label of the dimension scale is used. Finally, if ...
Constructs the dimension names given a h5py dataset. First looks in the dataset's dimension scales to see if it refers to another dataset. In that case the referred dataset's name is used. If not, the label of the dimension scale is used. Finally, if this is empty, the dimension is numbered.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L39-L64
titusjan/argos
argos/repo/rtiplugins/hdf5.py
dataSetElementType
def dataSetElementType(h5Dataset): """ Returns a string describing the element type of the dataset """ dtype = h5Dataset.dtype if dtype.names: return '<structured>' else: if dtype.metadata and 'vlen' in dtype.metadata: vlen_type = dtype.metadata['vlen'] try:...
python
def dataSetElementType(h5Dataset): """ Returns a string describing the element type of the dataset """ dtype = h5Dataset.dtype if dtype.names: return '<structured>' else: if dtype.metadata and 'vlen' in dtype.metadata: vlen_type = dtype.metadata['vlen'] try:...
Returns a string describing the element type of the dataset
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L67-L82
titusjan/argos
argos/repo/rtiplugins/hdf5.py
dataSetUnit
def dataSetUnit(h5Dataset): """ Returns the unit of the h5Dataset by looking in the attributes. It searches in the attributes for one of the following keys: 'unit', 'units', 'Unit', 'Units', 'UNIT', 'UNITS'. If these are not found, the empty string is returned. Always returns a str...
python
def dataSetUnit(h5Dataset): """ Returns the unit of the h5Dataset by looking in the attributes. It searches in the attributes for one of the following keys: 'unit', 'units', 'Unit', 'Units', 'UNIT', 'UNITS'. If these are not found, the empty string is returned. Always returns a str...
Returns the unit of the h5Dataset by looking in the attributes. It searches in the attributes for one of the following keys: 'unit', 'units', 'Unit', 'Units', 'UNIT', 'UNITS'. If these are not found, the empty string is returned. Always returns a string
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L85-L104
titusjan/argos
argos/repo/rtiplugins/hdf5.py
dataSetMissingValue
def dataSetMissingValue(h5Dataset): """ Returns the missingData given a HDF-5 dataset Looks for one of the following attributes: _FillValue, missing_value, MissingValue, missingValue. Returns None if these attributes are not found. HDF-EOS and NetCDF files seem to put the attributes in 1-e...
python
def dataSetMissingValue(h5Dataset): """ Returns the missingData given a HDF-5 dataset Looks for one of the following attributes: _FillValue, missing_value, MissingValue, missingValue. Returns None if these attributes are not found. HDF-EOS and NetCDF files seem to put the attributes in 1-e...
Returns the missingData given a HDF-5 dataset Looks for one of the following attributes: _FillValue, missing_value, MissingValue, missingValue. Returns None if these attributes are not found. HDF-EOS and NetCDF files seem to put the attributes in 1-element arrays. So if the attribute c...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L107-L127
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyFieldRti._subArrayShape
def _subArrayShape(self): """ Returns the shape of the sub-array An empty tuple is returned for regular fields, which have no sub array. """ if self._h5Dataset.dtype.fields is None: return tuple() # regular field else: fieldName = self.nodeName ...
python
def _subArrayShape(self): """ Returns the shape of the sub-array An empty tuple is returned for regular fields, which have no sub array. """ if self._h5Dataset.dtype.fields is None: return tuple() # regular field else: fieldName = self.nodeName ...
Returns the shape of the sub-array An empty tuple is returned for regular fields, which have no sub array.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L268-L277
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyFieldRti.elementTypeName
def elementTypeName(self): """ String representation of the element type. """ fieldName = self.nodeName return str(self._h5Dataset.dtype.fields[fieldName][0])
python
def elementTypeName(self): """ String representation of the element type. """ fieldName = self.nodeName return str(self._h5Dataset.dtype.fields[fieldName][0])
String representation of the element type.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L289-L293
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyFieldRti.dimensionNames
def dimensionNames(self): """ Returns a list with the dimension names of the underlying NCDF variable """ nSubDims = len(self._subArrayShape) subArrayDims = ['SubDim{}'.format(dimNr) for dimNr in range(nSubDims)] return dimNamesFromDataset(self._h5Dataset) + subArrayDims
python
def dimensionNames(self): """ Returns a list with the dimension names of the underlying NCDF variable """ nSubDims = len(self._subArrayShape) subArrayDims = ['SubDim{}'.format(dimNr) for dimNr in range(nSubDims)] return dimNamesFromDataset(self._h5Dataset) + subArrayDims
Returns a list with the dimension names of the underlying NCDF variable
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L297-L302
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyFieldRti.unit
def unit(self): """ Returns the unit of the RTI by calling dataSetUnit on the underlying dataset """ unit = dataSetUnit(self._h5Dataset) fieldNames = self._h5Dataset.dtype.names # If the missing value attribute is a list with the same length as the number of fields, # re...
python
def unit(self): """ Returns the unit of the RTI by calling dataSetUnit on the underlying dataset """ unit = dataSetUnit(self._h5Dataset) fieldNames = self._h5Dataset.dtype.names # If the missing value attribute is a list with the same length as the number of fields, # re...
Returns the unit of the RTI by calling dataSetUnit on the underlying dataset
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L306-L318
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyFieldRti.missingDataValue
def missingDataValue(self): """ Returns the value to indicate missing data. None if no missing-data value is specified. """ value = dataSetMissingValue(self._h5Dataset) fieldNames = self._h5Dataset.dtype.names # If the missing value attribute is a list with the same length as th...
python
def missingDataValue(self): """ Returns the value to indicate missing data. None if no missing-data value is specified. """ value = dataSetMissingValue(self._h5Dataset) fieldNames = self._h5Dataset.dtype.names # If the missing value attribute is a list with the same length as th...
Returns the value to indicate missing data. None if no missing-data value is specified.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L322-L334
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyDatasetRti.iconGlyph
def iconGlyph(self): """ Shows an Array icon for regular datasets but a dimension icon for dimension scales """ if self._h5Dataset.attrs.get('CLASS', None) == b'DIMENSION_SCALE': return RtiIconFactory.DIMENSION else: return RtiIconFactory.ARRAY
python
def iconGlyph(self): """ Shows an Array icon for regular datasets but a dimension icon for dimension scales """ if self._h5Dataset.attrs.get('CLASS', None) == b'DIMENSION_SCALE': return RtiIconFactory.DIMENSION else: return RtiIconFactory.ARRAY
Shows an Array icon for regular datasets but a dimension icon for dimension scales
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L356-L362
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyDatasetRti._fetchAllChildren
def _fetchAllChildren(self): """ Fetches all fields that this variable contains. Only variables with a structured data type can have fields. """ assert self.canFetchChildren(), "canFetchChildren must be True" childItems = [] # Add fields if self._isStructure...
python
def _fetchAllChildren(self): """ Fetches all fields that this variable contains. Only variables with a structured data type can have fields. """ assert self.canFetchChildren(), "canFetchChildren must be True" childItems = [] # Add fields if self._isStructure...
Fetches all fields that this variable contains. Only variables with a structured data type can have fields.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L428-L442
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyGroupRti._fetchAllChildren
def _fetchAllChildren(self): """ Fetches all sub groups and variables that this group contains. """ assert self._h5Group is not None, "dataset undefined (file not opened?)" assert self.canFetchChildren(), "canFetchChildren must be True" childItems = [] for childName, h5...
python
def _fetchAllChildren(self): """ Fetches all sub groups and variables that this group contains. """ assert self._h5Group is not None, "dataset undefined (file not opened?)" assert self.canFetchChildren(), "canFetchChildren must be True" childItems = [] for childName, h5...
Fetches all sub groups and variables that this group contains.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L467-L494
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyFileRti._openResources
def _openResources(self): """ Opens the root Dataset. """ logger.info("Opening: {}".format(self._fileName)) self._h5Group = h5py.File(self._fileName, 'r')
python
def _openResources(self): """ Opens the root Dataset. """ logger.info("Opening: {}".format(self._fileName)) self._h5Group = h5py.File(self._fileName, 'r')
Opens the root Dataset.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L512-L516
titusjan/argos
argos/repo/rtiplugins/hdf5.py
H5pyFileRti._closeResources
def _closeResources(self): """ Closes the root Dataset. """ logger.info("Closing: {}".format(self._fileName)) self._h5Group.close() self._h5Group = None
python
def _closeResources(self): """ Closes the root Dataset. """ logger.info("Closing: {}".format(self._fileName)) self._h5Group.close() self._h5Group = None
Closes the root Dataset.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/hdf5.py#L519-L524
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
calcPgImagePlot2dDataRange
def calcPgImagePlot2dDataRange(pgImagePlot2d, percentage, crossPlot): """ Calculates the range from the inspectors' sliced array. Discards percentage of the minimum and percentage of the maximum values of the inspector.slicedArray :param pgImagePlot2d: the range methods will work on (the sliced arr...
python
def calcPgImagePlot2dDataRange(pgImagePlot2d, percentage, crossPlot): """ Calculates the range from the inspectors' sliced array. Discards percentage of the minimum and percentage of the maximum values of the inspector.slicedArray :param pgImagePlot2d: the range methods will work on (the sliced arr...
Calculates the range from the inspectors' sliced array. Discards percentage of the minimum and percentage of the maximum values of the inspector.slicedArray :param pgImagePlot2d: the range methods will work on (the sliced array) of this inspector. :param percentage: percentage that will be disc...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L56-L88
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
crossPlotAutoRangeMethods
def crossPlotAutoRangeMethods(pgImagePlot2d, crossPlot, intialItems=None): """ Creates an ordered dict with autorange methods for an PgImagePlot2d inspector. :param pgImagePlot2d: the range methods will work on (the sliced array) of this inspector. :param crossPlot: if None, the range will be calcu...
python
def crossPlotAutoRangeMethods(pgImagePlot2d, crossPlot, intialItems=None): """ Creates an ordered dict with autorange methods for an PgImagePlot2d inspector. :param pgImagePlot2d: the range methods will work on (the sliced array) of this inspector. :param crossPlot: if None, the range will be calcu...
Creates an ordered dict with autorange methods for an PgImagePlot2d inspector. :param pgImagePlot2d: the range methods will work on (the sliced array) of this inspector. :param crossPlot: if None, the range will be calculated from the entire sliced array, if "horizontal" or "vertical" the r...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L91-L120
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
PgImagePlot2dCti._closeResources
def _closeResources(self): """ Disconnects signals. Is called by self.finalize when the cti is deleted. """ verCrossViewBox = self.pgImagePlot2d.verCrossPlotItem.getViewBox() verCrossViewBox.sigRangeChangedManually.disconnect(self.yAxisRangeCti.setAutoRangeOff) horCro...
python
def _closeResources(self): """ Disconnects signals. Is called by self.finalize when the cti is deleted. """ verCrossViewBox = self.pgImagePlot2d.verCrossPlotItem.getViewBox() verCrossViewBox.sigRangeChangedManually.disconnect(self.yAxisRangeCti.setAutoRangeOff) horCro...
Disconnects signals. Is called by self.finalize when the cti is deleted.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L214-L225
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
PgImagePlot2dCti.setImagePlotAutoRangeOn
def setImagePlotAutoRangeOn(self, axisNumber): """ Sets the image plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes). """ setXYAxesAutoRangeOn(self, self.xAxisRangeCti, self.yAxisRangeCti, axisNumber)
python
def setImagePlotAutoRangeOn(self, axisNumber): """ Sets the image plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes). """ setXYAxesAutoRangeOn(self, self.xAxisRangeCti, self.yAxisRangeCti, axisNumber)
Sets the image plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes).
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L228-L233
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
PgImagePlot2dCti.setHorCrossPlotAutoRangeOn
def setHorCrossPlotAutoRangeOn(self, axisNumber): """ Sets the horizontal cross-hair plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes). """ setXYAxesAutoRangeOn(self, self.xAxisRangeCti, self.horCrossPlotRange...
python
def setHorCrossPlotAutoRangeOn(self, axisNumber): """ Sets the horizontal cross-hair plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes). """ setXYAxesAutoRangeOn(self, self.xAxisRangeCti, self.horCrossPlotRange...
Sets the horizontal cross-hair plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes).
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L236-L241
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
PgImagePlot2dCti.setVerCrossPlotAutoRangeOn
def setVerCrossPlotAutoRangeOn(self, axisNumber): """ Sets the vertical cross-hair plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes). """ setXYAxesAutoRangeOn(self, self.verCrossPlotRangeCti, self.yAxisRangeCt...
python
def setVerCrossPlotAutoRangeOn(self, axisNumber): """ Sets the vertical cross-hair plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes). """ setXYAxesAutoRangeOn(self, self.verCrossPlotRangeCti, self.yAxisRangeCt...
Sets the vertical cross-hair plot's auto-range on for the axis with number axisNumber. :param axisNumber: 0 (X-axis), 1 (Y-axis), 2, (Both X and Y axes).
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L244-L249
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
PgImagePlot2d._clearContents
def _clearContents(self): """ Clears the contents when no valid data is available """ logger.debug("Clearing inspector contents") self.titleLabel.setText('') # Don't clear the imagePlotItem, the imageItem is only added in the constructor. self.imageItem.clear() s...
python
def _clearContents(self): """ Clears the contents when no valid data is available """ logger.debug("Clearing inspector contents") self.titleLabel.setText('') # Don't clear the imagePlotItem, the imageItem is only added in the constructor. self.imageItem.clear() s...
Clears the contents when no valid data is available
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L368-L393
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
PgImagePlot2d._drawContents
def _drawContents(self, reason=None, initiator=None): """ Draws the plot contents from the sliced array of the collected repo tree item. The reason parameter is used to determine if the axes will be reset (the initiator parameter is ignored). See AbstractInspector.updateContents for the...
python
def _drawContents(self, reason=None, initiator=None): """ Draws the plot contents from the sliced array of the collected repo tree item. The reason parameter is used to determine if the axes will be reset (the initiator parameter is ignored). See AbstractInspector.updateContents for the...
Draws the plot contents from the sliced array of the collected repo tree item. The reason parameter is used to determine if the axes will be reset (the initiator parameter is ignored). See AbstractInspector.updateContents for their description.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L396-L484
titusjan/argos
argos/inspector/pgplugins/imageplot2d.py
PgImagePlot2d.mouseMoved
def mouseMoved(self, viewPos): """ Updates the probe text with the values under the cursor. Draws a vertical line and a symbol at the position of the probe. """ try: check_class(viewPos, QtCore.QPointF) show_data_point = False # shows the data point as a circl...
python
def mouseMoved(self, viewPos): """ Updates the probe text with the values under the cursor. Draws a vertical line and a symbol at the position of the probe. """ try: check_class(viewPos, QtCore.QPointF) show_data_point = False # shows the data point as a circl...
Updates the probe text with the values under the cursor. Draws a vertical line and a symbol at the position of the probe.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/imageplot2d.py#L488-L621
titusjan/argos
argos/repo/registry.py
RtiRegItem.getFileDialogFilter
def getFileDialogFilter(self): """ Returns a filters that can be used to construct file dialogs filters, for example: 'Text File (*.txt;*.text)' """ extStr = ';'.join(['*' + ext for ext in self.extensions]) return '{} ({})'.format(self.name, extStr)
python
def getFileDialogFilter(self): """ Returns a filters that can be used to construct file dialogs filters, for example: 'Text File (*.txt;*.text)' """ extStr = ';'.join(['*' + ext for ext in self.extensions]) return '{} ({})'.format(self.name, extStr)
Returns a filters that can be used to construct file dialogs filters, for example: 'Text File (*.txt;*.text)'
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/registry.py#L46-L51
titusjan/argos
argos/repo/registry.py
RtiRegItem.asDict
def asDict(self): """ Returns a dictionary for serialization. """ dct = super(RtiRegItem, self).asDict() dct['extensions'] = self.extensions return dct
python
def asDict(self): """ Returns a dictionary for serialization. """ dct = super(RtiRegItem, self).asDict() dct['extensions'] = self.extensions return dct
Returns a dictionary for serialization.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/registry.py#L54-L59
titusjan/argos
argos/repo/registry.py
RtiRegistry._registerExtension
def _registerExtension(self, extension, rtiRegItem): """ Links an file name extension to a repository tree item. """ check_is_a_string(extension) check_class(rtiRegItem, RtiRegItem) logger.debug(" Registering extension {!r} for {}".format(extension, rtiRegItem)) # TODO...
python
def _registerExtension(self, extension, rtiRegItem): """ Links an file name extension to a repository tree item. """ check_is_a_string(extension) check_class(rtiRegItem, RtiRegItem) logger.debug(" Registering extension {!r} for {}".format(extension, rtiRegItem)) # TODO...
Links an file name extension to a repository tree item.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/registry.py#L85-L97
titusjan/argos
argos/repo/registry.py
RtiRegistry.registerItem
def registerItem(self, regItem): """ Adds a ClassRegItem object to the registry. """ super(RtiRegistry, self).registerItem(regItem) for ext in regItem.extensions: self._registerExtension(ext, regItem)
python
def registerItem(self, regItem): """ Adds a ClassRegItem object to the registry. """ super(RtiRegistry, self).registerItem(regItem) for ext in regItem.extensions: self._registerExtension(ext, regItem)
Adds a ClassRegItem object to the registry.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/registry.py#L100-L106
titusjan/argos
argos/repo/registry.py
RtiRegistry.registerRti
def registerRti(self, fullName, fullClassName, extensions=None, pythonPath=''): """ Class that maintains the collection of registered inspector classes. Maintains a lit of file extensions that open the RTI by default. """ check_is_a_sequence(extensions) extensions = extension...
python
def registerRti(self, fullName, fullClassName, extensions=None, pythonPath=''): """ Class that maintains the collection of registered inspector classes. Maintains a lit of file extensions that open the RTI by default. """ check_is_a_sequence(extensions) extensions = extension...
Class that maintains the collection of registered inspector classes. Maintains a lit of file extensions that open the RTI by default.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/registry.py#L109-L118
titusjan/argos
argos/repo/registry.py
RtiRegistry.getFileDialogFilter
def getFileDialogFilter(self): """ Returns a filter that can be used in open file dialogs, for example: 'All files (*);;Txt (*.txt;*.text);;netCDF(*.nc;*.nc4)' """ filters = [] for regRti in self.items: filters.append(regRti.getFileDialogFilter()) return '...
python
def getFileDialogFilter(self): """ Returns a filter that can be used in open file dialogs, for example: 'All files (*);;Txt (*.txt;*.text);;netCDF(*.nc;*.nc4)' """ filters = [] for regRti in self.items: filters.append(regRti.getFileDialogFilter()) return '...
Returns a filter that can be used in open file dialogs, for example: 'All files (*);;Txt (*.txt;*.text);;netCDF(*.nc;*.nc4)'
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/registry.py#L129-L136
titusjan/argos
argos/repo/registry.py
RtiRegistry.getDefaultItems
def getDefaultItems(self): """ Returns a list with the default plugins in the repo tree item registry. """ return [ RtiRegItem('HDF-5 file', 'argos.repo.rtiplugins.hdf5.H5pyFileRti', extensions=['hdf5', 'h5', 'h5e', 'he5', 'nc']), # hdf e...
python
def getDefaultItems(self): """ Returns a list with the default plugins in the repo tree item registry. """ return [ RtiRegItem('HDF-5 file', 'argos.repo.rtiplugins.hdf5.H5pyFileRti', extensions=['hdf5', 'h5', 'h5e', 'he5', 'nc']), # hdf e...
Returns a list with the default plugins in the repo tree item registry.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/registry.py#L139-L185
titusjan/argos
argos/widgets/aboutdialog.py
AboutDialog._addModuleInfo
def _addModuleInfo(self, moduleInfo): """ Adds a line with module info to the editor :param moduleInfo: can either be a string or a module info class. In the first case, an object is instantiated as ImportedModuleInfo(moduleInfo). """ if is_a_string(moduleInfo): ...
python
def _addModuleInfo(self, moduleInfo): """ Adds a line with module info to the editor :param moduleInfo: can either be a string or a module info class. In the first case, an object is instantiated as ImportedModuleInfo(moduleInfo). """ if is_a_string(moduleInfo): ...
Adds a line with module info to the editor :param moduleInfo: can either be a string or a module info class. In the first case, an object is instantiated as ImportedModuleInfo(moduleInfo).
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/aboutdialog.py#L65-L75
titusjan/argos
argos/widgets/aboutdialog.py
AboutDialog.addDependencyInfo
def addDependencyInfo(self): """ Adds version info about the installed dependencies """ logger.debug("Adding dependency info to the AboutDialog") self.progressLabel.setText("Retrieving package info...") self.editor.clear() self._addModuleInfo(mi.PythonModuleInfo()) ...
python
def addDependencyInfo(self): """ Adds version info about the installed dependencies """ logger.debug("Adding dependency info to the AboutDialog") self.progressLabel.setText("Retrieving package info...") self.editor.clear() self._addModuleInfo(mi.PythonModuleInfo()) ...
Adds version info about the installed dependencies
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/aboutdialog.py#L78-L97
titusjan/argos
argos/config/floatcti.py
FloatCti._enforceDataType
def _enforceDataType(self, data): """ Converts to float so that this CTI always stores that type. Replaces infinite with the maximum respresentable float. Raises a ValueError if data is a NaN. """ value = float(data) if math.isnan(value): raise ValueE...
python
def _enforceDataType(self, data): """ Converts to float so that this CTI always stores that type. Replaces infinite with the maximum respresentable float. Raises a ValueError if data is a NaN. """ value = float(data) if math.isnan(value): raise ValueE...
Converts to float so that this CTI always stores that type. Replaces infinite with the maximum respresentable float. Raises a ValueError if data is a NaN.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L60-L78
titusjan/argos
argos/config/floatcti.py
FloatCti._dataToString
def _dataToString(self, data): """ Conversion function used to convert the (default)data to the display value. """ if self.specialValueText is not None and data == self.minValue: return self.specialValueText else: return "{}{:.{}f}{}".format(self.prefix, data, sel...
python
def _dataToString(self, data): """ Conversion function used to convert the (default)data to the display value. """ if self.specialValueText is not None and data == self.minValue: return self.specialValueText else: return "{}{:.{}f}{}".format(self.prefix, data, sel...
Conversion function used to convert the (default)data to the display value.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L81-L87
titusjan/argos
argos/config/floatcti.py
FloatCti.debugInfo
def debugInfo(self): """ Returns the string with debugging information """ return ("min = {}, max = {}, step = {}, decimals = {}, specVal = {}" .format(self.minValue, self.maxValue, self.stepSize, self.decimals, self.specialValueText))
python
def debugInfo(self): """ Returns the string with debugging information """ return ("min = {}, max = {}, step = {}, decimals = {}, specVal = {}" .format(self.minValue, self.maxValue, self.stepSize, self.decimals, self.specialValueText))
Returns the string with debugging information
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L91-L96
titusjan/argos
argos/config/floatcti.py
FloatCti.createEditor
def createEditor(self, delegate, parent, option): """ Creates a FloatCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return FloatCtiEditor(self, delegate, parent=parent)
python
def createEditor(self, delegate, parent, option): """ Creates a FloatCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return FloatCtiEditor(self, delegate, parent=parent)
Creates a FloatCtiEditor. For the parameters see the AbstractCti constructor documentation.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L99-L103
titusjan/argos
argos/config/floatcti.py
FloatCtiEditor.finalize
def finalize(self): """ Called at clean up. Is used to disconnect signals. """ self.spinBox.valueChanged.disconnect(self.commitChangedValue) super(FloatCtiEditor, self).finalize()
python
def finalize(self): """ Called at clean up. Is used to disconnect signals. """ self.spinBox.valueChanged.disconnect(self.commitChangedValue) super(FloatCtiEditor, self).finalize()
Called at clean up. Is used to disconnect signals.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L140-L144
titusjan/argos
argos/config/floatcti.py
SnFloatCti.debugInfo
def debugInfo(self): """ Returns the string with debugging information """ return ("enabled = {}, min = {}, max = {}, precision = {}, specVal = {}" .format(self.enabled, self.minValue, self.maxValue, self.precision, self.specialValueText))
python
def debugInfo(self): """ Returns the string with debugging information """ return ("enabled = {}, min = {}, max = {}, precision = {}, specVal = {}" .format(self.enabled, self.minValue, self.maxValue, self.precision, self.specialValueText))
Returns the string with debugging information
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L248-L253
titusjan/argos
argos/config/floatcti.py
SnFloatCti.createEditor
def createEditor(self, delegate, parent, option): """ Creates a FloatCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return SnFloatCtiEditor(self, delegate, self.precision, parent=parent)
python
def createEditor(self, delegate, parent, option): """ Creates a FloatCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return SnFloatCtiEditor(self, delegate, self.precision, parent=parent)
Creates a FloatCtiEditor. For the parameters see the AbstractCti constructor documentation.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L256-L260
titusjan/argos
argos/config/floatcti.py
SnFloatCtiEditor.finalize
def finalize(self): """ Called at clean up. Is used to disconnect signals. """ self.spinBox.valueChanged.disconnect(self.commitChangedValue) super(SnFloatCtiEditor, self).finalize()
python
def finalize(self): """ Called at clean up. Is used to disconnect signals. """ self.spinBox.valueChanged.disconnect(self.commitChangedValue) super(SnFloatCtiEditor, self).finalize()
Called at clean up. Is used to disconnect signals.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/floatcti.py#L295-L299
titusjan/argos
argos/repo/filesytemrtis.py
detectRtiFromFileName
def detectRtiFromFileName(fileName): """ Determines the type of RepoTreeItem to use given a file name. Uses a DirectoryRti for directories and an UnknownFileRti if the file extension doesn't match one of the registered RTI extensions. Returns (cls, regItem) tuple. Both the cls ond the regIt...
python
def detectRtiFromFileName(fileName): """ Determines the type of RepoTreeItem to use given a file name. Uses a DirectoryRti for directories and an UnknownFileRti if the file extension doesn't match one of the registered RTI extensions. Returns (cls, regItem) tuple. Both the cls ond the regIt...
Determines the type of RepoTreeItem to use given a file name. Uses a DirectoryRti for directories and an UnknownFileRti if the file extension doesn't match one of the registered RTI extensions. Returns (cls, regItem) tuple. Both the cls ond the regItem can be None. If the file is a dire...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/filesytemrtis.py#L85-L110
titusjan/argos
argos/repo/filesytemrtis.py
createRtiFromFileName
def createRtiFromFileName(fileName): """ Determines the type of RepoTreeItem to use given a file name and creates it. Uses a DirectoryRti for directories and an UnknownFileRti if the file extension doesn't match one of the registered RTI extensions. """ cls, rtiRegItem = detectRtiFromFileNam...
python
def createRtiFromFileName(fileName): """ Determines the type of RepoTreeItem to use given a file name and creates it. Uses a DirectoryRti for directories and an UnknownFileRti if the file extension doesn't match one of the registered RTI extensions. """ cls, rtiRegItem = detectRtiFromFileNam...
Determines the type of RepoTreeItem to use given a file name and creates it. Uses a DirectoryRti for directories and an UnknownFileRti if the file extension doesn't match one of the registered RTI extensions.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/filesytemrtis.py#L113-L128
titusjan/argos
argos/repo/filesytemrtis.py
DirectoryRti._fetchAllChildren
def _fetchAllChildren(self): """ Gets all sub directories and files within the current directory. Does not fetch hidden files. """ childItems = [] fileNames = os.listdir(self._fileName) absFileNames = [os.path.join(self._fileName, fn) for fn in fileNames] # A...
python
def _fetchAllChildren(self): """ Gets all sub directories and files within the current directory. Does not fetch hidden files. """ childItems = [] fileNames = os.listdir(self._fileName) absFileNames = [os.path.join(self._fileName, fn) for fn in fileNames] # A...
Gets all sub directories and files within the current directory. Does not fetch hidden files.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/filesytemrtis.py#L63-L82
titusjan/argos
argos/collect/collectortree.py
CollectorTree.resizeColumnsToContents
def resizeColumnsToContents(self, startCol=None, stopCol=None): """ Resizes all columns to the contents """ numCols = self.model().columnCount() startCol = 0 if startCol is None else max(startCol, 0) stopCol = numCols if stopCol is None else min(stopCol, numCols) row = ...
python
def resizeColumnsToContents(self, startCol=None, stopCol=None): """ Resizes all columns to the contents """ numCols = self.model().columnCount() startCol = 0 if startCol is None else max(startCol, 0) stopCol = numCols if stopCol is None else min(stopCol, numCols) row = ...
Resizes all columns to the contents
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collectortree.py#L83-L99
titusjan/argos
argos/collect/collectortree.py
CollectorSpinBox.sizeHint
def sizeHint(self): """ Reimplemented from the C++ Qt source of QAbstractSpinBox.sizeHint, but without truncating to a maximum of 18 characters. """ # The cache is invalid after the prefix, postfix and other properties # have been set. I disabled it because sizeHint isn't cal...
python
def sizeHint(self): """ Reimplemented from the C++ Qt source of QAbstractSpinBox.sizeHint, but without truncating to a maximum of 18 characters. """ # The cache is invalid after the prefix, postfix and other properties # have been set. I disabled it because sizeHint isn't cal...
Reimplemented from the C++ Qt source of QAbstractSpinBox.sizeHint, but without truncating to a maximum of 18 characters.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collectortree.py#L114-L176
titusjan/argos
argos/config/configitemdelegate.py
ConfigItemDelegate.createEditor
def createEditor(self, parent, option, index): """ Returns the widget used to change data from the model and can be reimplemented to customize editing behavior. Reimplemented from QStyledItemDelegate. """ logger.debug("ConfigItemDelegate.createEditor, parent: {!r}".forma...
python
def createEditor(self, parent, option, index): """ Returns the widget used to change data from the model and can be reimplemented to customize editing behavior. Reimplemented from QStyledItemDelegate. """ logger.debug("ConfigItemDelegate.createEditor, parent: {!r}".forma...
Returns the widget used to change data from the model and can be reimplemented to customize editing behavior. Reimplemented from QStyledItemDelegate.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configitemdelegate.py#L46-L57
titusjan/argos
argos/config/configitemdelegate.py
ConfigItemDelegate.setEditorData
def setEditorData(self, editor, index): """ Provides the widget with data to manipulate. Calls the setEditorValue of the config tree item at the index. :type editor: QWidget :type index: QModelIndex Reimplemented from QStyledItemDelegate. """ # W...
python
def setEditorData(self, editor, index): """ Provides the widget with data to manipulate. Calls the setEditorValue of the config tree item at the index. :type editor: QWidget :type index: QModelIndex Reimplemented from QStyledItemDelegate. """ # W...
Provides the widget with data to manipulate. Calls the setEditorValue of the config tree item at the index. :type editor: QWidget :type index: QModelIndex Reimplemented from QStyledItemDelegate.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configitemdelegate.py#L78-L89
titusjan/argos
argos/config/configitemdelegate.py
ConfigItemDelegate.setModelData
def setModelData(self, editor, model, index): """ Gets data from the editor widget and stores it in the specified model at the item index. Does this by calling getEditorValue of the config tree item at the index. :type editor: QWidget :type model: ConfigTreeModel ...
python
def setModelData(self, editor, model, index): """ Gets data from the editor widget and stores it in the specified model at the item index. Does this by calling getEditorValue of the config tree item at the index. :type editor: QWidget :type model: ConfigTreeModel ...
Gets data from the editor widget and stores it in the specified model at the item index. Does this by calling getEditorValue of the config tree item at the index. :type editor: QWidget :type model: ConfigTreeModel :type index: QModelIndex Reimplemented from ...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configitemdelegate.py#L92-L109
titusjan/argos
argos/config/configitemdelegate.py
ConfigItemDelegate.updateEditorGeometry
def updateEditorGeometry(self, editor, option, index): """ Ensures that the editor is displayed correctly with respect to the item view. """ cti = index.model().getItem(index) if cti.checkState is None: displayRect = option.rect else: checkBoxRect = widget...
python
def updateEditorGeometry(self, editor, option, index): """ Ensures that the editor is displayed correctly with respect to the item view. """ cti = index.model().getItem(index) if cti.checkState is None: displayRect = option.rect else: checkBoxRect = widget...
Ensures that the editor is displayed correctly with respect to the item view.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configitemdelegate.py#L112-L124
titusjan/argos
argos/config/configtreeview.py
ConfigTreeView.closeEditor
def closeEditor(self, editor, hint): """ Finalizes, closes and releases the given editor. """ # It would be nicer if this method was part of ConfigItemDelegate since createEditor also # lives there. However, QAbstractItemView.closeEditor is sometimes called directly, # without th...
python
def closeEditor(self, editor, hint): """ Finalizes, closes and releases the given editor. """ # It would be nicer if this method was part of ConfigItemDelegate since createEditor also # lives there. However, QAbstractItemView.closeEditor is sometimes called directly, # without th...
Finalizes, closes and releases the given editor.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configtreeview.py#L93-L104
titusjan/argos
argos/config/configtreeview.py
ConfigTreeView.expandBranch
def expandBranch(self, index=None, expanded=None): """ Expands or collapses the node at the index and all it's descendants. If expanded is True the nodes will be expanded, if False they will be collapsed, and if expanded is None the expanded attribute of each item is used. If...
python
def expandBranch(self, index=None, expanded=None): """ Expands or collapses the node at the index and all it's descendants. If expanded is True the nodes will be expanded, if False they will be collapsed, and if expanded is None the expanded attribute of each item is used. If...
Expands or collapses the node at the index and all it's descendants. If expanded is True the nodes will be expanded, if False they will be collapsed, and if expanded is None the expanded attribute of each item is used. If parentIndex is None, the invisible root will be used (i.e. the...
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configtreeview.py#L107-L128
titusjan/argos
argos/repo/rtiplugins/ncdf.py
ncVarAttributes
def ncVarAttributes(ncVar): """ Returns the attributes of ncdf variable """ try: return ncVar.__dict__ except Exception as ex: # Due to some internal error netCDF4 may raise an AttributeError or KeyError, # depending on its version. logger.warn("Unable to read the attribu...
python
def ncVarAttributes(ncVar): """ Returns the attributes of ncdf variable """ try: return ncVar.__dict__ except Exception as ex: # Due to some internal error netCDF4 may raise an AttributeError or KeyError, # depending on its version. logger.warn("Unable to read the attribu...
Returns the attributes of ncdf variable
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L36-L46
titusjan/argos
argos/repo/rtiplugins/ncdf.py
ncVarUnit
def ncVarUnit(ncVar): """ Returns the unit of the ncVar by looking in the attributes. It searches in the attributes for one of the following keys: 'unit', 'units', 'Unit', 'Units', 'UNIT', 'UNITS'. If these are not found, the empty string is returned. """ attributes = ncVarAttribute...
python
def ncVarUnit(ncVar): """ Returns the unit of the ncVar by looking in the attributes. It searches in the attributes for one of the following keys: 'unit', 'units', 'Unit', 'Units', 'UNIT', 'UNITS'. If these are not found, the empty string is returned. """ attributes = ncVarAttribute...
Returns the unit of the ncVar by looking in the attributes. It searches in the attributes for one of the following keys: 'unit', 'units', 'Unit', 'Units', 'UNIT', 'UNITS'. If these are not found, the empty string is returned.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L49-L66
titusjan/argos
argos/repo/rtiplugins/ncdf.py
variableMissingValue
def variableMissingValue(ncVar): """ Returns the missingData given a NetCDF variable Looks for one of the following attributes: _FillValue, missing_value, MissingValue, missingValue. Returns None if these attributes are not found. """ attributes = ncVarAttributes(ncVar) if not attribute...
python
def variableMissingValue(ncVar): """ Returns the missingData given a NetCDF variable Looks for one of the following attributes: _FillValue, missing_value, MissingValue, missingValue. Returns None if these attributes are not found. """ attributes = ncVarAttributes(ncVar) if not attribute...
Returns the missingData given a NetCDF variable Looks for one of the following attributes: _FillValue, missing_value, MissingValue, missingValue. Returns None if these attributes are not found.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L70-L84
titusjan/argos
argos/repo/rtiplugins/ncdf.py
NcdfFieldRti.elementTypeName
def elementTypeName(self): """ String representation of the element type. """ fieldName = self.nodeName return str(self._ncVar.dtype.fields[fieldName][0])
python
def elementTypeName(self): """ String representation of the element type. """ fieldName = self.nodeName return str(self._ncVar.dtype.fields[fieldName][0])
String representation of the element type.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L191-L195
titusjan/argos
argos/repo/rtiplugins/ncdf.py
NcdfFieldRti.unit
def unit(self): """ Returns the unit attribute of the underlying ncdf variable. If the units has a length (e.g is a list) and has precisely one element per field, the unit for this field is returned. """ unit = ncVarUnit(self._ncVar) fieldNames = self._ncVar.dtyp...
python
def unit(self): """ Returns the unit attribute of the underlying ncdf variable. If the units has a length (e.g is a list) and has precisely one element per field, the unit for this field is returned. """ unit = ncVarUnit(self._ncVar) fieldNames = self._ncVar.dtyp...
Returns the unit attribute of the underlying ncdf variable. If the units has a length (e.g is a list) and has precisely one element per field, the unit for this field is returned.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L207-L222
titusjan/argos
argos/repo/rtiplugins/ncdf.py
NcdfFieldRti.dimensionNames
def dimensionNames(self): """ Returns a list with the dimension names of the underlying NCDF variable """ nSubDims = len(self._subArrayShape) subArrayDims = ['SubDim{}'.format(dimNr) for dimNr in range(nSubDims)] return list(self._ncVar.dimensions + tuple(subArrayDims))
python
def dimensionNames(self): """ Returns a list with the dimension names of the underlying NCDF variable """ nSubDims = len(self._subArrayShape) subArrayDims = ['SubDim{}'.format(dimNr) for dimNr in range(nSubDims)] return list(self._ncVar.dimensions + tuple(subArrayDims))
Returns a list with the dimension names of the underlying NCDF variable
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L227-L232
titusjan/argos
argos/repo/rtiplugins/ncdf.py
NcdfFieldRti.missingDataValue
def missingDataValue(self): """ Returns the value to indicate missing data. None if no missing-data value is specified. """ value = variableMissingValue(self._ncVar) fieldNames = self._ncVar.dtype.names # If the missing value attibute is a list with the same length as the number...
python
def missingDataValue(self): """ Returns the value to indicate missing data. None if no missing-data value is specified. """ value = variableMissingValue(self._ncVar) fieldNames = self._ncVar.dtype.names # If the missing value attibute is a list with the same length as the number...
Returns the value to indicate missing data. None if no missing-data value is specified.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L236-L248
titusjan/argos
argos/repo/rtiplugins/ncdf.py
NcdfVariableRti.elementTypeName
def elementTypeName(self): """ String representation of the element type. """ dtype = self._ncVar.dtype if type(dtype) == type: # Handle the unexpected case that dtype is a regular Python type # (happens e.g. in the /PROCESSOR/processing_configuration of the Trop...
python
def elementTypeName(self): """ String representation of the element type. """ dtype = self._ncVar.dtype if type(dtype) == type: # Handle the unexpected case that dtype is a regular Python type # (happens e.g. in the /PROCESSOR/processing_configuration of the Trop...
String representation of the element type.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L321-L330
titusjan/argos
argos/repo/rtiplugins/ncdf.py
NcdfVariableRti._fetchAllChildren
def _fetchAllChildren(self): """ Fetches all fields that this variable contains. Only variables with a structured data type can have fields. """ assert self.canFetchChildren(), "canFetchChildren must be True" childItems = [] # Add fields if self._isStructure...
python
def _fetchAllChildren(self): """ Fetches all fields that this variable contains. Only variables with a structured data type can have fields. """ assert self.canFetchChildren(), "canFetchChildren must be True" childItems = [] # Add fields if self._isStructure...
Fetches all fields that this variable contains. Only variables with a structured data type can have fields.
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/ncdf.py#L354-L367