apsg 1.3.6__tar.gz → 1.3.8__tar.gz
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.
- {apsg-1.3.6/src/apsg.egg-info → apsg-1.3.8}/PKG-INFO +3 -26
- {apsg-1.3.6 → apsg-1.3.8}/README.md +1 -1
- {apsg-1.3.6 → apsg-1.3.8}/pyproject.toml +2 -2
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/__init__.py +1 -1
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/database/__init__.py +2 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/database/_alchemy.py +166 -24
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/feature/_container.py +30 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/feature/_geodata.py +2 -2
- {apsg-1.3.6 → apsg-1.3.8/src/apsg.egg-info}/PKG-INFO +3 -26
- {apsg-1.3.6 → apsg-1.3.8}/LICENSE +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/setup.cfg +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/config.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/database/_sdbread.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/decorator/__init__.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/decorator/_decorator.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/feature/__init__.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/feature/_paleomag.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/feature/_statistics.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/feature/_tensor2.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/feature/_tensor3.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/helpers/__init__.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/helpers/_helper.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/helpers/_math.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/helpers/_notation.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/math/__init__.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/math/_matrix.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/math/_vector.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/pandas/__init__.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/pandas/_pandas_api.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/__init__.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/_fabricplot.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/_paleomagplots.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/_plot_artists.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/_projection.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/_roseplot.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/_stereogrid.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/plotting/_stereonet.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg/shell.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg.egg-info/SOURCES.txt +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg.egg-info/dependency_links.txt +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg.egg-info/entry_points.txt +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg.egg-info/requires.txt +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/src/apsg.egg-info/top_level.txt +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/tests/test_apsg.py +0 -0
- {apsg-1.3.6 → apsg-1.3.8}/tests/test_tensors.py +0 -0
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apsg
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.8
|
|
4
4
|
Summary: APSG - The package for structural geologists
|
|
5
5
|
Author-email: Ondrej Lexa <lexa.ondrej@gmail.com>
|
|
6
6
|
Maintainer-email: Ondrej Lexa <lexa.ondrej@gmail.com>
|
|
7
|
-
License: MIT
|
|
8
|
-
|
|
9
|
-
APSG - The package for structural geologists.
|
|
10
|
-
Copyright (c) 2015-2024, Ondrej Lexa
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
in the Software without restriction, including without limitation the rights
|
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
SOFTWARE.
|
|
29
|
-
|
|
7
|
+
License-Expression: MIT
|
|
30
8
|
Project-URL: Homepage, https://github.com/ondrolexa/apsg
|
|
31
9
|
Project-URL: Documentation, https://apsg.readthedocs.io
|
|
32
10
|
Project-URL: Repository, https://github.com/ondrolexa/apsg.git
|
|
@@ -35,7 +13,6 @@ Project-URL: Changelog, https://github.com/ondrolexa/apsg/blob/master/CHANGELOG.
|
|
|
35
13
|
Keywords: structural geology,stereonet,orientation data
|
|
36
14
|
Classifier: Development Status :: 4 - Beta
|
|
37
15
|
Classifier: Intended Audience :: Science/Research
|
|
38
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
39
16
|
Classifier: Operating System :: OS Independent
|
|
40
17
|
Classifier: Programming Language :: Python :: 3
|
|
41
18
|
Requires-Python: >=3.10
|
|
@@ -85,7 +62,7 @@ APSG is the package for structural geologists. It defines several new python cla
|
|
|
85
62
|
|
|
86
63
|
## :hammer_and_wrench: Requirements
|
|
87
64
|
|
|
88
|
-
You need Python 3.
|
|
65
|
+
You need Python 3.10 or later to run APSG. The package requires [NumPy](https://numpy.org/) and [SciPy](https://www.scipy.org/),
|
|
89
66
|
[Matplotlib](https://matplotlib.org/), [SciPy](https://scipy.org/), [SQLAlchemy](https://www.sqlalchemy.org/)
|
|
90
67
|
and [pandas](https://pandas.pydata.org/).
|
|
91
68
|
|
|
@@ -20,7 +20,7 @@ APSG is the package for structural geologists. It defines several new python cla
|
|
|
20
20
|
|
|
21
21
|
## :hammer_and_wrench: Requirements
|
|
22
22
|
|
|
23
|
-
You need Python 3.
|
|
23
|
+
You need Python 3.10 or later to run APSG. The package requires [NumPy](https://numpy.org/) and [SciPy](https://www.scipy.org/),
|
|
24
24
|
[Matplotlib](https://matplotlib.org/), [SciPy](https://scipy.org/), [SQLAlchemy](https://www.sqlalchemy.org/)
|
|
25
25
|
and [pandas](https://pandas.pydata.org/).
|
|
26
26
|
|
|
@@ -4,14 +4,14 @@ dynamic = ["version"]
|
|
|
4
4
|
description = "APSG - The package for structural geologists"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
|
-
license =
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
8
9
|
keywords = ["structural geology", "stereonet", "orientation data"]
|
|
9
10
|
authors = [{ name = "Ondrej Lexa", email = "lexa.ondrej@gmail.com" }]
|
|
10
11
|
maintainers = [{ name = "Ondrej Lexa", email = "lexa.ondrej@gmail.com" }]
|
|
11
12
|
classifiers = [
|
|
12
13
|
"Development Status :: 4 - Beta",
|
|
13
14
|
"Intended Audience :: Science/Research",
|
|
14
|
-
"License :: OSI Approved :: MIT License",
|
|
15
15
|
"Operating System :: OS Independent",
|
|
16
16
|
"Programming Language :: Python :: 3",
|
|
17
17
|
]
|
|
@@ -7,12 +7,13 @@ SQLAlchemy API to access PySDB database
|
|
|
7
7
|
import os
|
|
8
8
|
from datetime import datetime
|
|
9
9
|
import contextlib
|
|
10
|
+
import warnings
|
|
10
11
|
|
|
11
|
-
from apsg.feature._geodata import Lineation, Foliation, Pair
|
|
12
|
-
from apsg.feature._container import LineationSet, FoliationSet
|
|
12
|
+
from apsg.feature._geodata import Lineation, Foliation, Pair, Fault
|
|
13
|
+
from apsg.feature._container import LineationSet, FoliationSet, PairSet, FaultSet
|
|
13
14
|
|
|
14
15
|
from sqlalchemy import create_engine, event
|
|
15
|
-
from sqlalchemy.orm import sessionmaker
|
|
16
|
+
from sqlalchemy.orm import sessionmaker, aliased
|
|
16
17
|
from sqlalchemy import (
|
|
17
18
|
Column,
|
|
18
19
|
Float,
|
|
@@ -607,34 +608,175 @@ class SDBSession:
|
|
|
607
608
|
else:
|
|
608
609
|
return tags
|
|
609
610
|
|
|
610
|
-
def getset(self, structype,
|
|
611
|
+
def getset(self, structype, site={}, unit={}, tag={}):
|
|
611
612
|
"""Method to retrieve data from SDB database to ``FeatureSet``.
|
|
612
613
|
|
|
613
614
|
Args:
|
|
614
|
-
structype (str
|
|
615
|
-
|
|
616
|
-
|
|
615
|
+
structype (str | Structype): structure to retrieve
|
|
616
|
+
site (dict): keyword args passed to filter site
|
|
617
|
+
unit (dict): keyword args passed to filter unit
|
|
618
|
+
tag (dict): keyword args passed to filter tag
|
|
617
619
|
|
|
618
620
|
"""
|
|
619
621
|
if isinstance(structype, str):
|
|
620
|
-
|
|
621
|
-
self.session.query(Structype).filter_by(structure=structype).
|
|
622
|
+
dbstruct = (
|
|
623
|
+
self.session.query(Structype).filter_by(structure=structype).first()
|
|
622
624
|
)
|
|
623
|
-
assert
|
|
624
|
-
structype =
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
625
|
+
assert dbstruct is not None, f"There is no structure {structype} in db."
|
|
626
|
+
structype = dbstruct
|
|
627
|
+
if isinstance(structype, Structype):
|
|
628
|
+
data = (
|
|
629
|
+
self.session.query(Structdata)
|
|
630
|
+
.filter_by(structype=structype)
|
|
631
|
+
.join(Structdata.site)
|
|
632
|
+
.filter_by(**site)
|
|
633
|
+
.join(Site.unit)
|
|
634
|
+
.filter_by(**unit)
|
|
635
|
+
.join(Structdata.tags)
|
|
636
|
+
.filter_by(**tag)
|
|
637
|
+
.all()
|
|
634
638
|
)
|
|
639
|
+
if structype.planar == 1:
|
|
640
|
+
res = FoliationSet(
|
|
641
|
+
[Foliation(v.azimuth, v.inclination) for v in data],
|
|
642
|
+
name=structype.structure,
|
|
643
|
+
)
|
|
644
|
+
else:
|
|
645
|
+
res = LineationSet(
|
|
646
|
+
[Lineation(v.azimuth, v.inclination) for v in data],
|
|
647
|
+
name=structype.structure,
|
|
648
|
+
)
|
|
649
|
+
return res
|
|
635
650
|
else:
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
651
|
+
raise ValueError("structype argument must be string or Structype")
|
|
652
|
+
|
|
653
|
+
def getpairs(self, ptype, ltype, site={}, unit={}, ptag={}, ltag={}):
|
|
654
|
+
"""Method to retrieve data from SDB database to ``PairSet``.
|
|
655
|
+
|
|
656
|
+
Args:
|
|
657
|
+
ptype (str | Structype): planar structure to retrieve
|
|
658
|
+
ltype (str | Structype): linear structure to retrieve
|
|
659
|
+
|
|
660
|
+
Keyword Args:
|
|
661
|
+
site (dict): keyword args passed to filter site
|
|
662
|
+
unit (dict): keyword args passed to filter unit
|
|
663
|
+
ptag (dict): keyword args passed to filter planar tag
|
|
664
|
+
ltag (dict): keyword args passed to filter linear tag
|
|
665
|
+
|
|
666
|
+
"""
|
|
667
|
+
if isinstance(ptype, str):
|
|
668
|
+
dbstruct = self.session.query(Structype).filter_by(structure=ptype).first()
|
|
669
|
+
assert dbstruct is not None, f"There is no structure {ptype} in db."
|
|
670
|
+
ptype = dbstruct
|
|
671
|
+
if isinstance(ltype, str):
|
|
672
|
+
dbstruct = self.session.query(Structype).filter_by(structure=ltype).first()
|
|
673
|
+
assert dbstruct is not None, f"There is no structure {ltype} in db."
|
|
674
|
+
ltype = dbstruct
|
|
675
|
+
if isinstance(ptype, Structype) and isinstance(ltype, Structype):
|
|
676
|
+
AttachPlanar = aliased(Structdata)
|
|
677
|
+
AttachLinear = aliased(Structdata)
|
|
678
|
+
TagPlanar = aliased(Tag)
|
|
679
|
+
TagLinear = aliased(Tag)
|
|
680
|
+
data = (
|
|
681
|
+
self.session.query(Attached)
|
|
682
|
+
.join(AttachPlanar, Attached.planar)
|
|
683
|
+
.filter_by(structype=ptype)
|
|
684
|
+
.join(AttachLinear, Attached.linear)
|
|
685
|
+
.filter_by(structype=ltype)
|
|
686
|
+
.join(Structdata.site)
|
|
687
|
+
.filter_by(**site)
|
|
688
|
+
.join(Site.unit)
|
|
689
|
+
.filter_by(**unit)
|
|
690
|
+
.outerjoin(TagPlanar, AttachPlanar.tags)
|
|
691
|
+
.filter_by(**ptag)
|
|
692
|
+
.outerjoin(TagLinear, AttachLinear.tags)
|
|
693
|
+
.filter_by(**ltag)
|
|
694
|
+
.all()
|
|
639
695
|
)
|
|
640
|
-
|
|
696
|
+
pairs = []
|
|
697
|
+
warnings.filterwarnings("error")
|
|
698
|
+
for v in data:
|
|
699
|
+
try:
|
|
700
|
+
pair = Pair(
|
|
701
|
+
v.planar.azimuth,
|
|
702
|
+
v.planar.inclination,
|
|
703
|
+
v.linear.azimuth,
|
|
704
|
+
v.linear.inclination,
|
|
705
|
+
)
|
|
706
|
+
pairs.append(pair)
|
|
707
|
+
except UserWarning:
|
|
708
|
+
print(
|
|
709
|
+
f"Too big misfit for pair {v.planar}-{v.linear} on {v.planar.site}"
|
|
710
|
+
)
|
|
711
|
+
warnings.resetwarnings()
|
|
712
|
+
res = PairSet(pairs, name=f"{ptype.structure}-{ltype.structure}")
|
|
713
|
+
return res
|
|
714
|
+
else:
|
|
715
|
+
raise ValueError("structype argument must be string or Structype")
|
|
716
|
+
|
|
717
|
+
def getfaults(self, ptype, ltype, sense, site={}, unit={}, ptag={}, ltag={}):
|
|
718
|
+
"""Method to retrieve data from SDB database to ``FaultSet``.
|
|
719
|
+
|
|
720
|
+
Args:
|
|
721
|
+
ptype (str | Structype): planar structure to retrieve
|
|
722
|
+
ltype (str | Structype): linear structure to retrieve
|
|
723
|
+
sense (float or str): sense of movement +/-1 hanging-wall down/up. When str,
|
|
724
|
+
must be one of 's', 'd', 'n', 'r'.
|
|
725
|
+
|
|
726
|
+
Keyword Args:
|
|
727
|
+
site (dict): keyword args passed to filter site
|
|
728
|
+
unit (dict): keyword args passed to filter unit
|
|
729
|
+
ptag (dict): keyword args passed to filter planar tag
|
|
730
|
+
ltag (dict): keyword args passed to filter linear tag
|
|
731
|
+
|
|
732
|
+
"""
|
|
733
|
+
if isinstance(ptype, str):
|
|
734
|
+
dbstruct = self.session.query(Structype).filter_by(structure=ptype).first()
|
|
735
|
+
assert dbstruct is not None, f"There is no structure {ptype} in db."
|
|
736
|
+
ptype = dbstruct
|
|
737
|
+
if isinstance(ltype, str):
|
|
738
|
+
dbstruct = self.session.query(Structype).filter_by(structure=ltype).first()
|
|
739
|
+
assert dbstruct is not None, f"There is no structure {ltype} in db."
|
|
740
|
+
ltype = dbstruct
|
|
741
|
+
if isinstance(ptype, Structype) and isinstance(ltype, Structype):
|
|
742
|
+
AttachPlanar = aliased(Structdata)
|
|
743
|
+
AttachLinear = aliased(Structdata)
|
|
744
|
+
TagPlanar = aliased(Tag)
|
|
745
|
+
TagLinear = aliased(Tag)
|
|
746
|
+
data = (
|
|
747
|
+
self.session.query(Attached)
|
|
748
|
+
.join(AttachPlanar, Attached.planar)
|
|
749
|
+
.filter_by(structype=ptype)
|
|
750
|
+
.join(AttachLinear, Attached.linear)
|
|
751
|
+
.filter_by(structype=ltype)
|
|
752
|
+
.join(Structdata.site)
|
|
753
|
+
.filter_by(**site)
|
|
754
|
+
.join(Site.unit)
|
|
755
|
+
.filter_by(**unit)
|
|
756
|
+
.outerjoin(TagPlanar, AttachPlanar.tags)
|
|
757
|
+
.filter_by(**ptag)
|
|
758
|
+
.outerjoin(TagLinear, AttachLinear.tags)
|
|
759
|
+
.filter_by(**ltag)
|
|
760
|
+
.all()
|
|
761
|
+
)
|
|
762
|
+
faults = []
|
|
763
|
+
warnings.filterwarnings("error")
|
|
764
|
+
for v in data:
|
|
765
|
+
try:
|
|
766
|
+
fault = Fault(
|
|
767
|
+
v.planar.azimuth,
|
|
768
|
+
v.planar.inclination,
|
|
769
|
+
v.linear.azimuth,
|
|
770
|
+
v.linear.inclination,
|
|
771
|
+
sense,
|
|
772
|
+
)
|
|
773
|
+
faults.append(fault)
|
|
774
|
+
except UserWarning:
|
|
775
|
+
print(
|
|
776
|
+
f"Too big misfit for pair {v.planar}-{v.linear} on {v.planar.site}"
|
|
777
|
+
)
|
|
778
|
+
warnings.resetwarnings()
|
|
779
|
+
res = FaultSet(faults, name=f"{ptype.structure}-{ltype.structure}")
|
|
780
|
+
return res
|
|
781
|
+
else:
|
|
782
|
+
raise ValueError("structype argument must be string or Structype")
|
|
@@ -1384,6 +1384,9 @@ class EllipseSet(FeatureSet):
|
|
|
1384
1384
|
|
|
1385
1385
|
__feature_class__ = Ellipse
|
|
1386
1386
|
|
|
1387
|
+
def __repr__(self):
|
|
1388
|
+
return f"E2({len(self)}) {self.name}"
|
|
1389
|
+
|
|
1387
1390
|
@property
|
|
1388
1391
|
def S1(self) -> np.ndarray:
|
|
1389
1392
|
"""
|
|
@@ -1433,6 +1436,15 @@ class EllipseSet(FeatureSet):
|
|
|
1433
1436
|
"""
|
|
1434
1437
|
return np.array([e.e12 for e in self])
|
|
1435
1438
|
|
|
1439
|
+
def transform(self, F):
|
|
1440
|
+
"""Return transformation of all features ``EllipseSet`` by matrix 'F'.
|
|
1441
|
+
|
|
1442
|
+
Args:
|
|
1443
|
+
F: Transformation matrix. Array-like value e.g. ``DeformationGradient3``
|
|
1444
|
+
|
|
1445
|
+
"""
|
|
1446
|
+
return type(self)([e.transform(F) for e in self], name=self.name)
|
|
1447
|
+
|
|
1436
1448
|
|
|
1437
1449
|
class OrientationTensor2Set(EllipseSet):
|
|
1438
1450
|
"""
|
|
@@ -1441,6 +1453,9 @@ class OrientationTensor2Set(EllipseSet):
|
|
|
1441
1453
|
|
|
1442
1454
|
__feature_class__ = OrientationTensor2
|
|
1443
1455
|
|
|
1456
|
+
def __repr__(self):
|
|
1457
|
+
return f"M2({len(self)}) {self.name}"
|
|
1458
|
+
|
|
1444
1459
|
|
|
1445
1460
|
class EllipsoidSet(FeatureSet):
|
|
1446
1461
|
"""
|
|
@@ -1449,6 +1464,9 @@ class EllipsoidSet(FeatureSet):
|
|
|
1449
1464
|
|
|
1450
1465
|
__feature_class__ = Ellipsoid
|
|
1451
1466
|
|
|
1467
|
+
def __repr__(self):
|
|
1468
|
+
return f"E({len(self)}) {self.name}"
|
|
1469
|
+
|
|
1452
1470
|
@property
|
|
1453
1471
|
def strength(self) -> np.ndarray:
|
|
1454
1472
|
"""
|
|
@@ -1675,6 +1693,15 @@ class EllipsoidSet(FeatureSet):
|
|
|
1675
1693
|
"""
|
|
1676
1694
|
return np.array([e.MAD for e in self])
|
|
1677
1695
|
|
|
1696
|
+
def transform(self, F):
|
|
1697
|
+
"""Return transformation of all features ``EllipsoidSet`` by matrix 'F'.
|
|
1698
|
+
|
|
1699
|
+
Args:
|
|
1700
|
+
F: Transformation matrix. Array-like value e.g. ``DeformationGradient3``
|
|
1701
|
+
|
|
1702
|
+
"""
|
|
1703
|
+
return type(self)([e.transform(F) for e in self], name=self.name)
|
|
1704
|
+
|
|
1678
1705
|
|
|
1679
1706
|
class OrientationTensor3Set(EllipsoidSet):
|
|
1680
1707
|
"""
|
|
@@ -1683,6 +1710,9 @@ class OrientationTensor3Set(EllipsoidSet):
|
|
|
1683
1710
|
|
|
1684
1711
|
__feature_class__ = OrientationTensor3
|
|
1685
1712
|
|
|
1713
|
+
def __repr__(self):
|
|
1714
|
+
return f"M({len(self)}) {self.name}"
|
|
1715
|
+
|
|
1686
1716
|
|
|
1687
1717
|
class ClusterSet(object):
|
|
1688
1718
|
"""
|
|
@@ -412,8 +412,8 @@ class Fault(Pair):
|
|
|
412
412
|
finc (float): dip of planar feature in degrees
|
|
413
413
|
lazi (float): plunge direction of linear feature in degrees
|
|
414
414
|
linc (float): plunge of linear feature in degrees
|
|
415
|
-
sense (float or str): sense of movement
|
|
416
|
-
|
|
415
|
+
sense (float or str): sense of movement +/-1 hanging-wall down/up. When str,
|
|
416
|
+
must be one of 's', 'd', 'n', 'r'.
|
|
417
417
|
|
|
418
418
|
|
|
419
419
|
Attributes:
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apsg
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.8
|
|
4
4
|
Summary: APSG - The package for structural geologists
|
|
5
5
|
Author-email: Ondrej Lexa <lexa.ondrej@gmail.com>
|
|
6
6
|
Maintainer-email: Ondrej Lexa <lexa.ondrej@gmail.com>
|
|
7
|
-
License: MIT
|
|
8
|
-
|
|
9
|
-
APSG - The package for structural geologists.
|
|
10
|
-
Copyright (c) 2015-2024, Ondrej Lexa
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
in the Software without restriction, including without limitation the rights
|
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
SOFTWARE.
|
|
29
|
-
|
|
7
|
+
License-Expression: MIT
|
|
30
8
|
Project-URL: Homepage, https://github.com/ondrolexa/apsg
|
|
31
9
|
Project-URL: Documentation, https://apsg.readthedocs.io
|
|
32
10
|
Project-URL: Repository, https://github.com/ondrolexa/apsg.git
|
|
@@ -35,7 +13,6 @@ Project-URL: Changelog, https://github.com/ondrolexa/apsg/blob/master/CHANGELOG.
|
|
|
35
13
|
Keywords: structural geology,stereonet,orientation data
|
|
36
14
|
Classifier: Development Status :: 4 - Beta
|
|
37
15
|
Classifier: Intended Audience :: Science/Research
|
|
38
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
39
16
|
Classifier: Operating System :: OS Independent
|
|
40
17
|
Classifier: Programming Language :: Python :: 3
|
|
41
18
|
Requires-Python: >=3.10
|
|
@@ -85,7 +62,7 @@ APSG is the package for structural geologists. It defines several new python cla
|
|
|
85
62
|
|
|
86
63
|
## :hammer_and_wrench: Requirements
|
|
87
64
|
|
|
88
|
-
You need Python 3.
|
|
65
|
+
You need Python 3.10 or later to run APSG. The package requires [NumPy](https://numpy.org/) and [SciPy](https://www.scipy.org/),
|
|
89
66
|
[Matplotlib](https://matplotlib.org/), [SciPy](https://scipy.org/), [SQLAlchemy](https://www.sqlalchemy.org/)
|
|
90
67
|
and [pandas](https://pandas.pydata.org/).
|
|
91
68
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|