Check out the Hyperspy Workshop May 13-17, 2024 Online

correlate_vdf_segments#

VDFSegment.correlate_vdf_segments(corr_threshold=0.7, vector_threshold=4, segment_threshold=3)[source]#

Iterates through VDF segments and sums those that are associated with the same segment. Summation will be done for those segments that have a normalised cross correlation above corr_threshold. The vectors of each segment sum will be updated accordingly, so that the vectors of each resulting segment sum are all the vectors of the original individual segments. Each vector is assigned an intensity that is the integrated intensity of the segment it originates from.

Parameters:
  • corr_threshold (float) – Segments will be summed if they have a normalized cross- correlation above corr_threshold. Must be between 0 and 1.

  • vector_threshold (int, optional) – Correlated segments having a number of vectors less than vector_threshold will be discarded.

  • segment_threshold (int, optional) – Correlated segment intensities that lie in a region where a number of segments less than segment_thresholdhave been found, are set to 0, i.e. the resulting segment will only have intensities above 0 where at least a number of segment_threshold segments have intensitives above 0.

Returns:

vdfseg – The VDFSegment instance updated according to the image correlation results.

Return type:

VDFSegment