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

Diffraction2D#

class pyxem.signals.Diffraction2D(*args, **kwargs)[source]#

Bases: CommonDiffraction, Signal2D

Signal class for two-dimensional diffraction data in Cartesian coordinates.

Parameters:

Attributes

Diffraction2D.ai

Methods

Diffraction2D.add_ellipse_array_as_markers(...)

Add a ellipse parameters array to a signal as HyperSpy markers.

Diffraction2D.add_peak_array_as_markers(...)

[Deprecated] Add a peak array to the signal as HyperSpy markers.

Diffraction2D.angular_mask(angle0, angle1[, ...])

Get a bool array with True values between angle0 and angle1.

Diffraction2D.angular_slice_radial_average([...])

[Deprecated] Do radial average of different angular slices.

Diffraction2D.apply_affine_transformation(D)

Correct geometric distortion by applying an affine transformation.

Diffraction2D.apply_gain_normalisation(...)

Apply gain normalization to experimentally acquired electron diffraction patterns.

Diffraction2D.center_direct_beam([method, ...])

Estimate the direct beam position in each experimentally acquired electron diffraction pattern and translate it to the center of the image square.

Diffraction2D.center_of_mass([threshold, mask])

Get the centre of the STEM diffraction pattern using center of mass.

Diffraction2D.correct_bad_pixels(...)

Correct bad (dead/hot) pixels by replacing their values with the mean value of neighbors.

Diffraction2D.filter(func[, inplace])

Filters the entire dataset given some function applied to the data.

Diffraction2D.find_dead_pixels([...])

Find dead pixels in the diffraction images.

Diffraction2D.find_hot_pixels([...])

Find hot pixels in the diffraction images.

Diffraction2D.flip_diffraction_x()

Flip the dataset along the diffraction x-axis.

Diffraction2D.flip_diffraction_y()

Flip the dataset along the diffraction y-axis.

Diffraction2D.get_azimuthal_integral1d(npt)

Creates a polar reprojection using pyFAI's azimuthal integrate 2d.

Diffraction2D.get_azimuthal_integral2d(npt)

Creates a polar reprojection using pyFAI's azimuthal integrate 2d.

Diffraction2D.get_diffraction_vectors([...])

Find vectors from the diffraction pattern.

Diffraction2D.get_direct_beam_mask(radius)

Generate a signal mask for the direct beam.

Diffraction2D.get_direct_beam_position(method)

Estimate the direct beam position in each experimentally acquired electron diffraction pattern.

Diffraction2D.get_medfilt1d([npt_rad, ...])

Calculate the radial integrated profile curve as I = f(chi)

Diffraction2D.get_radial_integral(npt, npt_rad)

Calculate the radial integrated profile curve as I = f(chi)

Diffraction2D.get_variance(npt[, method, ...])

Calculates the variance using one of the methods described in [1]. A shot noise correction

Diffraction2D.intensity_peaks(peak_array[, ...])

Get intensity of a peak in the diffraction data.

Diffraction2D.make_probe_navigation([method])

Diffraction2D.peak_position_refinement_com(...)

Refines the peak position using the center of mass.

Diffraction2D.plot(*args, **kwargs)

Plot the signal at the current coordinates.

Diffraction2D.rotate_diffraction(angle[, ...])

Rotate the diffraction dimensions.

Diffraction2D.set_ai([center, wavelength, ...])

[Deprecated] This function sets the .ai parameter which stores an ~pyfai.AzimuthalIntegrator object based on the current calibration applied to the diffraction pattern.

Diffraction2D.shift_diffraction(shift_x, shift_y)

Shift the diffraction patterns in a pixelated STEM signal.

Diffraction2D.sigma_clip([npt_rad, ...])

Perform the 2D integration and perform a sigm-clipping iterative filter along each row.

Diffraction2D.subtract_diffraction_background([...])

Background subtraction of the diffraction data.

Diffraction2D.template_match(template[, inplace])

Template match the signal dimensions with a binary image.

Diffraction2D.template_match_disk([disk_r, ...])

Template match the signal dimensions with a disk.

Diffraction2D.template_match_ring([r_inner, ...])

Template match the signal dimensions with a ring.

Diffraction2D.template_match_with_binary_image(...)

[Deprecated] Template match the signal dimensions with a binary image.

Diffraction2D.threshold_and_mask([...])

Get a thresholded and masked of the signal.

Examples using Diffraction2D#

Background subtraction

Background subtraction

Centering the Zero Beam

Centering the Zero Beam

Finding Diffraction Vectors

Finding Diffraction Vectors

Determining Elliptic Distortion

Determining Elliptic Distortion

Coordinates in Pyxem

Coordinates in Pyxem

Operations on vectors

Operations on vectors

Creating Interactive Virtual Images

Creating Interactive Virtual Images

Creating Virtual Images from Vectors

Creating Virtual Images from Vectors

Other Virtual Imaging

Other Virtual Imaging

Creating a Segmented Detector

Creating a Segmented Detector