The offset parameter is the negative of the position shown with s.plot(). Note, the approximate centre position must be set using the offset parameter in the signal. Models this averaged signal as a Gaussian and returns array of with the standard deviations of these Gaussians. Radially averages the feature in angleN segments, for each possible centre position. Takes signal s, radial span of feature used to determine the centre position. def get_optimal_centre_position ( s, radial_signal_span, steps = 3, step_size = 1, angleN = 8, show_progressbar = True ): """ Find centre position of a ring by using angle sliced radial average. add_node ( "Angle_slice_processing" ) s_angle. array (), show_progressbar = False ) if crop_radial_signal is not None : s_angle = s_angle. angular_slice_radial_average ( angleN = angleN, centre_x = np. navigation_dimension != 0 : raise ValueError ( "centre_comparison only works for pixelatedSTEM " "signals with 0 navigation dimensions" ) s_list = centre_list = get_centre_position_list ( s, steps, step_size ) for centre_x, centre_y in centre_list : s_angle = s. Parameters - s : HyperSpy 2D signal steps : int step_size : int crop_radial_signal : tuple, optional angleN : int, default 8 """ if s. Currently only works with signals with 0 navigation dimensions. Returns a list of image stacks, one image stack for each centre position, and the image stack consists of radially averaged segments of an image. Useful for finding on optimal centre position if one has some round feature. ![]() ![]() Import math import numpy as np import numpy.linalg as la from tqdm import tqdm from ponents1d import Polynomial, Gaussian from hyperspy.signals import Signal2D from import point, line_segment from import isiterable import pixstem.pixelated_stem_tools as pst def _centre_comparison ( s, steps, step_size, crop_radial_signal = None, angleN = 8 ): """ Compare how the centre position affects the radial average.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |