Amorphous materials reference

Note

See Amorphous materials for an overview and description of the amorphous applications.

Fluctuation EM

This module contains the UDF for applying FEM to a single ring (mostly useful for interactive use).

class libertem.udf.FEM.FEMUDF(center, rad_in, rad_out)[source]

Perform Fluctuation EM [GT97]

This UDF calculates the standard deviation within a ring around the zero order diffraction peak.

Parameters:
  • center (Tuple[float]) – (x, y) - coordinates of a center of a ring for a masking region of interest to calculate SD

  • rad_in (float) – Inner radius of a ring mask

  • rad_out (float) – Outer radius of a ring mask

Examples

>>> fem_udf = FEMUDF(center=(8, 8), rad_in=4, rad_out=6)
>>> result = ctx.run_udf(dataset=dataset, udf=fem_udf)
>>> np.array(result["intensity"]).shape
(16, 16)
libertem.udf.FEM.run_fem(ctx, dataset, center, rad_in, rad_out, roi=None)[source]

Return a standard deviation(SD) value for each frame of pixels which belong to ring mask.

Parameters:
  • ctx (libertem.api.Context) –

  • dataset (libertem.io.dataset.base.DataSet) – A dataset with 1- or 2-D scan dimensions and 2-D frame dimensions

  • center (tuple) – (x,y) - coordinates of a center of a ring for a masking region of interest to calculate SD

  • rad_in (int) – Inner radius of a ring mask

  • rad_out (int) – Outer radius of a ring mask

Returns:

pass_results – Returns a standard deviation(SD) value for each frame of pixels which belong to ring mask. To return 2-D array use pass_results[‘intensity’].data

Return type:

dict

Radial Fourier Analysis

This module contains the radial fourier series analysis, for analysing frequencies and symmetries of diffraction patterns.

class libertem.analysis.radialfourier.RadialFourierResultSet(results: list[AnalysisResult] | Callable[[], list[AnalysisResult]], raw_results=None)[source]

Result set of a RadialFourierAnalysis

Running a RadialFourierAnalysis via libertem.api.Context.run() on a dataset returns an instance of this class. It contains the Fourier coefficients for each bin. See libertem.api.Context.create_radial_fourier_analysis() for available parameters and Radial Fourier Series for a description of the application!

New in version 0.3.0.

dominant_0, absolute_0_0, absolute_0_1, ..., absolute_0_<max_order>,    phase_0_0, ..., phase_0_<max_order>,    complex_0_0, ..., complex_0_<max_order>;    dominant_1, absolute_1_0, ..., complex_1_<max_order>;    dominant_<nbins-1>, ..., complex_<nbins-1>_<max_order>

Results for each bin: dominant Fourier coefficient (indicates symmetry), absolute values of each Fourier coefficient, phase values of each Fourier coefficient, complex values of each Fourier coefficient. The results have the shape of the navigation dimension.

Type:

libertem.analysis.base.AnalysisResult

raw_results

Complex numbers, shape (<n_bins>, <max_order + 1>, *(<ds.shape.nav>))

Type:

numpy.ndarray