Band-mapping data classes (mpes.bandstructure)

Axis-linked data structure for multidimensional data based on xarray.DataArray.

@author: R. Patrick Xian

class mpes.bandstructure.BandStructure(data=None, coords=None, dims=None, datakey='V', faddr=None, typ='float32', **kwds)

Data structure for storage and manipulation of a single band structure (1-3D) dataset. Instantiation of the BandStructure class can be done by specifying a (HDF5 or mat) file path or by separately specify the data, the axes values and their names.

_view_result(img, figsize=5, 5, cmap='terrain_r', origin='lower')

2D visualization of intermediate result.

keypoint_estimate(img, dimname='E', pdmethod='daofind', display=False, update=False, ret=False, **kwds)

Estimate the positions of momentum local maxima (high symmetry points) in the isoenergetic plane.

orthogonalize(center, update=True, ret=False)

Align the high symmetry axes in the isoenergetic plane to the row and column directions of the image coordinate system.

classmethod resize(data, axes, factor, method='mean', ret=True, **kwds)

Reduce the size (shape-changing operation) of the axis through rebinning.

Parameters

data: nD array

Data to resize (e.g. self.data).

axes: dict

Axis values of the original data structure (e.g. self.coords).

factor: list/tuple of int

Resizing factor for each dimension (e.g. 2 means reduce by a factor of 2).

method: str | ‘mean’

Numerical operation used for resizing (‘mean’ or ‘sum’).

ret: bool | False

Option to return the resized data array.

Return

Instance of resized n-dimensional array along with downsampled axis coordinates.

rotate(axis, angle, angle_unit='deg', update=True, ret=False)

Primary axis rotation that preserves the data size.

scale(axis, scale_array, update=True, ret=False)

Scaling and masking of band structure data.

Parameters

axis: str/tuple

Axes along which to apply the intensity transform.

scale_array: nD array

Scale array to be applied to data.

update: bool | True

Options to update the existing array with the intensity-transformed version.

ret: bool | False

Options to return the intensity-transformed data.

Return

scdata: nD array

Data after intensity scaling.

symmetrize(center, symtype, update=True, ret=False)

Symmetrize data within isoenergetic planes. Supports rotational and mirror symmetries. The operation preserves the data size.

update_axis(axes=None, vals=None, axesdict=None)

Update the values of multiple axes.

Parameters

axes: list/tuple | None

Collection of axis names.

vals: list/tuple | None

Collection of axis values.

axesdict: dict | None

Axis-value pair for update.

class mpes.bandstructure.MPESDataset(data=None, coords=None, dims=None, datakey='V', faddr=None, typ='float32', **kwds)

Data structure for storage and manipulation of a multidimensional photoemission spectroscopy (MPES) dataset (4D and above).

maxdiff(vslice, ret=False)

Find the hyperslice with maximum difference from the specified one.

slicediff(slicea, sliceb, slicetype='index', axreduce=None, ret=False, **kwds)

Calculate the difference of two hyperslices (hs), hsa - hsb.

Parameters

slicea, sliceb: dict

Dictionaries for slicing.

slicetype: str | ‘index’

Type of slicing, ‘index’ (DataArray.isel) or ‘value’ (DataArray.sel).

axreduce: tuple of int | None

Axes to sum over.

ret: bool | False

Options for return.

**kwds: keyword arguments

Those passed into DataArray.isel() and DataArray.sel().

Return

sldiff: class

Sliced class instance.

subset(axis, axisrange)

Spawn an instance of the BandStructure class from axis slicing.

Parameters

axis: str/list

Axes to subset from.

axisrange: slice object/list

The value range of axes to be sliced out.

Return

An instances of BandStructure, MPESDataset or DataArray class.