mag2exp.ltem.integrated_magnetic_flux_density#

mag2exp.ltem.integrated_magnetic_flux_density(phase)#

Calculate the integrated magnetic flux density.

This calculates the magnetic flux density integrated along the beam direction given by

\[\begin{split}\int_{0}^{t} {\bf B}_\perp dz = \frac{\Phi_0}{\pi}\left( \begin{array}{c} -\partial/\partial y \\ \partial/\partial x \end{array} \right).\end{split}\]

Ask James!!!

This quantity is most closely related to values obtained from electron holography.

Parameters:

phase (discretisedfield.Field) – Phase of the electrons from LTEM.

Returns:

Integrated magnetic flux density.

Return type:

discretisedfield.Field

Example

  1. Visualising the phase using matplotlib.

>>> import discretisedfield as df
>>> import mag2exp
>>> mesh = df.Mesh(p1=(-5e-9, -4e-9, -1e-9), p2=(5e-9, 4e-9, 1e-9),
...                    cell=(2e-9, 1e-9, 0.5e-9))
...
>>> def value_fun(point):
...     x, y, z = point
...     if x > 0:
...         return (0, -1, 0)
...     else:
...         return (0, 1, 0)
...
>>> field = df.Field(mesh, nvdim=3, value=value_fun)
>>> phase, ft_phase = mag2exp.ltem.phase(field)
>>> df_img = mag2exp.ltem.defocus_image(phase, cs=8000,
...                                     df_length=0.2e-3,
...                                     voltage=300e3)
>>> imf = mag2exp.ltem.integrated_magnetic_flux_density(phase)