Band-mapping data classes (mpes.bandstructure) — mpes 1.1.1 documentation

# 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
      datanD array

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

      axesdict

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

      factorlist/tuple of int

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

      methodstr | ‘mean’

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

      retbool | 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
      axisstr/tuple

        Axes along which to apply the intensity transform.

      scale_arraynD array

        Scale array to be applied to data.

      updatebool | True

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

      retbool | False

        Options to return the intensity-transformed data.

    Return
      scdatanD 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
      axeslist/tuple | None

        Collection of axis names.

      valslist/tuple | None

        Collection of axis values.

      axesdictdict | 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, slicebdict

        Dictionaries for slicing.

      slicetypestr | ‘index’

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

      axreducetuple of int | None

        Axes to sum over.

      retbool | False

        Options for return.

      **kwdskeyword arguments

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

    Return
      sldiffclass

        Sliced class instance.

  `subset`(axis, axisrange)

    Spawn an instance of the BandStructure class from axis slicing.

    Parameters
      axisstr/list

        Axes to subset from.

      axisrangeslice object/list

        The value range of axes to be sliced out.

    Return

      An instances of BandStructure, MPESDataset or DataArray class.