Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions defdap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,13 @@ def grain_map_data(self, map_data=None, grain_data=None, bg=np.nan):
grain_data = self.grain_data(map_data)
x0, y0, xmax, ymax = self.extreme_coords

grain_map_data = np.full((ymax - y0 + 1, xmax - x0 + 1), bg,
dtype=type(grain_data[0]))
# To support 3D array (ie RGB)
map_shape = (ymax - y0 + 1, xmax - x0 + 1)
if grain_data.ndim > 1:
map_shape = map_shape + grain_data.shape[1:]

# Create output array with appropriate dtype
grain_map_data = np.full(map_shape, bg, dtype=grain_data.dtype)

for coord, data in zip(self.data.point, grain_data):
grain_map_data[coord[1] - y0, coord[0] - x0] = data
Expand Down
21 changes: 21 additions & 0 deletions defdap/ebsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,28 @@ def calc_grod(self):
misori_axis = (2 * dq[1:4] * np.arccos(dq[0])) / np.sqrt(1 - dq[0]**2)

return misori, misori_axis

def calc_ipf_colour(self, grain_data, direction, bg_colour=None):

grain_colours = Quat.calc_ipf_colours(
grain_data, direction, self.phase.crystal_structure.name
).T

return grain_colours

def calc_euler_colour(self, grain_data, bg_colour=None):

if self.phase.crystal_structure.name == 'cubic':
norm = np.array([2 * np.pi, np.pi / 2, np.pi / 2])
elif self.phase.crystal_structure.name == 'hexagonal':
norm = np.array([np.pi, np.pi, np.pi / 3])
else:
ValueError("Only hexagonal and cubic symGroup supported")

grain_colours = grain_data.T / norm

return grain_colours

def plot_ref_ori(self, direction=np.array([0, 0, 1]), **kwargs):
"""Plot the average grain orientation on an IPF.

Expand Down
4 changes: 2 additions & 2 deletions defdap/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ def calc_rdr(self,
y_list.extend(ymap - self.selected_dic_grain.extreme_coords[1])

# Get u and v values at each coordinate
u = self.selected_dic_map.crop(self.selected_dic_map.data.displacement[0])[ymap, xmap]
v = self.selected_dic_map.crop(self.selected_dic_map.data.displacement[1])[ymap, xmap]
u = self.selected_dic_map.data.displacement[0][ymap, xmap]
v = self.selected_dic_map.data.displacement[1][ymap, xmap]

# Subtract mean u and v value for each row
u_list.extend(u - np.mean(u, axis=1)[:, None])
Expand Down
13 changes: 12 additions & 1 deletion docs/source/papers.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
Papers
========

Here is a list of papers which have used the DefDAP Python library.
Here is a list of journal papers which have used the DefDAP Python library.

2026
------

* `A.D.Smith, D.Lunt, M.Taylor, A.Davis, R.Thomas, F.Martinez, A.Candeias, A.Gholinia, M.Preuss, J.M.Donoghue. A new approach to SEM in-situ thermomechanical experiments through automation. Ultramicroscopy. Vol. 280, Feb 2026, pp. 114244. <https://doi.org/10.1016/j.ultramic.2025.114244>`_

2025
------

* `B.Yavuzyegit, K.Karali, S.Davis, B.Morrison, S.Karabal, K.Balandiz, N.Smith, S.Usov, P.Shashkov, R.Bonithon, G.Blunn. High-resolution DIC analysis of in situ strain and crack propagation in coated AZ31 magnesium alloys under mechanical loading. Journal of Materials Science. Vol. 60, Aug 2025, pp. 14708–14730. <https://doi.org/10.1007/s10853-025-11243-4>`_

* `Z.Yang, R.Thomas, J.Donoghue, A.Smith, M.Preuss, A.Gholinia. In situ and correlative study of dislocation density and deformation mechanisms in Inconel 690. Materials Characterization. Volume 230, Part A, December 2025, 115699. <https://doi.org/10.1016/j.matchar.2025.115699>`_

* `G.Zhou, D.T.Fullwood, R.H.Wagoner, S.R.Niezgoda, T.Russell, D.Lunt. Slip mode analysis in BCC tantalum with HRDIC. Materials Science and Engineering: A. Volume 947, December 2025, 149179. <https://doi.org/10.1016/j.msea.2025.149179>`_

* `B.Yang, X.Xu, D.Lunt, F.Zhang, M.D.Atkinson, Y.Li, J.LLorca, X.Zhou. Grain size dependence of microscopic strain distribution in a high entropy alloy at the onset of plastic deformation. Acta Materialia. Volume 285, Feb 2025, 120682. <https://doi.org/10.1016/j.actamat.2024.120682>`_

* `D.Hu, A.D.Smith, D.Lunt, R.Thomas, M.D.Atkinson, X.Liu, Ö.Koç, J.M.Donoghue, Z.Zhang, J.Quinta da Fonseca, M.Preuss, Tracking the onset of plasticity in a Ni-base superalloy using in-situ High-Resolution Digital Image Correlation. Materialia. Volume 220, Feb 2025, 114654. <https://doi.org/10.1016/j.matchar.2024.114654>`_
Expand Down