DefDAP 1.0.0__tar.gz → 1.0.1__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.
- {defdap-1.0.0 → defdap-1.0.1}/CHANGELOG.md +5 -1
- {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/PKG-INFO +1 -1
- {defdap-1.0.0 → defdap-1.0.1}/PKG-INFO +1 -1
- defdap-1.0.1/defdap/_version.py +1 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/ebsd.py +4 -1
- {defdap-1.0.0 → defdap-1.0.1}/defdap/hrdic.py +11 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/plotting.py +19 -28
- defdap-1.0.0/defdap/_version.py +0 -1
- {defdap-1.0.0 → defdap-1.0.1}/.gitattributes +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/.github/workflows/test.yml +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/.gitignore +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/.pytest.ini +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/.readthedocs.yml +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/CODEOWNERS +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/SOURCES.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/dependency_links.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/requires.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/top_level.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/LICENSE +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/README.md +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/__init__.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/_accelerated.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/base.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/crystal.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/crystal_utils.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/experiment.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/file_readers.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/file_writers.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/inspector.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/quat.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_bcc.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_bcc_110only.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_fcc.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_fcc_damask.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/hexagonal_noca.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/hexagonal_withca.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/defdap/utils.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/Makefile +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/README.md +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/make.bat +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/_static/branches.png +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/_static/logo.png +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/_static/sample_ebsd.jpg +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/_templates/layout.html +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/conf.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/contributing.rst +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/index.rst +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/installation.rst +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/license.rst +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/modules.rst +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/docs/source/papers.rst +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/notebooks/example_notebook.ipynb +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/notebooks/experiment.ipynb +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/notebooks/twin_boundaries.ipynb +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/scripts/GB_update.ipynb +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/scripts/nCorrToDavis.m +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/setup.cfg +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/setup.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/__init__.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grain_boundaries_10deg.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grain_boundaries_5deg.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_5deg_0.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_5deg_10.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_5deg_100.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_warped_5deg_0.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_proxigram.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grain_boundaries_5deg.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_floodfill_0.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_floodfill_10.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_floodfill_100.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_warp.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_warped-old.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_warped.npz +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataDIC.txt +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataEBSD.cpr +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataEBSD.crc +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataEBSD.ctf +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataPat.bmp +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/test_ebsd.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/test_hrdic.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/test_io.py +0 -0
- {defdap-1.0.0 → defdap-1.0.1}/tests/test_quat.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.0.1'
|
|
@@ -1190,6 +1190,9 @@ class Grain(base.Grain):
|
|
|
1190
1190
|
self.ref_ori = None # (quat) average ori of grain
|
|
1191
1191
|
self.average_mis_ori = None # average mis_ori of grain
|
|
1192
1192
|
|
|
1193
|
+
self.phase_id = None
|
|
1194
|
+
self.phase = None
|
|
1195
|
+
|
|
1193
1196
|
self.average_schmid_factors = None # list of list Schmid factors (grouped by slip plane)
|
|
1194
1197
|
self.slip_trace_angles = None # list of slip trace angles
|
|
1195
1198
|
self.slip_trace_inclinations = None
|
|
@@ -1362,7 +1365,7 @@ class Grain(base.Grain):
|
|
|
1362
1365
|
All other arguments are passed to :func:`defdap.quat.Quat.plot_unit_cell`.
|
|
1363
1366
|
|
|
1364
1367
|
"""
|
|
1365
|
-
crystal_structure = self.
|
|
1368
|
+
crystal_structure = self.phase.crystal_structure
|
|
1366
1369
|
plot = Quat.plot_unit_cell(self.ref_ori, fig=fig, ax=ax, plot=plot,
|
|
1367
1370
|
crystal_structure=crystal_structure, **kwargs)
|
|
1368
1371
|
|
|
@@ -780,6 +780,17 @@ class Grain(base.Grain):
|
|
|
780
780
|
|
|
781
781
|
"""
|
|
782
782
|
return self.ebsd_grain.ref_ori
|
|
783
|
+
|
|
784
|
+
@property
|
|
785
|
+
def phase(self):
|
|
786
|
+
"""Returns the phase of the linked ebsd grain.
|
|
787
|
+
|
|
788
|
+
Returns
|
|
789
|
+
-------
|
|
790
|
+
defdap.crystal.Phase
|
|
791
|
+
|
|
792
|
+
"""
|
|
793
|
+
return self.ebsd_grain.phase
|
|
783
794
|
|
|
784
795
|
@property
|
|
785
796
|
def slip_traces(self):
|
|
@@ -846,61 +846,52 @@ class GrainPlot(Plot):
|
|
|
846
846
|
)
|
|
847
847
|
self.draw()
|
|
848
848
|
|
|
849
|
-
def add_slip_traces(self,
|
|
849
|
+
def add_slip_traces(self, colours=None, **kwargs):
|
|
850
850
|
"""Add slip traces to plot, based on the calling grain's slip systems.
|
|
851
851
|
|
|
852
852
|
Parameters
|
|
853
853
|
----------
|
|
854
854
|
colours : list
|
|
855
|
-
Colours
|
|
855
|
+
Colours of each trace.
|
|
856
856
|
top_only : bool, optional
|
|
857
857
|
If true, plot only a semicircle instead of a circle.
|
|
858
|
-
pos : tuple
|
|
859
|
-
Position of slip traces.
|
|
860
858
|
kwargs
|
|
861
|
-
Other arguments are passed to :func:`
|
|
859
|
+
Other arguments are passed to :func:`defdap.plotting.GrainPlot.add_traces`
|
|
862
860
|
|
|
863
861
|
"""
|
|
864
|
-
|
|
865
862
|
if colours is None:
|
|
866
|
-
colours = self.calling_grain.
|
|
863
|
+
colours = self.calling_grain.phase.slip_trace_colours
|
|
867
864
|
slip_trace_angles = self.calling_grain.slip_traces
|
|
868
865
|
|
|
869
|
-
self.add_traces(slip_trace_angles, colours,
|
|
866
|
+
self.add_traces(slip_trace_angles, colours, **kwargs)
|
|
870
867
|
|
|
871
|
-
def add_slip_bands(self,
|
|
872
|
-
|
|
868
|
+
def add_slip_bands(self, grain_map_data, colour=None, thres=None,
|
|
869
|
+
min_dist=None, **kwargs):
|
|
873
870
|
"""Add lines representing slip bands detected by Radon transform
|
|
874
871
|
in :func:`~defdap.hrdic.grain.calc_slip_bands`.
|
|
875
872
|
|
|
876
873
|
Parameters
|
|
877
874
|
----------
|
|
878
|
-
top_only : bool, optional
|
|
879
|
-
If true, plot only a semicircle instead of a circle.
|
|
880
875
|
grain_map_data :
|
|
881
876
|
Map data to pass to :func:`~defdap.hrdic.Grain.calc_slip_bands`.
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
detected in :func:`~defdap.hrdic.Grain.calc_slip_bands`.
|
|
885
|
-
pos : tuple
|
|
886
|
-
Position in which to plot slip traces.
|
|
877
|
+
colour : str
|
|
878
|
+
Colour of traces.
|
|
887
879
|
thres : float
|
|
888
880
|
Threshold to use in :func:`~defdap.hrdic.Grain.calc_slip_bands`.
|
|
889
881
|
min_dist :
|
|
890
882
|
Minimum angle between bands in :func:`~defdap.hrdic.Grain.calc_slip_bands`.
|
|
891
883
|
kwargs
|
|
892
|
-
Other arguments are passed to :func:`
|
|
884
|
+
Other arguments are passed to :func:`defdap.plotting.GrainPlot.add_traces`.
|
|
893
885
|
|
|
894
886
|
"""
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
self.add_traces(slip_band_angles, ["black"], top_only, pos=pos, **kwargs)
|
|
887
|
+
if colour is None:
|
|
888
|
+
colour = "black"
|
|
889
|
+
slip_band_angles = self.calling_grain.calc_slip_bands(
|
|
890
|
+
grain_map_data,
|
|
891
|
+
thres=thres,
|
|
892
|
+
min_dist=min_dist
|
|
893
|
+
)
|
|
894
|
+
self.add_traces(slip_band_angles, [colour], **kwargs)
|
|
904
895
|
|
|
905
896
|
@classmethod
|
|
906
897
|
def create(
|
|
@@ -972,7 +963,7 @@ class GrainPlot(Plot):
|
|
|
972
963
|
plot.add_slip_traces()
|
|
973
964
|
|
|
974
965
|
if plot_slip_bands:
|
|
975
|
-
plot.add_slip_bands(
|
|
966
|
+
plot.add_slip_bands(map_data)
|
|
976
967
|
|
|
977
968
|
return plot
|
|
978
969
|
|
defdap-1.0.0/defdap/_version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '1.0.0'
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|