pygmi.mt.dataprep#
A set of Data Preparation routines.
Classes#
Edit Metadata. |
|
Matplotlib canvas widget for the actual plot. |
|
Static shift EDI data. |
|
Rotate EDI data. |
|
Matplotlib canvas widget for the actual plot. |
|
Edit EDI Class. |
|
My Slider. |
|
Matplotlib canvas widget for the actual plot. |
|
Occam 1D inversion. |
Functions#
|
Check if something is a number or matches alttext. |
Module Contents#
- class pygmi.mt.dataprep.Metadata(parent=None)#
Bases:
pygmi.misc.ContextModule
Edit Metadata.
This class allows the editing of the metadata for MT data using a GUI.
- banddata#
band data
- Type:
dictionary
- bandid#
dictionary of strings containing band names.
- Type:
dictionary
- setupui()#
Set up UI.
- Return type:
None.
- acceptall()#
Accept option. Updates self.indata.
- Return type:
None.
- rename_id()#
Rename station name.
- Return type:
None.
- update_vals()#
Update the values on the interface.
- Return type:
None.
- run()#
Entry point into the routine, used to run context menu item.
- Returns:
True if successful, False otherwise.
- Return type:
bool.
- class pygmi.mt.dataprep.MyMplCanvas(parent=None, width=8, height=6, dpi=100)#
Bases:
matplotlib.backends.backend_qtagg.FigureCanvasQTAgg
Matplotlib canvas widget for the actual plot.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- update_line(data, ival, itype)#
Update the plot from point data.
- Parameters:
data (EDI data object) – EDI data.
ival (str) – dictionary key.
itype (str) – dictionary key.
- Return type:
None.
- class pygmi.mt.dataprep.StaticShiftEDI(parent=None)#
Bases:
pygmi.misc.BasicModule
Static shift EDI data.
- acceptall()#
Accept option.
Updates self.outdata, which is used as input to other modules.
- Return type:
None.
- apply()#
Apply static shift.
- Return type:
None.
- reset_data()#
Reset data.
- Return type:
None.
- change_band()#
Combo to change band.
- Return type:
None.
- 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.
- class pygmi.mt.dataprep.RotateEDI(parent=None)#
Bases:
pygmi.misc.BasicModule
Rotate EDI data.
- acceptall()#
Accept option.
Updates self.outdata, which is used as input to other modules.
- Return type:
None.
- apply()#
Apply rotation to data.
- Return type:
None.
- reset_data()#
Reset data.
- Return type:
None.
- change_band()#
Combo to change band.
- Return type:
None.
- 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.
- class pygmi.mt.dataprep.MyMplCanvasPick(parent=None)#
Bases:
matplotlib.backends.backend_qtagg.FigureCanvasQTAgg
Matplotlib canvas widget for the actual plot.
This routine will also allow the picking and movement of nodes of data.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- button_press_callback(event)#
Mouse button release callback.
- Parameters:
event (event) – event variable.
- Return type:
None.
- button_release_callback(event)#
Mouse button release callback.
- Parameters:
event (event) – event variable.
- Return type:
None.
- motion_notify_callback(event)#
Move mouse callback.
- Parameters:
event (event) – event variable.
- Return type:
None.
- onpick(event)#
Picker event.
- Parameters:
event (event) – event variable.
- Returns:
True if successful, False otherwise.
- Return type:
bool
- revent(width)#
Resize event.
- Parameters:
width (event) – unused.
- Return type:
None.
- update_line(data, ival=None, itype=None)#
Update the plot from point data.
- Parameters:
data (EDI data object) – EDI data.
ival (str) – dictionary key.
itype (str) – dictionary key.
- Return type:
None.
- class pygmi.mt.dataprep.EditEDI(parent=None)#
Bases:
pygmi.misc.BasicModule
Edit EDI Class.
- acceptall()#
Accept option.
Updates self.outdata, which is used as input to other modules.
- Return type:
None.
- apply()#
Apply edited data.
- Return type:
None.
- reset_data()#
Reset data.
- Return type:
None.
- change_band()#
Combo to choose band.
- Return type:
None.
- 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.
- class pygmi.mt.dataprep.MySlider(parent=None)#
Bases:
PySide6.QtWidgets.QSlider
My Slider.
Custom class which allows clicking on a horizontal slider bar with slider moving to click in a single step.
- mousePressEvent(event)#
Mouse press event.
- Parameters:
event (event) – event variable.
- Return type:
None.
- mouseMoveEvent(event)#
Jump to pointer position while moving.
- Parameters:
event (event) – event variable.
- Return type:
None.
- class pygmi.mt.dataprep.MyMplCanvas2(parent=None)#
Bases:
matplotlib.backends.backend_qtagg.FigureCanvasQTAgg
Matplotlib canvas widget for the actual plot.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- update_line(x, pdata, rdata, *, depths=None, res=None, title=None)#
Update the plot from data.
- Parameters:
x (numpy array) – X coordinates (period).
pdata (numpy array) – Phase data.
rdata (numpy array) – Apparent resistivity data.
depths (numpy array, optional) – Model depths. The default is None.
res (numpy array, optional) – Resistivities. The default is None.
title (str or None, optional) – Title text. The default is None.
- Return type:
None.
- class pygmi.mt.dataprep.Occam1D(parent=None)#
Bases:
pygmi.misc.BasicModule
Occam 1D inversion.
- snum()#
Change solution graph.
- Return type:
None.
- acceptall()#
Accept option.
Updates self.outdata, which is used as input to other modules.
- Return type:
None.
- apply()#
Apply.
- Return type:
None.
- get_occfile(filename='')#
Get Occam executable filename.
- Parameters:
filename (str, optional) – Occam executable filename. The default is ‘’.
- Return type:
None.
- reset_data()#
Reset data.
- Return type:
None.
- change_band()#
Combo to change band.
- Return type:
None.
- 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.mt.dataprep.tonumber(test, alttext=None)#
Check if something is a number or matches alttext.
- Parameters:
test (str) – Text to test.
alttext (str, optional) – Alternate text to test. The default is None.
- Returns:
Returns a lower case version of alttext, or a number.
- Return type:
str or int or float