Skip to content

Commit

Permalink
Fixed apsg-related and line-normal plane bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroalberti committed May 2, 2020
1 parent 5b10f2a commit 76d19ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions StereoplotWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from .apsg import StereoNet, Lin as aLin, Fol as aFol, Fault as aFault

from .auxiliary_windows import *
from .pygsf.orientations.orientations import Plane as GPlane, Axis as GAxis
from .pygsf.orientations.orientations import Plane as GPlane, Axis as GAxis, Azim, Plunge
from .qgis_utils.qgs import pt_geoms_attrs
from .mpl_utils.save_figure import FigureExportDlg
from .fault_utils.utils import rake_to_apsg_movsense, movsense_to_apsg_movsense
Expand Down Expand Up @@ -610,7 +610,7 @@ def get_fault_slikenline_data(struct_vals):
color=marker_color,
alpha=marker_transp)
elif plot_setts["tPlotAxesFormat"] == "perpendicular planes":
plane = GAxis(*line_rec).normal_gplane.dda
plane = GAxis(Azim(line_rec[0]), Plunge(line_rec[1])).asDirect().normPlane().dda
p = aFol(*plane)
self.stereonet.plane(p,
linestyle=line_style,
Expand Down
2 changes: 1 addition & 1 deletion about_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setup_gui(self):
dialog_layout = QVBoxLayout()

htmlText = """
<h3>geocouche - release 2.0.1</h3>
<h3>geocouche - release 2.0.2</h3>
Created by M. Alberti (alberti.m65@gmail.com).
<br /><br /><a href="https://github.com/mauroalberti/geocouche">https://github.com/mauroalberti/geocouche</a>
<br /><br />Stereonet plotting and processing of geological structures.
Expand Down
3 changes: 2 additions & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name=geocouche
description=Processes geological meso-structures
about=geocouche is a GGIS plugin for processing the orientations of geological structures, based on the module apsg by Ondrej Lexa. Currently, it can: a) calculate the angles between planes stored in a layer and a reference plane, and b) create stereonets from plane/pole data stored in a point layer or directly as texts.
category=Geology
version=2.0.1
version=2.0.2
experimental=False
qgisMinimumVersion=3.0
author=Martin Laloux, Mauro Alberti
Expand All @@ -14,6 +14,7 @@ icon=./icons/stereoplot.png

; start of optional metadata
changelog=
2.0.2 : - apsg-related and line-normal plane plot bugfixes
2.0.1 : - help and about sections modified
2.0.0 : - porting to QGIS 3 and integration of pygsf and other minor modules
1.1.0 : - integration of module "gsf" (vers. 0.1.0) and related restructuration of "geosurf" in independent modules
Expand Down
7 changes: 5 additions & 2 deletions pygsf/orientations/orientations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ class Azim(object):
Azim class
"""

def __init__(self, val: [int, float], unit: str='d'):
def __init__(self,
val: [int, float],
unit: str = 'd'
):
"""
Creates an azimuth instance.
Expand All @@ -38,7 +41,7 @@ def __init__(self, val: [int, float], unit: str='d'):

# unit check
if unit not in ("d", "r"):
raise OrienInputException("Unit input must be 'd' or 'r'")
raise OrienInputException(f"Unit input must be 'd' or 'r', got {type(unit)} with value {unit}")

if not (isinstance(val, (int, float))):
raise OrienInputException("Input azimuth value must be int/float")
Expand Down

0 comments on commit 76d19ca

Please sign in to comment.