Band structure reconstruction (fuller.mrfRec)

class fuller.mrfRec.MrfRec(E, kx=None, ky=None, I=None, E0=None, eta=0.1, includeCurv=False, etaCurv=0.1)

Class for reconstructing band structure from band mapping data.

_MrfRec__initSquMat(n, el=None)

Returns as square matrix of size nxn with el as element in each element.

Parameters

n: int

Size of the square matrix.

el: numeric | None

Values of each element.

Return

Square matrix of size nxn with el as element in each element.

delHist()

Deletes the training history by resetting delta log(p) to its initial value.

classmethod fromFile(fileName, E0=None, eta=0.1)

Initialize reconstruction object from h5 file, returns econstruction object initialized from h5 file.

Parameters

fileName: str

Path to the file as string

E0: numeric | None

Initial guess for band structure energy values, if None mean of E is taken.

getEb()

Retrieve the energy values of the reconstructed band.

getLogP()

Retrieve the log likelihood of the electronic band structure given the model.

initializeBand(kx, ky, Eb, offset=0.0, flipKAxes=False, kScale=1.0, interp_method='linear')

Set E0 according to reference band, e.g. DFT calculation.

Parameters

kx, ky: 1D array, 1D array

Momentum values for data along x and y directions.

Eb: 1D array

Energy values for band mapping data.

offset: numeric | 0.

Offset to be added to reference energy values.

flipKAxes: bool | False

Flag, if true the momentum axes of the references are interchanged.

kxScale: numeric | 1.

Scaling factor applied to k axes of reference band (after flipping if done).

interp_method: str | ‘linear’

Method used to interpolate reference band on grid of measured data, ‘linear’ and ‘nearest’ are possible choices. Details see scipy.interpolate.RegularGridInterpolator().

iter_para(num_epoch=1, updateLogP=False, use_gpu=True, disable_tqdm=False, graph_reset=True, **kwargs)

Iterate band structure reconstruction process (no curvature), computations done in parallel using Tensorflow.

Parameters

num_epoch: int | 1

Number of iteration epochs.

updateLogP: bool | False

Flag, if true logP is updated every half epoch

use_gpu: bool | True

Flag, if true gpu is used for computations if available

disable_tqdm: bool | False

Flag, it true no progress bar is shown during optimization

graph_reset: bool | True

Flag, if true Tensorflow graph is reset after computation to reduce memory demand

iter_para_curv(num_epoch=1, updateLogP=False, use_gpu=True, disable_tqdm=False, graph_reset=True, **kwargs)

Iterate band structure reconstruction process (with curvature), computations done in parallel using Tensorflow.

Parameters

num_epoch: int | 1

Number of iteration epochs.

updateLogP: bool | False

Flag, if true logP is updated every half epoch.

use_gpu: bool | True

Flag, if true gpu is used for computations if available.

disable_tqdm: bool | False

Flag, it true no progress bar is shown during optimization.

iter_seq(num_epoch=1, updateLogP=False, disable_tqdm=False)

Iterate band structure reconstruction process.

Parameters

num_epoch: int | 1

Number of iterations.

updateLogP: bool | False

Flag, if true logP is updated every half epoch.

disable_tqdm: bool | False

Flag, it true no progress bar is shown during optimization.

loadBand(Eb=None, fileName=None, use_as_init=True)

Load bands in reconstruction object, either using numpy matrix or directly from file.

Parameters

Eb: numpy array | None

Energy values of an electronic band.

fileName: str | None

Name of h5 file containing band.

use_as_init: bool | True

Flag, if true loaded band is used as initialization of the object

classmethod loadBandsMat(path)

Load bands from mat file in numpy matrix.

Parameters

path: str

Path to the mat file.

Return

Tuple of momentum vectors and energy grid.

normalizeI(kernel_size=None, n_bins=128, clip_limit=0.01, use_gpu=True, threshold=1e-06)

Normalizes the intensity using multidimensional CLAHE (MCLAHE).

Parameters

kernel_size: list/tuple | None

Tuple of kernel sizes, 1/8 of dimension lengths of x if None.

n_bins: int | 128

Number of bins to be used in the histogram.

clip_limit: numeric | 0.01

Relative intensity limit to be ignored in the histogram equalization.

use_gpu: bool | True

Flag, if true gpu is used for computations if available.

threshold: numeric | 1e-6

Threshold below which intensity values are set to zero.

plotBands(surfPlot=False, cmapName='viridis', figsize=[9, 9], equal_axes=False)

Plot reconstructed electronic band structure.

Parameters

surfPlot: bool | False

Flag, if true a surface plot is shown in addition.

cmapName: str | ‘viridis’

Name of the colormap.

figsize: list/tuple | [9, 9]

Size of the figure produced.

equal_axes: bool | False

Option to apply the same scaling for both axes.

plotI(kx=None, ky=None, E=None, cmapName='viridis', plotBand=False, plotBandInit=False, bandColor='r', initColor='k', plotSliceInBand=False, figsize=[9, 9], equal_axes=False)

Plot the intensity against k and E.

Parameters

kx, ky: 1D array, 1D array | None, None

kx, ky to plot respective slice.

E: 1D array | None

E to plot respective slice.

plotBand: bool | False

Flag, if true current electronic band is plotted in image.

plotBandInit: bool | False

Flag, if true E0 is plotted in image.

bandColor: str | ‘r’

Color string for band for matplotlib.pyplot function.

initColor: str | ‘k’

Color string for initial band for matplotlib.pyplot function.

plotSliceInBand: bool | False

Flag, if true plots band as colormesh and corresponding slice in red.

figsize: list/tuple | [9, 9]

size of the figure produced.

equal_axes: bool | False

use same scaling for both axes.

plotLoss()

Plot the change of the negative log likelihood.

saveBand(fileName, hyperparams=True, index=None)

Save the reconstructed electronic band and associated optimization paramters to file.

Parameters

fileName: str

Name of the file to save data to.

hyperparams: bool | True

Option to save hyperparameters.

index: int | None

Energy band index.

smoothenI(sigma=1.0, 1.0, 1.0)

Apply a multidimensional Gaussian filter to the band mapping data (intensity values).

Parameters

sigma: list/tuple | (1, 1, 1)

The vector containing the Gaussian filter standard deviations in pixel space for kx, ky, and E.

symmetrizeI(mirror=True, rotational=True, rotational_order=6)

Symmetrize I with respect to reflection along x and y axis.

Parameters

mirror: bool | True

Flag, if True mirror symmetrization is done wrt planes perpendicular to kx and ky axis.

rotational: bool | True

Flag, if True rotational symmetrization is done along axis at kx = ky = 0.

rotational_order: int | 6

Order of the rotational symmetry.