pygmi 2.2.7__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygmi-2.2.7/LICENSE.txt +623 -0
- pygmi-2.2.7/MANIFEST.in +7 -0
- pygmi-2.2.7/PKG-INFO +47 -0
- pygmi-2.2.7/README.md +55 -0
- pygmi-2.2.7/README.rst +20 -0
- pygmi-2.2.7/log.txt +242 -0
- pygmi-2.2.7/pygmi/__init__.py +22 -0
- pygmi-2.2.7/pygmi/clust/__init__.py +4 -0
- pygmi-2.2.7/pygmi/clust/crisp_clust.py +708 -0
- pygmi-2.2.7/pygmi/clust/datatypes.py +65 -0
- pygmi-2.2.7/pygmi/clust/fuzzy_clust.py +906 -0
- pygmi-2.2.7/pygmi/clust/graphs.py +421 -0
- pygmi-2.2.7/pygmi/clust/graphtool.py +667 -0
- pygmi-2.2.7/pygmi/clust/menu.py +139 -0
- pygmi-2.2.7/pygmi/clust/var_ratio.py +92 -0
- pygmi-2.2.7/pygmi/clust/xie_beni.py +93 -0
- pygmi-2.2.7/pygmi/helpdocs/linepointer.png +0 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.main.html +31 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.ddisp.html +15 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.iodefs.exportkmz.html +13 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.iodefs.importpicture.html +16 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.layer.html +17 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.mext.html +44 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.misc.rangedcopy.html +16 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.param.html +37 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.prof.html +32 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.pview.html +26 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.cooper.gradients.html +14 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.cooper.tilt.html +14 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.cooper.visibility.html +14 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.datagrid.html +13 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.datamerge.html +11 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.datareproj.html +11 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.rtp.html +14 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.ginterp.html +31 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.igrf.html +20 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.normalisation.html +14 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.smooth.html +22 -0
- pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.tiltdepth.html +20 -0
- pygmi-2.2.7/pygmi/images/Help.png +0 -0
- pygmi-2.2.7/pygmi/images/bringtofront.png +0 -0
- pygmi-2.2.7/pygmi/images/cgs2.emf +0 -0
- pygmi-2.2.7/pygmi/images/delete.png +0 -0
- pygmi-2.2.7/pygmi/images/linepointer.png +0 -0
- pygmi-2.2.7/pygmi/images/logo256.ico +0 -0
- pygmi-2.2.7/pygmi/images/logo256.png +0 -0
- pygmi-2.2.7/pygmi/images/pointer.png +0 -0
- pygmi-2.2.7/pygmi/images/pygmi.png +0 -0
- pygmi-2.2.7/pygmi/images/sendtoback.png +0 -0
- pygmi-2.2.7/pygmi/main.py +1037 -0
- pygmi-2.2.7/pygmi/menu_default.py +327 -0
- pygmi-2.2.7/pygmi/misc.py +147 -0
- pygmi-2.2.7/pygmi/pfmod/__init__.py +6 -0
- pygmi-2.2.7/pygmi/pfmod/cubes.py +1488 -0
- pygmi-2.2.7/pygmi/pfmod/datatypes.py +292 -0
- pygmi-2.2.7/pygmi/pfmod/grvmag3d.py +1265 -0
- pygmi-2.2.7/pygmi/pfmod/iodefs.py +1001 -0
- pygmi-2.2.7/pygmi/pfmod/menu.py +107 -0
- pygmi-2.2.7/pygmi/pfmod/misc.py +301 -0
- pygmi-2.2.7/pygmi/pfmod/pfmod.py +248 -0
- pygmi-2.2.7/pygmi/pfmod/tab_ddisp.py +425 -0
- pygmi-2.2.7/pygmi/pfmod/tab_layer.py +490 -0
- pygmi-2.2.7/pygmi/pfmod/tab_mext.py +544 -0
- pygmi-2.2.7/pygmi/pfmod/tab_param.py +548 -0
- pygmi-2.2.7/pygmi/pfmod/tab_prof.py +946 -0
- pygmi-2.2.7/pygmi/pfmod/tab_pview.py +740 -0
- pygmi-2.2.7/pygmi/raster/IGRF11.COF +1635 -0
- pygmi-2.2.7/pygmi/raster/__init__.py +14 -0
- pygmi-2.2.7/pygmi/raster/cooper.py +718 -0
- pygmi-2.2.7/pygmi/raster/dataprep.py +1640 -0
- pygmi-2.2.7/pygmi/raster/datatypes.py +123 -0
- pygmi-2.2.7/pygmi/raster/equation_editor.py +256 -0
- pygmi-2.2.7/pygmi/raster/ginterp.py +1901 -0
- pygmi-2.2.7/pygmi/raster/graphs.py +531 -0
- pygmi-2.2.7/pygmi/raster/igrf.py +860 -0
- pygmi-2.2.7/pygmi/raster/iodefs.py +813 -0
- pygmi-2.2.7/pygmi/raster/menu.py +307 -0
- pygmi-2.2.7/pygmi/raster/normalisation.py +187 -0
- pygmi-2.2.7/pygmi/raster/show_table.py +245 -0
- pygmi-2.2.7/pygmi/raster/smooth.py +406 -0
- pygmi-2.2.7/pygmi/raster/tiltdepth.py +590 -0
- pygmi-2.2.7/pygmi/seis/__init__.py +0 -0
- pygmi-2.2.7/pygmi/seis/beachball.py +751 -0
- pygmi-2.2.7/pygmi/seis/datatypes.py +605 -0
- pygmi-2.2.7/pygmi/seis/del_rec.py +410 -0
- pygmi-2.2.7/pygmi/seis/iodefs.py +1261 -0
- pygmi-2.2.7/pygmi/seis/menu.py +136 -0
- pygmi-2.2.7/pygmi/seis/scan_imp.py +795 -0
- pygmi-2.2.7/pygmi/test/__init__.py +6 -0
- pygmi-2.2.7/pygmi/test/pfmod.py +212 -0
- pygmi-2.2.7/pygmi/test/tests.py +39 -0
- pygmi-2.2.7/pygmi/vector/__init__.py +7 -0
- pygmi-2.2.7/pygmi/vector/datatypes.py +74 -0
- pygmi-2.2.7/pygmi/vector/graphs.py +443 -0
- pygmi-2.2.7/pygmi/vector/iodefs.py +345 -0
- pygmi-2.2.7/pygmi/vector/menu.py +127 -0
- pygmi-2.2.7/pygmi.egg-info/PKG-INFO +47 -0
- pygmi-2.2.7/pygmi.egg-info/SOURCES.txt +105 -0
- pygmi-2.2.7/pygmi.egg-info/dependency_links.txt +1 -0
- pygmi-2.2.7/pygmi.egg-info/entry_points.txt +3 -0
- pygmi-2.2.7/pygmi.egg-info/not-zip-safe +1 -0
- pygmi-2.2.7/pygmi.egg-info/requires.txt +7 -0
- pygmi-2.2.7/pygmi.egg-info/top_level.txt +1 -0
- pygmi-2.2.7/quickstart.py +35 -0
- pygmi-2.2.7/setup.cfg +8 -0
- pygmi-2.2.7/setup.py +80 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
# Name: menu.py (part of PyGMI)
|
|
3
|
+
#
|
|
4
|
+
# Author: Patrick Cole
|
|
5
|
+
# E-Mail: pcole@geoscience.org.za
|
|
6
|
+
#
|
|
7
|
+
# Copyright: (c) 2013 Council for Geoscience
|
|
8
|
+
# Licence: GPL-3.0
|
|
9
|
+
#
|
|
10
|
+
# This file is part of PyGMI
|
|
11
|
+
#
|
|
12
|
+
# PyGMI is free software: you can redistribute it and/or modify
|
|
13
|
+
# it under the terms of the GNU General Public License as published by
|
|
14
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
15
|
+
# (at your option) any later version.
|
|
16
|
+
#
|
|
17
|
+
# PyGMI is distributed in the hope that it will be useful,
|
|
18
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20
|
+
# GNU General Public License for more details.
|
|
21
|
+
#
|
|
22
|
+
# You should have received a copy of the GNU General Public License
|
|
23
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
24
|
+
# -----------------------------------------------------------------------------
|
|
25
|
+
""" Seis Menu Routines """
|
|
26
|
+
|
|
27
|
+
from PyQt4 import QtGui
|
|
28
|
+
from . import scan_imp
|
|
29
|
+
from . import del_rec
|
|
30
|
+
from . import iodefs
|
|
31
|
+
from . import beachball
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class MenuWidget(object):
|
|
35
|
+
"""
|
|
36
|
+
Widget class to call the main interface
|
|
37
|
+
|
|
38
|
+
This widget class creates the seismology menus to be found on the main
|
|
39
|
+
interface. Normal as well as context menus are defined here.
|
|
40
|
+
|
|
41
|
+
Attributes
|
|
42
|
+
----------
|
|
43
|
+
parent : MainWidget
|
|
44
|
+
Reference to MainWidget class found in main.py
|
|
45
|
+
"""
|
|
46
|
+
def __init__(self, parent):
|
|
47
|
+
|
|
48
|
+
self.parent = parent
|
|
49
|
+
self.parent.add_to_context('Seis')
|
|
50
|
+
context_menu = self.parent.context_menu
|
|
51
|
+
|
|
52
|
+
self.menu = QtGui.QMenu(parent.menubar)
|
|
53
|
+
self.menu.setTitle("Seismology")
|
|
54
|
+
parent.menubar.addAction(self.menu.menuAction())
|
|
55
|
+
|
|
56
|
+
self.action_import_seisan = QtGui.QAction(parent)
|
|
57
|
+
self.action_import_seisan.setText("Import Seisan Data")
|
|
58
|
+
self.menu.addAction(self.action_import_seisan)
|
|
59
|
+
self.action_import_seisan.triggered.connect(self.import_seisan)
|
|
60
|
+
|
|
61
|
+
self.action_import_genfps = QtGui.QAction(parent)
|
|
62
|
+
self.action_import_genfps.setText("Import Generic FPS")
|
|
63
|
+
self.menu.addAction(self.action_import_genfps)
|
|
64
|
+
self.action_import_genfps.triggered.connect(self.import_genfps)
|
|
65
|
+
|
|
66
|
+
self.action_import_scans = QtGui.QAction(parent)
|
|
67
|
+
self.action_import_scans.setText("Import Scanned Bulletins")
|
|
68
|
+
self.menu.addAction(self.action_import_scans)
|
|
69
|
+
self.action_import_scans.triggered.connect(self.import_scans)
|
|
70
|
+
|
|
71
|
+
self.menu.addSeparator()
|
|
72
|
+
|
|
73
|
+
self.action_beachball = QtGui.QAction(self.parent)
|
|
74
|
+
self.action_beachball.setText("Fault Plane Solutions")
|
|
75
|
+
self.menu.addAction(self.action_beachball)
|
|
76
|
+
self.action_beachball.triggered.connect(self.beachball)
|
|
77
|
+
|
|
78
|
+
self.action_delete_recs = QtGui.QAction(parent)
|
|
79
|
+
self.action_delete_recs.setText("Delete Records")
|
|
80
|
+
self.menu.addAction(self.action_delete_recs)
|
|
81
|
+
self.action_delete_recs.triggered.connect(self.delete_recs)
|
|
82
|
+
|
|
83
|
+
self.action_quarry = QtGui.QAction(parent)
|
|
84
|
+
self.action_quarry.setText("Remove Quarry Events")
|
|
85
|
+
self.menu.addAction(self.action_quarry)
|
|
86
|
+
self.action_quarry.triggered.connect(self.quarry)
|
|
87
|
+
|
|
88
|
+
context_menu['Seis'].addSeparator()
|
|
89
|
+
|
|
90
|
+
self.action_export_seisan = QtGui.QAction(self.parent)
|
|
91
|
+
self.action_export_seisan.setText("Export Seisan Data")
|
|
92
|
+
context_menu['Seis'].addAction(self.action_export_seisan)
|
|
93
|
+
self.action_export_seisan.triggered.connect(self.export_seisan)
|
|
94
|
+
|
|
95
|
+
self.action_export_csv = QtGui.QAction(self.parent)
|
|
96
|
+
self.action_export_csv.setText("Export to CSV")
|
|
97
|
+
context_menu['Seis'].addAction(self.action_export_csv)
|
|
98
|
+
self.action_export_csv.triggered.connect(self.export_csv)
|
|
99
|
+
|
|
100
|
+
def export_seisan(self):
|
|
101
|
+
""" Export Seisan data """
|
|
102
|
+
self.parent.launch_context_item(iodefs.ExportSeisan)
|
|
103
|
+
|
|
104
|
+
def export_csv(self):
|
|
105
|
+
""" Export Seisan data to csv"""
|
|
106
|
+
self.parent.launch_context_item(iodefs.ExportCSV)
|
|
107
|
+
|
|
108
|
+
def beachball(self):
|
|
109
|
+
""" Create Beachballs from Fault Plane Solutions """
|
|
110
|
+
fnc = beachball.BeachBall(self.parent)
|
|
111
|
+
self.parent.item_insert("Step", "Fault\nPlane\nSolutions", fnc)
|
|
112
|
+
|
|
113
|
+
def import_scans(self):
|
|
114
|
+
""" Imports scanned records"""
|
|
115
|
+
fnc = scan_imp.SIMP(self.parent)
|
|
116
|
+
self.parent.item_insert("Io", "Import\nScanned\nBulletins", fnc)
|
|
117
|
+
|
|
118
|
+
def import_seisan(self):
|
|
119
|
+
""" Imports Seisan"""
|
|
120
|
+
fnc = iodefs.ImportSeisan(self.parent)
|
|
121
|
+
self.parent.item_insert("Io", "Import\nSeisan\nData", fnc)
|
|
122
|
+
|
|
123
|
+
def import_genfps(self):
|
|
124
|
+
""" Imports Generic Fault Plane Solution"""
|
|
125
|
+
fnc = iodefs.ImportGenericFPS(self.parent)
|
|
126
|
+
self.parent.item_insert("Io", "Import\nGeneric\nFPS", fnc)
|
|
127
|
+
|
|
128
|
+
def delete_recs(self):
|
|
129
|
+
""" Deletes Records """
|
|
130
|
+
fnc = del_rec.DeleteRecord(self.parent)
|
|
131
|
+
self.parent.item_insert("Io", "Delete Records", fnc)
|
|
132
|
+
|
|
133
|
+
def quarry(self):
|
|
134
|
+
""" Removes quarry events """
|
|
135
|
+
fnc = del_rec.Quarry(self.parent)
|
|
136
|
+
self.parent.item_insert("Io", "Remove\nQuarry\nEvents", fnc)
|