Phase-change materials reference

Note

See Phase-change materials for an overview and description of these UDFs.

Crystallinity map

class libertem.udf.crystallinity.CrystallinityUDF(rad_in, rad_out, real_center, real_rad)[source]

Determine crystallinity by integration over a ring in the fourier spectrum of each frame.

Parameters:
  • rad_in (float) – Inner radius in pixels of a ring mask for the integration in Fourier space

  • rad_out (float) – Outer radius in pixels of a ring mask for the integration in Fourier space

  • real_center (Tuple[float], optional) – (y,x) - pixels, coordinates of a center of a circle for a masking out zero-order peak in real space.

  • real_rad (float, optional) – Radius in pixels of circle for a masking out zero-order peak in real space. If one of real_center or real_rad is missing: the integration will be done without masking zero-order peak out.

Examples

>>> cryst_udf = CrystallinityUDF(rad_in=4, rad_out=6, real_center=(8, 8), real_rad=3)
>>> result = ctx.run_udf(dataset=dataset, udf=cryst_udf)
>>> np.array(result["intensity"]).shape
(16, 16)
libertem.udf.crystallinity.run_analysis_crystall(ctx, dataset, rad_in, rad_out, real_center=None, real_rad=None, roi=None, progress=False)[source]

Return a value after integration of Fourier spectrum for each frame over ring.

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

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

  • rad_in (int) – Inner radius in pixels of a ring mask for the integration in Fourier space

  • rad_out (int) – Outer radius in pixels of a ring mask for the integration in Fourier space

  • real_center (Tuple[float], optional) – (y,x) - pixels, coordinates of a center of a circle for a masking out zero-order peak in real space.

  • real_rad (int, optional) – Radius in pixels of circle for a masking out zero-order peak in real space. If one of real_center or real_rad is missing: the integration will be done without masking zero-order peak out.

Returns:

pass_results – Returns a “crystallinity” value for each frame. To return 2-D array use pass_results[‘intensity’].data

Return type:

dict