Skip to content

Commit

Permalink
paleomag Core dd bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrolexa committed Jan 3, 2024
1 parent 9caaed5 commit 5527229
Showing 6 changed files with 30 additions and 27 deletions.
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changes

### 1.1.5 master
* paleomag Core .dd bug fixed

### 1.1.4 (Dec 13 2023)
* Ellipsoid repr bugfix

22 changes: 11 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
"sphinx_rtd_theme",
]

autodoc_mock_imports = ['sqlalchemy']
autodoc_mock_imports = ["sqlalchemy"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
@@ -61,8 +61,8 @@
master_doc = "index"

# General information about the project.
project = u"APSG"
copyright = u"2023, Ondrej Lexa"
project = "APSG"
copyright = "2023, Ondrej Lexa"

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
@@ -71,7 +71,7 @@
# The short X.Y version.
version = "1.1"
# The full version, including alpha/beta/rc tags.
release = "1.1.4"
release = "1.1.5"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -161,7 +161,7 @@
# static files, so a file named "default.css" will overwrite the builtin
# "default.css".

#html_static_path = ["_static"]
# html_static_path = ["_static"]

# If not '', a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
@@ -225,7 +225,7 @@
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
("index", "apsg.tex", u"APSG Documentation", u"Ondrej Lexa", "manual"),
("index", "apsg.tex", "APSG Documentation", "Ondrej Lexa", "manual"),
]

# The name of an image file (relative to this directory) to place at
@@ -253,7 +253,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "apsg", u"APSG Documentation", [u"Ondrej Lexa"], 1)]
man_pages = [("index", "apsg", "APSG Documentation", ["Ondrej Lexa"], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
@@ -268,8 +268,8 @@
(
"index",
"apsg",
u"APSG Documentation",
u"Ondrej Lexa",
"APSG Documentation",
"Ondrej Lexa",
"apsg",
" structural geology module for Python",
"Earth sciences",
@@ -289,5 +289,5 @@
# texinfo_no_detailmenu = False

# Sort members by type
#autodoc_member_order = "groupwise"
autodoc_member_order = 'bysource'
# autodoc_member_order = "groupwise"
autodoc_member_order = "bysource"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.4
current_version = 1.1.5
commit = False
tag = False

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@

setup(
name="apsg",
version="1.1.4",
version="1.1.5",
description="APSG - The package for structural geologists",
long_description=readme + "\n\n" + history,
long_description_content_type="text/markdown",
2 changes: 1 addition & 1 deletion src/apsg/__init__.py
Original file line number Diff line number Diff line change
@@ -98,6 +98,6 @@
"quicknet",
)

__version__ = "1.1.4"
__version__ = "1.1.5"
__author__ = "Ondrej Lexa"
__email__ = "lexa.ondrej@gmail.com"
26 changes: 13 additions & 13 deletions src/apsg/feature/_paleomag.py
Original file line number Diff line number Diff line change
@@ -156,10 +156,10 @@ def write_pmd(self, filename=None):
infoln = "{:<8} a={:5.1f} b={:5.1f} s={:5.1f} d={:5.1f} v={}m3 {}"
ln0 = infoln.format(
ff,
self.gref.lin.dd[0],
self.gref.lin.dd[1],
self.bedding.dd[0],
self.bedding.dd[1],
self.gref.lin.geo[0],
self.gref.lin.geo[1],
self.bedding.geo[0],
self.bedding.geo[1],
eformat(self.volume, 2),
dt,
)
@@ -295,14 +295,14 @@ def write_rs3(self, filename=None):
latitude = self.latitude if self.latitude is not None else ""
longitude = self.longitude if self.longitude is not None else ""
height = self.height if self.height is not None else ""
sdec, sinc = (round(self.gref.fol.dd[0]), round(self.gref.fol.dd[1]))
sdec, sinc = (round(self.gref.fol.geo[0]), round(self.gref.fol.geo[1]))
bdec, binc = (
(round(self.bedding.dd[0]), round(self.bedding.dd[1]))
(round(self.bedding.geo[0]), round(self.bedding.geo[1]))
if self.bedding is not None
else ("", "")
)
fdec, finc = (
(round(self.foldaxis.dd[0]), round(self.foldaxis.dd[1]))
(round(self.foldaxis.geo[0]), round(self.foldaxis.geo[1]))
if self.foldaxis is not None
else ("", "")
)
@@ -324,7 +324,7 @@ def write_rs3(self, filename=None):
self.a95,
self.comments,
):
ln = f"{id:2} {step:<10} {MAG:>13g} {V.dd[0]:>5.1f} {V.dd[1]:> 5.1f} {geo.dd[0]:>5.1f} {geo.dd[1]:> 5.1f} {tilt.dd[0]:>5.1f} {tilt.dd[1]:> 5.1f} {a95:>5.1f} {comment:10}"
ln = f"{id:2} {step:<10} {MAG:>13g} {V.geo[0]:>5.1f} {V.geo[1]:> 5.1f} {geo.geo[0]:>5.1f} {geo.geo[1]:> 5.1f} {tilt.geo[0]:>5.1f} {tilt.geo[1]:> 5.1f} {a95:>5.1f} {comment:10}"
print(ln, file=res3file, end="\r\n")

@property
@@ -346,10 +346,10 @@ def datatable(self):
V[1],
V[2],
MAG,
geo.dd[0],
geo.dd[1],
tilt.dd[0],
tilt.dd[1],
geo.geo[0],
geo.geo[1],
tilt.geo[0],
tilt.geo[1],
a95,
comment,
)
@@ -399,7 +399,7 @@ def geo(self):
def tilt(self):
"""Returns ``Vector3Set`` of vectors in tilt‐corrected coordinates system"""
return self.geo.rotate(
Lineation(self.bedding.dd[0] - 90, 0), -self.bedding.dd[1]
Lineation(self.bedding.geo[0] - 90, 0), -self.bedding.geo[1]
)

def pca(self, kind="geo", origin=False):

0 comments on commit 5527229

Please sign in to comment.