pygmi.pfmod.misc#
These are miscellaneous functions for the pfmod routines.
Classes#
Wrapper for a progress bar. It consists of two progress bars. |
|
Perform Merge of two models. |
Functions#
|
Update the lithology list widget. |
|
Routine used to merge two grids. |
Module Contents#
- pygmi.pfmod.misc.update_lith_lw(lmod, lwidget)#
Update the lithology list widget.
- Parameters:
lmod (pygmi.pfmod.datatypes.LithModel) – 3D model.
lwidget (PySide6.QtWidgets.QListWidget) – List widget.
- Return type:
None.
- class pygmi.pfmod.misc.ProgressBar(pbar, pbarmain)#
Wrapper for a progress bar. It consists of two progress bars.
- Parameters:
pbar (pygmi.misc.ProgressBar) – Progress bar.
pbarmain (pygmi.misc.ProgressBar) – Main progress bar.
- incr()#
Increase value by one.
- iter(iterable)#
Iterate routine.
- Parameters:
iterable (collections.abc.Iterable) – Iterable.
- Yields:
object– Object in iterable.- Return type:
collections.abc.Generator[object, None, None]
- incrmain(i=1)#
Increase value by i.
- Parameters:
i (int) – Iteration step. The default is 1.
- maxall()#
Set all progress bars to maximum value.
- resetall(maximum=1, mmax=1)#
Set min and max and resets all bars to 0.
- Parameters:
maximum (int) – Maximum value. The default is 1.
mmax (int) – Maximum value. The default is 1.
- resetsub(maximum=1)#
Set min and max and resets sub bar to 0.
- Parameters:
maximum (int) – Maximum value. The default is 1.
- busysub()#
Busy.
- class pygmi.pfmod.misc.MergeMod3D(parent=None)#
Bases:
pygmi.misc.BasicModulePerform Merge of two models.
- Parameters:
parent – Reference to the parent routine. The default is None.
- setupui()#
Set up UI.
- 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.
- acceptall()#
Accept option.
Updates self.outdata, which is used as input to other modules.
- Returns:
True if successful, False otherwise
- Return type:
bool
- pygmi.pfmod.misc.gmerge(primary, secondary, xrange=None, yrange=None)#
Routine used to merge two grids.
- Parameters:
primary (pygmi.raster.datatypes.Data) – PyGMI raster dataset.
secondary (pygmi.raster.datatypes.Data) – PyGMI raster dataset.
xrange (list[float] | None) – List containing range of minimum and maximum X. The default is None.
yrange (list[float] | None) – List containing range of minimum and maximum Y. The default is None.
- Returns:
PyGMI raster dataset.
- Return type:
Data