pygmi.raster.equation_editor#
Equation editor.
Classes#
Equation Editor. |
Functions#
|
Use a histogram to generate a fast mode estimate. |
Module Contents#
- class pygmi.raster.equation_editor.EquationEditor(parent=None)#
Bases:
pygmi.misc.BasicModule
Equation Editor.
This class allows the input of equations using raster datasets as variables. This is commonly done in remote sensing applications, where there is a requirement for band ratioing etc. It uses the numexpr library.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- equation#
string with the equation in it
- Type:
str
- bands#
dictionary of bands
- Type:
dictionary
- setupui()#
Set up UI.
- Return type:
None.
- combo()#
Update combo information.
- Return type:
None.
- eq_fix(indata)#
Corrects names in equation to variable names.
- Parameters:
indata (list of pygmi.raster.datatypes.Data.) – PyGMI raster dataset.
- Returns:
neweq – Corrected equation.
- Return type:
str
- mean(eq, localdict)#
Get mean pixel value of all input bands.
- Parameters:
eq (str) – Equation with std command.
localdict (dictionary) – Dictionary of data.
- Returns:
findat – Output array.
- Return type:
numpy array
- std(eq, localdict)#
Get standard deviation pixel value of all input bands.
- Parameters:
eq (str) – Equation with std command.
localdict (dictionary) – Dictionary of data.
- Returns:
findat – Output array.
- Return type:
numpy array
- mosaic(eq, localdict)#
Mosaics data into a single band dataset.
- Parameters:
eq (str) – Equation with mosaic command.
localdict (dictionary) – Dictionary of data.
- Returns:
findat – Output array.
- Return type:
numpy array
- settings(nodialog=False)#
Entry point into item.
- Parameters:
nodialog (bool, optional) – Run settings without a dialog. The default is False.
- Returns:
True if successful, False otherwise.
- Return type:
bool
- saveproj()#
Save project data from class.
- Return type:
None.
- pygmi.raster.equation_editor.hmode(data)#
Use a histogram to generate a fast mode estimate.
- Parameters:
data (list) – list of values to generate the mode from.
- Returns:
mode2 – mode value.
- Return type:
float