You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Impossible to completely remove the phase wrapping when you have toppological defect (dislocations).
Solution : Changing the phase by an offset (and not unwrapping) moves the wrapping region. Simply compute the strain for 3 phase offsets. At each positions, at least 2 strain maps should be equal.
Here's a rough try of a function that might work in cdiutils :
def compute_normal_strain_defects(
displacement: np.ndarray,
q_vector: Union[np.ndarray, tuple, list],
voxel_size: Union[np.ndarray, tuple, list],
gradient_method: str="hybrid",
phase_shift=np.pi/2.,
) -> np.ndarray:
factor = ? # factor that you use to go from phase to displacement.
displacement1 = np.mod(displacement, 2.pifactor)
displacement2 = np.mod(displacement + phase_shift, 2.pifactor)
displacement3 = np.mod(displacement + 2. * phase_shift , 2.pifactor)
It works fine for me. You may get problems for particles with few pixels or with several defects. You could imagine making more than 3 strain maps in that case. But for me it worked fine on 2 different particles.
If you want to test on a particle with a defect, you can use this one :
/data/visitor/ihhc3936/id01/20231010/RAW_DATA/PtYSZ/PtYSZ_0001/PtYSZ_0001.h5
scan 54
The text was updated successfully, but these errors were encountered:
Impossible to completely remove the phase wrapping when you have toppological defect (dislocations).
Solution : Changing the phase by an offset (and not unwrapping) moves the wrapping region. Simply compute the strain for 3 phase offsets. At each positions, at least 2 strain maps should be equal.
Here's a rough try of a function that might work in cdiutils :
def compute_normal_strain_defects(
displacement: np.ndarray,
q_vector: Union[np.ndarray, tuple, list],
voxel_size: Union[np.ndarray, tuple, list],
gradient_method: str="hybrid",
phase_shift=np.pi/2.,
) -> np.ndarray:
factor = ? # factor that you use to go from phase to displacement.
displacement1 = np.mod(displacement, 2.pifactor)
displacement2 = np.mod(displacement + phase_shift, 2.pifactor)
displacement3 = np.mod(displacement + 2. * phase_shift , 2.pifactor)
It works fine for me. You may get problems for particles with few pixels or with several defects. You could imagine making more than 3 strain maps in that case. But for me it worked fine on 2 different particles.
If you want to test on a particle with a defect, you can use this one :
/data/visitor/ihhc3936/id01/20231010/RAW_DATA/PtYSZ/PtYSZ_0001/PtYSZ_0001.h5
scan 54
The text was updated successfully, but these errors were encountered: