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.
Files changed (82) hide show
  1. {defdap-1.0.0 → defdap-1.0.1}/CHANGELOG.md +5 -1
  2. {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/PKG-INFO +1 -1
  3. {defdap-1.0.0 → defdap-1.0.1}/PKG-INFO +1 -1
  4. defdap-1.0.1/defdap/_version.py +1 -0
  5. {defdap-1.0.0 → defdap-1.0.1}/defdap/ebsd.py +4 -1
  6. {defdap-1.0.0 → defdap-1.0.1}/defdap/hrdic.py +11 -0
  7. {defdap-1.0.0 → defdap-1.0.1}/defdap/plotting.py +19 -28
  8. defdap-1.0.0/defdap/_version.py +0 -1
  9. {defdap-1.0.0 → defdap-1.0.1}/.gitattributes +0 -0
  10. {defdap-1.0.0 → defdap-1.0.1}/.github/workflows/test.yml +0 -0
  11. {defdap-1.0.0 → defdap-1.0.1}/.gitignore +0 -0
  12. {defdap-1.0.0 → defdap-1.0.1}/.pytest.ini +0 -0
  13. {defdap-1.0.0 → defdap-1.0.1}/.readthedocs.yml +0 -0
  14. {defdap-1.0.0 → defdap-1.0.1}/CODEOWNERS +0 -0
  15. {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/SOURCES.txt +0 -0
  16. {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/dependency_links.txt +0 -0
  17. {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/requires.txt +0 -0
  18. {defdap-1.0.0 → defdap-1.0.1}/DefDAP.egg-info/top_level.txt +0 -0
  19. {defdap-1.0.0 → defdap-1.0.1}/LICENSE +0 -0
  20. {defdap-1.0.0 → defdap-1.0.1}/README.md +0 -0
  21. {defdap-1.0.0 → defdap-1.0.1}/defdap/__init__.py +0 -0
  22. {defdap-1.0.0 → defdap-1.0.1}/defdap/_accelerated.py +0 -0
  23. {defdap-1.0.0 → defdap-1.0.1}/defdap/base.py +0 -0
  24. {defdap-1.0.0 → defdap-1.0.1}/defdap/crystal.py +0 -0
  25. {defdap-1.0.0 → defdap-1.0.1}/defdap/crystal_utils.py +0 -0
  26. {defdap-1.0.0 → defdap-1.0.1}/defdap/experiment.py +0 -0
  27. {defdap-1.0.0 → defdap-1.0.1}/defdap/file_readers.py +0 -0
  28. {defdap-1.0.0 → defdap-1.0.1}/defdap/file_writers.py +0 -0
  29. {defdap-1.0.0 → defdap-1.0.1}/defdap/inspector.py +0 -0
  30. {defdap-1.0.0 → defdap-1.0.1}/defdap/quat.py +0 -0
  31. {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_bcc.txt +0 -0
  32. {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_bcc_110only.txt +0 -0
  33. {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_fcc.txt +0 -0
  34. {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/cubic_fcc_damask.txt +0 -0
  35. {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/hexagonal_noca.txt +0 -0
  36. {defdap-1.0.0 → defdap-1.0.1}/defdap/slip_systems/hexagonal_withca.txt +0 -0
  37. {defdap-1.0.0 → defdap-1.0.1}/defdap/utils.py +0 -0
  38. {defdap-1.0.0 → defdap-1.0.1}/docs/Makefile +0 -0
  39. {defdap-1.0.0 → defdap-1.0.1}/docs/README.md +0 -0
  40. {defdap-1.0.0 → defdap-1.0.1}/docs/make.bat +0 -0
  41. {defdap-1.0.0 → defdap-1.0.1}/docs/source/_static/branches.png +0 -0
  42. {defdap-1.0.0 → defdap-1.0.1}/docs/source/_static/logo.png +0 -0
  43. {defdap-1.0.0 → defdap-1.0.1}/docs/source/_static/sample_ebsd.jpg +0 -0
  44. {defdap-1.0.0 → defdap-1.0.1}/docs/source/_templates/layout.html +0 -0
  45. {defdap-1.0.0 → defdap-1.0.1}/docs/source/conf.py +0 -0
  46. {defdap-1.0.0 → defdap-1.0.1}/docs/source/contributing.rst +0 -0
  47. {defdap-1.0.0 → defdap-1.0.1}/docs/source/index.rst +0 -0
  48. {defdap-1.0.0 → defdap-1.0.1}/docs/source/installation.rst +0 -0
  49. {defdap-1.0.0 → defdap-1.0.1}/docs/source/license.rst +0 -0
  50. {defdap-1.0.0 → defdap-1.0.1}/docs/source/modules.rst +0 -0
  51. {defdap-1.0.0 → defdap-1.0.1}/docs/source/papers.rst +0 -0
  52. {defdap-1.0.0 → defdap-1.0.1}/notebooks/example_notebook.ipynb +0 -0
  53. {defdap-1.0.0 → defdap-1.0.1}/notebooks/experiment.ipynb +0 -0
  54. {defdap-1.0.0 → defdap-1.0.1}/notebooks/twin_boundaries.ipynb +0 -0
  55. {defdap-1.0.0 → defdap-1.0.1}/scripts/GB_update.ipynb +0 -0
  56. {defdap-1.0.0 → defdap-1.0.1}/scripts/nCorrToDavis.m +0 -0
  57. {defdap-1.0.0 → defdap-1.0.1}/setup.cfg +0 -0
  58. {defdap-1.0.0 → defdap-1.0.1}/setup.py +0 -0
  59. {defdap-1.0.0 → defdap-1.0.1}/tests/__init__.py +0 -0
  60. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grain_boundaries_10deg.npz +0 -0
  61. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grain_boundaries_5deg.npz +0 -0
  62. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_5deg_0.npz +0 -0
  63. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_5deg_10.npz +0 -0
  64. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_5deg_100.npz +0 -0
  65. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_grains_warped_5deg_0.npz +0 -0
  66. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/ebsd_proxigram.npz +0 -0
  67. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grain_boundaries_5deg.npz +0 -0
  68. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_floodfill_0.npz +0 -0
  69. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_floodfill_10.npz +0 -0
  70. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_floodfill_100.npz +0 -0
  71. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_warp.npz +0 -0
  72. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_warped-old.npz +0 -0
  73. {defdap-1.0.0 → defdap-1.0.1}/tests/data/expected_output/hrdic_grains_warped.npz +0 -0
  74. {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataDIC.txt +0 -0
  75. {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataEBSD.cpr +0 -0
  76. {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataEBSD.crc +0 -0
  77. {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataEBSD.ctf +0 -0
  78. {defdap-1.0.0 → defdap-1.0.1}/tests/data/testDataPat.bmp +0 -0
  79. {defdap-1.0.0 → defdap-1.0.1}/tests/test_ebsd.py +0 -0
  80. {defdap-1.0.0 → defdap-1.0.1}/tests/test_hrdic.py +0 -0
  81. {defdap-1.0.0 → defdap-1.0.1}/tests/test_io.py +0 -0
  82. {defdap-1.0.0 → defdap-1.0.1}/tests/test_quat.py +0 -0
@@ -4,11 +4,15 @@
4
4
 
5
5
  ### Added
6
6
 
7
-
8
7
  ### Changed
9
8
 
9
+ ### Fixed
10
+
11
+
12
+ ## 1.0.1 (03-12-2025)
10
13
 
11
14
  ### Fixed
15
+ - Plotting slip traces for ebsd grain with colours from phase
12
16
 
13
17
 
14
18
  ## 1.0.0 (05-11-2025)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DefDAP
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: A python library for correlating EBSD and HRDIC data.
5
5
  Author: Michael D. Atkinson, Rhys Thomas, João Quinta da Fonseca
6
6
  Author-email: michael.atkinson@manchester.ac.uk
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DefDAP
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: A python library for correlating EBSD and HRDIC data.
5
5
  Author: Michael D. Atkinson, Rhys Thomas, João Quinta da Fonseca
6
6
  Author-email: michael.atkinson@manchester.ac.uk
@@ -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.ebsd_map.phases[self.phase_id].crystal_structure
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, top_only=False, colours=None, pos=None, **kwargs):
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 to plot.
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:`matplotlib.pyplot.quiver`
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.ebsd_grain.phase.slip_trace_colours
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, top_only, pos=pos, **kwargs)
866
+ self.add_traces(slip_trace_angles, colours, **kwargs)
870
867
 
871
- def add_slip_bands(self, top_only=False, grain_map_data=None, angles=None, pos=None,
872
- thres=None, min_dist=None, **kwargs):
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
- angles : list(float), optional
883
- List of angles to plot, otherwise, use angles
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:`matplotlib.pyplot.quiver`.
884
+ Other arguments are passed to :func:`defdap.plotting.GrainPlot.add_traces`.
893
885
 
894
886
  """
895
-
896
- if angles is None:
897
- slip_band_angles = self.calling_grain.calc_slip_bands(grain_map_data,
898
- thres=thres,
899
- min_dist=min_dist)
900
- else:
901
- slip_band_angles = angles
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(grain_map_data=map_data)
966
+ plot.add_slip_bands(map_data)
976
967
 
977
968
  return plot
978
969
 
@@ -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