API - navarp.utils

fermilevel

This module is part of the Python NavARP library. It defines the functions for extracting the Fermi level energy.

Align each detector image to the fermi level.

Parameters:
  • energies (ndarray) – Energy axis of the analyzer data;

  • scans (ndarray) – Scan axis of the data acquisition;

  • data0 (ndarray) – The matrix composed by the detector images, the matrix must be ordered as data[scans, angles, energies];

Returns:

  • energies_algn (ndarray): Unified energy axis for data;

  • data_algn (ndarray): Each detector image aligned to the same fermi level.

Return type:

(tuple)

Align each detector image to the same binding energy axis from efermis.

Parameters:
  • efermis (float) – The fermi level values for each detector image;

  • energies (ndarray) – Energy axis of the analyzer data;

  • data (ndarray) – The matrix composed by the detector images, the matrix must be ordered as data[scans, angles, energies];

Returns:

  • e_bins (ndarray): Unified binding energy axis;

  • energies_algn (ndarray): Each kinetic energy axis aligned to e_bins;

  • data_algn (ndarray): Each detector image are aligned to e_bins.

Return type:

(tuple)

Find fermi level using logaritmic derivative and then fit

Parameters:
  • energies (ndarray) – Energy axis of the analyzer data;

  • data_sum (ndarray) – The integrated 1-Dim data to fit;

  • energy_range (ndarray) – Energy range where to find fermi level [min, max];

Returns:

Optimal values for the parameters so that the sum of

the squared residuals of fermi_fun - integrated data is minimized.

Return type:

pout (ndarray)

isocut

This module is part of the Python NavARP library. It defines the functions for the extraction of the iso-value map (maps_sum) and lines (lines_sum).

Sum of lines over a given axis in range value-delta:value+delta

Parameters:
  • value (float) – The center of the interval;

  • delta (float) – The range is value-delta:value+delta;

  • array (ndarray) – The 1D-array where to find the indexes;

  • matrix (ndarray) – The 2D-matrix to be integrated along the range;

  • axis (None or int, optional) – Matrix axis along which sum is performed;

  • return_counts (bool, optional) – If True, also return the number of integrated elements.

Returns:

  • isocut_sum (ndarray): 1D-array integrated between value-delta:value+delta;

  • num_ind (int, optional): number of integrated elements.

Return type:

(tuple)

Sum of matrix over a given axis in range value-delta:value+delta

Parameters:
  • value (float) – The center of the interval;

  • delta (float) – The range is value-delta:value+delta;

  • array (ndarray) – The 1D-array where to find the indexes;

  • matrix (ndarray) – The 3D-matrix to be integrated along the range;

  • axis (None or int, optional) – Matrix axis along which sum is performed;

  • return_counts (bool, optional) – If True, also return the number of intergrated elements.

Returns:

  • isocut_sum (ndarray): 2D-matrix integrated between value-delta:value+delta;

  • num_ind (int, optional): number of integrated elements.

Return type:

(tuple)

isomclass

This module is part of the Python NavARP library. It defines the isomap class which are extracted from a NavEntry.

Bases: object

Sum of entry.data over the angle axis in [angle-dangle, angle+dangle].

Parameters:
  • entry (NavEntry class) – The class for the data explored by NavARP;

  • angle (float) – Angular value on the;

  • dangle (float) – Delta angular value;

  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (integer, optional, default=None) – if not None the data are the curvature of the signal.

Angular value on the;

Type:

float

Delta angular value;

Type:

float

The matrix composed by the detector images;

Type:

ndarray

The matrix composed by the detector images without any normalization;

Type:

ndarray

Binding energy axis;

Type:

ndarray

Fermi level kinetic energy (or energies);

Type:

ndarray

Kinetic energy axis of the analyzer;

Type:

ndarray

Photon energy without any reshape, it is present only in the case of hv scan;

Type:

ndarray

Acquisition method;

Type:

str

Scan axis of the acquisition method.

Type:

ndarray

Use data post-processing procedure.

Parameters:
  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (integer, optional, default=None) – if not None the data are the curvature of the signal.

Plot the isomap.

Parameters:
  • xname (string, optional, auto/phi/hv) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • cmap (string, optional) – Colormap;

  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function;

  • z_range (array, optional, [min, max]) – Extreme values for z scale;

  • style (string, optional) – See navplt.give_style function;

  • print_out (boolean, optional) – If True, print the axes dimension with them adaptations;

  • cmapscale (string, optional, linear/log/power) – Select the scale mode.

Returns:

The returned value is the object matplotlib.collections.QuadMesh

from ax.pcolormesh.

Bases: object

Sum of entry.data over the ebin axis within [ebin-debin, ebin+debin].

Parameters:
  • entry (NavEntry class) – The class for the data explored by NavARP;

  • ebin (float) – Binding energy value;

  • debin (float) – Delta binding energy value;

  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (integer, optional, default=None) – if not None the data are the curvature of the signal;

  • kbins (array, optional, default=None) – if not None the data are interpolated on a uniform k-array binned with the kbins number.

Angular axis of the analyzer;

Type:

ndarray

The matrix composed by the detector images;

Type:

ndarray

The matrix composed by the detector images without any normalization;

Type:

ndarray

Delta binding energy value;

Type:

float

Binding energy value;

Type:

ndarray

Photon energy without any reshape, it is present only in the case of hv scan;

Type:

ndarray

k vector along the direction consistent with the scan axis;

Type:

ndarray

k vector along the slit;

Type:

ndarray

Acquisition method;

Type:

str

Scan axis of the acquisition method.

Type:

ndarray

Apply data post-processing procedure.

Parameters:
  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (float, optional, default=None) – if not None the data are the curvature of the signal, only in 1-dimension, meaning only for sigma with one value;

  • kbins (array, optional, default=None) – if not None, the data are interpolated on a uniform k-array binned following the [kxbins, kybins] numbers; kbins must be an array of two integer [kxbins, kybins] not equal; if from the input kxbins == kybins then kybins = kybins + 1 to make it different from kxbins (this is necessary due to how the code recognize the element order and placement in the data matrix).

Save the isomap as hdf5 format.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • title (string, optiona) – data title.

Save the isomap as Igor Pro Text file.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • wave_name (string, optiona) – name of the wave.

Save the isomap as NXdata nexus class.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • title (string, optiona) – data title.

Return the data and relative axes.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable.

Returns:

xax, yax, data, xname, yname

Plot the isomap.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/phi/hv/ky/kz) – Select the y variable;

  • cmap (string, optional) – Colormap;

  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function;

  • z_range (array, optional, [min, max]) – Extreme values for z scale;

  • style (string, optional) – See navplt.give_style function;

  • print_out (boolean, optional) – If True, print the axes dimension with them adaptations;

  • cmapscale (string, optional, linear/log/power) – Select the scale mode;

  • rotate (float, optional) – angle in degrees for a counter clockwise rotation of the shown isoenergy.

Returns:

The returned value is the object matplotlib.collections.QuadMesh

from ax.pcolormesh.

Bases: object

Interpolate the entry.data along specified k-points.

Parameters:
  • entry (NavEntry class) – the class for the data explored by NavARP;

  • kx_pts (ndarray) – kx coordinate of the points defining the path;

  • ky_pts (ndarray) – ky coordinate of the points defining the path;

  • klabels (list of string, optional) – list of the labels for each point in the kspace;

  • ebins_interp (ndarray, optional) – The binding energies vector to sample the entry.data at, if None then it is entry.ebins;

  • kbins (int, optional) – defines the number of equal-width bins in the given path, if None then it is calculated from kx;

  • mask_once (boolean, optional) – If True, the region (mask), where the interpolation function is going to be defined (the smaller the faster is the interpolation procedure), is generated once and used in all the ebins_interp range;

  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (float, optional, default=None) – if not None the data are the curvature of the signal, only in 1-dimension, meaning only for sigma with one value.

The matrix composed by interpolated values along the path without any normalization;

Type:

ndarray

The matrix composed by interpolated values along the path with the normalization;

Type:

ndarray

Binding energy axis;

Type:

ndarray

Fermi level kinetic energy (or energies);

Type:

ndarray

Kinetic energy axis of the analyzer (defined only if scan is not on the photon energy);

Type:

ndarray

Photon energy without any reshape, it is present only in the case of hv scan;

Type:

ndarray

the distance vector from the first point;

Type:

ndarray

the (kx, ky) points along the path;

Type:

ndarray

kx coordinate of the points defining the path;

Type:

ndarray

ky coordinate of the points defining the path;

Type:

ndarray

Array of the labels for each k_ptys_xy;

Type:

list of string

the index values defining the segments along the path;

Type:

ndarray of int

Acquisition method.

Type:

str

Use data post-processing procedure.

Parameters:
  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (integer, optional, default=None) – if not None the data are the curvature of the signal.

Save the isomap as Igor Pro Text file.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • wave_name (string, optiona) – name of the wave.

Save the isomap as NXdata nexus class.

Parameters:
  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • title (string, optiona) – data title.

Return the selected y axis.

Parameters:

yname (string, optional, auto/eef/ekin) – Select the y variable.

Returns:

yax, yname

Plot the path.

Parameters:
  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function;

  • lc (string, optional) – line color;

  • textcolor (string, optional) – text color of the labels;

  • textsize (string, optional) – text size of the labels;

  • xytext (array, optional) – relative text position of the labels.

Plot the isomap.

Parameters:
  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • cmap (string, optional) – Colormap;

  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function;

  • z_range (array, optional, [min, max]) – Extreme values for z scale;

  • style (string, optional) – See navplt.give_style function;

  • print_out (boolean, optional) – If True, print the axes dimension with them adaptations;

  • cmapscale (string, optional, linear/log/power) – Select the scale mode.

Returns:

The returned value is the object matplotlib.collections.QuadMesh

from ax.pcolormesh.

Bases: object

Sum of entry.data over the scan axis within [scan-dscan, scan+dscan].

Parameters:
  • entry (NavEntry class) – The class for the data explored by NavARP;

  • scan (float) – scan value;

  • dscan (float) – delta scan value;

  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (integer, optional, default=None) – if not None the data are the curvature of the signal;

  • kbins (integer, optional, default=None) – if not None the data are interpolated on a uniform k-array binned with the kbins number.

Angular axis of the analyzer;

Type:

ndarray

The matrix composed by the detector images;

Type:

ndarray

The matrix composed by the detector images without any normalization;

Type:

ndarray

delta scan value;

Type:

float

Binding energy axis;

Type:

ndarray

Fermi level kinetic energy (or energies);

Type:

ndarray

Kinetic energy axis of the analyzer;

Type:

ndarray

Photon energy without any reshape, it is present only in the case of hv scan;

Type:

ndarray

scan value;

Type:

float

k vector along the slit.

Type:

ndarray

Apply data post-processing procedure.

Parameters:
  • norm_mode (string, optional, 'no' or 'all' or 'each') – if ‘no’, no normalization; if ‘each’, every Slice are normalize by the integral intensity of each Slice over their 90% of axis range; if “all”, the overall z values are normalize to its min and max;

  • sigma (array, optional, default=None) – Standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes;

  • order (integer, optional, default=2) – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. A positive order corresponds to convolution with that derivative of a Gaussian. For example, an order of 2 corresponds to convolution with that second derivative of a Gaussian;

  • curvature (float, optional, default=None) – if not None the data are the curvature of the signal, only in 1-dimension, meaning only for sigma with one value;

  • kbins (integer, optional, default=None) – if not None the data are interpolated on a uniform k-array binned with the kbins number.

Save the isomap as hdf5 format.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • title (string, optiona) – data title.

Save the isomap as Igor Pro Text file.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • wave_name (string, optiona) – name of the wave.

Save the isomap as NXdata nexus class.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • title (string, optiona) – data title.

Return the data and relative axes.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable.

Returns:

xax, yax, data, xname, yname

Plot the isomap.

Parameters:
  • xname (string, optional, auto/tht/kx) – Select the x variable;

  • yname (string, optional, auto/eef/ekin) – Select the y variable;

  • cmap (string, optional) – Colormap;

  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function;

  • z_range (array, optional, [min, max]) – Extreme values for z scale;

  • style (string, optional) – See navplt.give_style function;

  • print_out (boolean, optional) – If True, print the axes dimension with them adaptations;

  • cmapscale (string, optional, linear/log/power) – Select the scale mode.

Returns:

The returned value is the object matplotlib.collections.QuadMesh

from ax.pcolormesh.

Post-processing procedure on data.

kinterp

This module is part of the Python NavARP library. It defines the functions for the interpolation the entry.data into uniform gridded k-space.

Interpolate isoen on the generated uniform binned 2D-grid

Parameters:
  • kxbins (int) – defines the number of equal-width bins in the given kx

  • kybins (int) – defines the number of equal-width bins in the given ky

  • kx (ndarray) – The kx vector where the isoen is defined;

  • ky (ndarray) – The ky vector where the isoen is defined;

  • isoen (ndarray) – The isoen map related to kx and ky.

Returns:

  • kx_interp (ndarray): The kx vector where the isoen is sampled;

  • ky_interp (ndarray): The ky vector where the isoen is sampled;

  • isoen_interp (ndarray): The interpolated data at the uniform grid.

Return type:

(tuple)

Interpolate isoen on the grid formed from kx_interp and ky_interp arrays

Parameters:
  • kx_interp (ndarray) – The kx vector to sample the isoen at;

  • ky_interp (ndarray) – The ky vector to sample the isoen at;

  • kx (ndarray) – The kx vector where the isoen is defined;

  • ky (ndarray) – The ky vector where the isoen is defined;

  • isoen (ndarray) – The isoen map related to kx and ky.

Returns:

The interpolated data at the grid formed

from kx_interp and ky_interp.

Return type:

isoen_interp (ndarray)

Interpolate isoen defined in (kx, ky) into kxy_interp points

Parameters:
  • kxy_interp (ndarray) – The (kx, ky) points to sample the isoen at;

  • kx (ndarray) – The kx vector where the isoen is defined;

  • ky (ndarray) – The ky vector where the isoen is defined;

  • isoen (ndarray) – The isoen map related to kx and ky;

  • mask (ndarray of booleans, optional) – It is the region where the interpolation function is going to be defined (the smaller the faster is the interpolation procedure).

Returns:

The interpolated data at kxy_interp points.

Return type:

isoen_interp (ndarray)

Interpolate entry.data along the k_pts_xy points path for ebins_interp

Parameters:
  • entry (NavEntry class) – the class for the data explored by NavARP;

  • kx_pts (ndarray) – kx coordinate of the points defining the path;

  • ky_pts (ndarray) – ky coordinate of the points defining the path;

  • ebins_interp (ndarray) – The binding energies vector to sample the entry.data at;

  • kbins (int) – defines the number of equal-width bins in the given path;

  • mask_once (boolean, optional) – If True, the region (mask), where the interpolation function is going to be defined (the smaller the faster is the interpolation procedure), is generated once and used in all the ebins_interp range.

Returns:

  • krho (ndarray): the distance vector from the first point;

  • kxy_interp (ndarray): the (kx, ky) points along the path;

  • ebins_interp (ndarray): The interpolated data along the path;

  • isok_interp (ndarray): The interpolated data along the path;

  • k_pts_bin (ndarray of int): the index values defining the segments along the path.

Return type:

(tuple)

Generate uniform binned 1D path passing througt the k_pts

Parameters:
  • k_pts_xy (ndarray) – list of (kx, ky) points defining the path;

  • kbins (int) – defines the number of equal-width bins in the given path.

Returns:

  • krho (ndarray): the distance vector from the first point;

  • kxy_all_interp (ndarray): the (kx, ky) points along the path;

  • k_pts_bin (ndarray of int): the index values defining the segments along the path.

Return type:

(tuple)

Generate the mask (boolean matrix) where to define the interp. function

The mask is generated by defining a rectangle surrounding the each segment of the path. The points inside are inside the rectangles if the solution of the following linear system give the solution within 0 and 1:

ax = b with the condition of being 0<x<1

The matrix “a” is composed by the two side of the rectangle (defined as the two points minus the origin) and b is point to be checked (minus the origin).

Parameters:
  • k_pts_xy (ndarray) – list of (kx, ky) points defining the path:

  • kx (ndarray) – The kx vector where the isoen is defined;

  • ky (ndarray) – The ky vector where the isoen is defined.

Returns:

mask, it is the mask region where the

interpolation function is going to be defined, the smaller the faster is the interpolation procedure.

Return type:

(ndarray of booleans)

Interpolate isoscan on the generated uniform binned k vector

Parameters:
  • kx (ndarray) – The k vector where the isoscan is defined

  • energies (ndarray) – The energy vector where the isoscan is defined

  • isoscan (ndarray) – The isoscan map related to kx and energies

  • kbins (int) – defines the number of equal-width bins in the given vector

  • kind (str or int, optional) – Specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘previous’, ‘next’, where ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order; ‘previous’ and ‘next’ simply return the previous or next value of the point) or as an integer specifying the order of the spline interpolator to use.

  • fill_value (array-like or “extrapolate”, optional) – if a ndarray (or float), this value will be used to fill in for requested points outside of the data range. If not provided, then the default is NaN. The array-like must broadcast properly to the dimensions of the non-interpolation axes. If a two-element tuple, then the first element is used as a fill value for x_new < x[0] and the second element is used for x_new > x[-1]. Anything that is not a 2-element tuple (e.g., list or ndarray, regardless of shape) is taken to be a single array-like argument meant to be used for both bounds as below, above = fill_value, fill_value. If “extrapolate”, then points outside the data range will be extrapolated.

  • assume_sorted (bool, optional) – If False, values of x can be in any order and they are sorted first. If True, x has to be an array of monotonically increasing values.

Returns:

  • kx_interp (ndarray): The kx vector where the isoen is sampled;

  • isoen_interp (ndarray): The interpolated data at the uniform binned kx_interp vector.

Return type:

(tuple)

Interpolate isoscan on the k vector

Parameters:
  • kx_interp (ndarray) – The k vector to sample the isoscan at

  • kx (ndarray) – The k vector where the isoscan is defined

  • energies (ndarray) – The energy vector where the isoscan is defined

  • isoscan (ndarray) – The isoscan map related to kx and energies

  • kind (str or int, optional) – Specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘previous’, ‘next’, where ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order; ‘previous’ and ‘next’ simply return the previous or next value of the point) or as an integer specifying the order of the spline interpolator to use.

  • fill_value (array-like or “extrapolate”, optional) – if a ndarray (or float), this value will be used to fill in for requested points outside of the data range. If not provided, then the default is NaN. The array-like must broadcast properly to the dimensions of the non-interpolation axes. If a two-element tuple, then the first element is used as a fill value for x_new < x[0] and the second element is used for x_new > x[-1]. Anything that is not a 2-element tuple (e.g., list or ndarray, regardless of shape) is taken to be a single array-like argument meant to be used for both bounds as below, above = fill_value, fill_value. If “extrapolate”, then points outside the data range will be extrapolated.

  • assume_sorted (bool, optional) – If False, values of x can be in any order and they are sorted first. If True, x has to be an array of monotonically increasing values.

Returns:

The interpolated data at kx_interp and

energies.

Return type:

isoen_interp (ndarray)

Generate a unique mask (boolean matrix) for all the ebins_interp range

Parameters:
  • ebins_interp (ndarray) – The binding energies vector to sample the entry.data at;

  • k_pts_xy (ndarray) – list of (kx, ky) points defining the path;

  • entry (NavEntry class) – the class for the data explored by NavARP.

Returns:

It is the region where the

interpolation function is going to be defined (the smaller the faster is the interpolation procedure), for every energy.

Return type:

mask_final (ndarray of booleans)

ktransf

This module is part of the Python NavARP library. It defines the functions for transforming the angular coordinates into the k-space.

Transform variable as ndarray

Parameters:

variable (float, int, list, ndarray) – variable to transform

Returns:

variable transformed

Return type:

variable (ndarray)

Calculates photon energy of a point from k-space coordinates

Parameters:
  • e_bin_p (float) – Binding energy value of the point;

  • work_fun (float) – analyzer work function;

  • inn_pot (float) – Inner potential, corresponding to the energy of the bottom of the valence band referenced to vacuum level;

  • k_along_slit_p (float) – k vector value of the reference point, along the slit direction;

  • k_perp_slit_p (float) – k vector value of the reference point, perpendicular to the slit;

  • k_perp_sample_p (float) – k vector perpendicular to sample surface

  • hv_p_init (float) – Initial guess for the photon energy of the reference point;

  • p_hv (boolean, optional) – If True, add photon momentum;

  • tht_ap (float, optional) – angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”), requested if p_hv==True;

  • phi_ap (float) – angle between analyzer axis (a) and photons (p) along the plane perpendicular to the slit (phi, so the name “phi_ap”);

  • tht_an (float) – angle between analyzer axis (a) and normal (n) to the surface along the plane of the slit (theta, so the name “tht_an”);

  • phi_an (float) – angle between analyzer axis (a) and normal (n) along the plane perpendicular to the slit (phi, so the name “phi_an”), this is the axis of the scan in the case of tilt rotation.

Returns:

Photon energy of the point;

Return type:

hv_p (float)

Calculates photon energy of a point from k-space coordinates

Parameters:
  • e_kin_p (float) – Kinetic energy value of the reference point;

  • inn_pot_init (float) – Initial guess for the inner potential, corresponding to the energy of the bottom of the valence band referenced to vacuum level;

  • k_along_slit_p (float) – k vector value of the reference point, along the slit direction;

  • k_perp_slit_p (float) – k vector value of the reference point, perpendicular to the slit;

  • k_perp_sample_p (float) – k vector perpendicular to sample surface

  • hv (ndarray) – Photon energies;

  • p_hv (boolean, optional) – If True, add photon momentum;

  • hv_p (float, optional) – Photon energy for the reference point, requested if p_hv==True;

  • tht_ap (float, optional) – angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”), requested if p_hv==True;

  • phi_ap (float) – angle between analyzer axis (a) and photons (p) along the plane perpendicular to the slit (phi, so the name “phi_ap”);

  • tht_an (float) – angle between analyzer axis (a) and normal (n) to the surface along the plane of the slit (theta, so the name “tht_an”);

  • phi_an (float) – angle between analyzer axis (a) and normal (n) along the plane perpendicular to the slit (phi, so the name “phi_an”), this is the axis of the scan in the case of tilt rotation.

Returns:

Inner potential, corresponding to the energy of the

bottom of the valence band referenced to vacuum level.

Return type:

inn_pot (float)

Calculates k vector along the slit, i.e. the intersection between the

plane of analyzer axis and slit, and the plane of the sample surface.

Parameters:
  • e_kins (ndarray) – Kinetic energies (usually it is the energy axis of the analyzer data);

  • tht (ndarray) – Angular axis of the analyzer data;

  • tht_an (float) – angle between analyzer axis (a) and normal (n) to the surface along the plane of the slit (theta, so the name “tht_an”);

  • p_hv (boolean, optional) – If True, add photon momentum;

  • hv (ndarray) – Photon energies;

  • tht_ap (float) – angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”).

Returns:

k vector along the slit

Return type:

kx (ndarray)

Calculates k vectors of the iso-energy cut.

Parameters:
  • entry (NavEntry class) – the class for the data explored by NavARP;

  • e_kin_val (float or ndarray) – Kinetic energy/ies of iso-energy cut.

Calculates k vector perpendicular to sample surface.

Parameters:
  • e_kins (ndarray) – Kinetic energies (usually it is the energy axis of the analyzer data);

  • inn_pot (float) – Inner potential, corresponding to the energy of the bottom of the valence band referenced to vacuum level;

  • k_along_slit (ndarray) – k vector along the slit

  • k_perp_slit (ndarray) – k vector perpendicular to the slit

  • p_hv (boolean, optional) – If True, add photon momentum.

  • hv (ndarray) – Photon energies;

  • tht_ap (float) – angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”);

  • phi_ap (float) – angle between analyzer axis (a) and photons (p) along the plane perpendicular to the slit (phi, so the name “phi_ap”);

  • tht_an (float) – angle between analyzer axis (a) and normal (n) to the surface along the plane of the slit (theta, so the name “tht_an”);

  • phi_an (float) – angle between analyzer axis (a) and normal (n) along the plane perpendicular to the slit (phi, so the name “phi_an”), this is the axis of the scan in the case of tilt rotation.

Returns:

k vector perpendicular to sample surface.

Return type:

kz (ndarray)

Calculates k vector perpendicular to the slit, i.e. the intersection

between plane of analyzer axis and the perpendicular to the slit, and the plane of the sample surface.

Parameters:
  • e_kins (ndarray) – Kinetic energies (usually it is the energy axis of the analyzer data);

  • tht (ndarray) – Angular axis of the analyzer data;

  • tht_an (float) – angle between analyzer axis (a) and normal (n) to the surface along the plane of the slit (theta, so the name “tht_an”);

  • phi (ndarray) – angle perpendicular to the slit, this is the axis of the scan in the case of the deflector;

  • phi_an (float) – angle between analyzer axis (a) and normal (n) along the plane perpendicular to the slit (phi, so the name “phi_an”), this is the axis of the scan in the case of tilt rotation;

  • p_hv (boolean, optional) – If True, add photon momentum.

  • hv (ndarray) – Photon energies;

  • tht_ap (float) – angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”);

  • phi_ap (float) – angle between analyzer axis (a) and photons (p) along the plane perpendicular to the slit (phi, so the name “phi_ap”);

Returns:

k vector perpendicular to the slit

Return type:

ky (ndarray)

Calculates photon momentum along the slit,

i.e. the intersection between the plane of analyzer axis and slit, and the plane of the sample surface.

Parameters:
  • hv (ndarray) – Photon energy;

  • tht_ph (ndarray) – tht angle between surface normal and photons.

Returns:

Photon momentum in plane along theta.

Return type:

p_hv_along_slit (ndarray)

Calculates photon momentum perpendicular to the sample surface

Parameters:
  • hv (ndarray) – Photon energy;

  • tht_ph (ndarray) – tht angle between surface normal and photons.

  • phi_ph (ndarray) – phi angle between surface normal and photons.

Returns:

Photon momentum in plane along theta.

Return type:

p_hv_perp_sample (ndarray)

Calculates photon momentum perpendicular to the slit,

i.e. the intersection between plane of analyzer axis and the perpendicular to the slit, and the plane of the sample surface.

Parameters:
  • hv (ndarray) – Photon energy;

  • tht_ph (ndarray) – tht angle between surface normal and photons.

  • phi_ph (ndarray) – phi angle between surface normal and photons.

Returns:

Photon momentum in plane along phi.

Return type:

p_hv_along_slit (ndarray)

Calculates angle between analyzer axis (a) and normal (n) along

the plane perpendicular to the slit (phi, so the name “phi_an”), this is the axis of the scan in the case of tilt rotation;

Parameters:
  • e_kin_p (float) – Kinetic energy value of the reference point;

  • tht_p (float) – Angular value of the reference point along the angular axis of the analyzer data;

  • tht_an (float) – angle between analyzer axis (a) and normal (n) to the surface along the plane of the slit (theta, so the name “tht_an”);

  • phi_p (float) – Angular value of the reference point along the angle perpendicular to the slit;

  • k_perp_slit_p (float) – k vector value of the reference point, perpendicular to the slit;

  • phi_an_init (float, optional) – Initial guess for the phi_an;

  • p_hv (boolean, optional) – If True, add photon momentum;

  • hv_p (float, optional) – Photon energy for the reference point, requested if p_hv==True;

  • tht_ap (float, optional) – angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”), requested if p_hv==True;

  • phi_ap (float) – angle between analyzer axis (a) and photons (p) along the plane perpendicular to the slit (phi, so the name “phi_ap”);

Returns:

angle between analyzer axis (a) and normal (n) along

the plane perpendicular to the slit (phi, so the name “phi_an”), this is the axis of the scan in the case of tilt rotation.

Return type:

phi_an (float)

Calculates tht_an, phi_an, scans_0 and phi.

Parameters:
  • entry (NavEntry class) – the class for the data explored by NavARP;

  • refs_p (dict) – dictionary of the reference point in angle and k space.

Returns:

Photon energy of the point;

Return type:

hv_p (float)

Calculates angle between analyzer axis (a) and normal (n) to the

surface along the plane of the slit (theta, so the name “tht_an”).

Parameters:
  • e_kin_p (float) – Kinetic energy value of the reference point;

  • tht_p (float) – Angular value of the reference point along the angular axis of the analyzer data;

  • k_along_slit_p (float) – k vector value of the reference point, along the slit direction;

  • tht_an_init (float, optional) – Initial guess for the tht_an;

  • p_hv (boolean, optional) – If True, add photon momentum;

  • hv_p (float, optional) – Photon energy for the reference point, requested if p_hv==True;

  • tht_ap (float, optional) – angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”), requested if p_hv==True.

Returns:

angle between analyzer axis (a) and normal (n) to the

surface along the plane of the slit (theta, so the name “tht_an”).

Return type:

tht_an (float)

navfile

This module is part of the Python NavARP library. It defines the base class for the data used in NavARP.

Bases: object

NavAnalyzer is the class for the analyzer and its geometry.

NavAnalyzer is defined from the NavEntry, and it considers the experimental set-ups of Lorea/ALBA(ES), I05/Diamond(GB), SXARPES-ADRESS/PSI(CH) and Antares/Soleil(FR).

Angle between analyzer axis (a) and photons (p) along the plane of the slit (theta, so the name “tht_ap”);

Type:

float

Angle between analyzer axis (a) and photons (p) along the plane perpendicular to the slit (phi, so the name “phi_ap”);

Type:

float

analyzer work function;

Type:

float

Acquisition method.

Type:

str

Set defaul values for Lorea/ALBA(ES)

Set defaul values for I05/Diamond(GB)

Set defaul values for SXARPES-ADRESS/PSI(CH)

Set defaul values for Antares/Soleil(FR)

Bases: object

NavEntry is the class for the data to be explored by NavARP.

Parameters:
  • scans (ndarray) – scan axis of the acquisition method;

  • angles (ndarray) – Angular axis of the analyzer;

  • energies (ndarray) – Kinetic energy axis of the analyzer;

  • data (ndarray) – The matrix composed by the detector images;

  • scan_type (str) – Acquisition method;

  • hv (ndarray) – Photon energy;

  • defl_angles (ndarray, optional) – Deflector angular axis of the analyzer, if present;

  • analyzer (NavAnalyzer class, optional) – Analyzer and its geometry;

  • file_note (str, optional) – Description of experimental condition;

  • file_path (str, optional) – File path, as from input.

analyzer and its geometry;

Type:

NavAnalyzer class

Angular axis of the analyzer;

Type:

ndarray

The matrix composed by the detector images;

Type:

ndarray

The matrix composed by the detector images without any resphape, it is present only in the case of hv scan;

Type:

ndarray

Deflector angular axis of the analyzer, if present;

Type:

ndarray

Binding energy axis;

Type:

ndarray

Fermi level kinetic energy (or energies);

Type:

ndarray

Input parameters of autoset_efermi;

Type:

ndarray

Output parameters of autoset_efermi, which are the optimal values for the parameters so that the sum of the squared residuals of fermi_fun - integrated data is minimized;

Type:

ndarray

Fermi level full-width-half-maximum;

Type:

ndarray

Kinetic energy axis of the analyzer;

Type:

ndarray

Kinetic energy axis of the analyzer without any reshape, it is present only in the case of hv scan;

Type:

ndarray

Description of experimental condition;

Type:

str

File path, as from input;

Type:

str

Photon energy without any reshape, it is present only in the case of hv scan;

Type:

ndarray

Photon energy;

Type:

ndarray

It True, the photon momentum is used in the k-transformation (ktransf);

Type:

Bolean

Angle between analyzer axis (a) and normal (n) along the plane perpendicular to the slit (phi, so the name “phi_an”), this is the axis of the scan in the case of tilt rotation;

Type:

float

Scan axis of the acquisition method;

Type:

ndarray

Acquisition method;

Type:

str

Offset in scans axis (inner potential in the case of hv scan);

Type:

float

Angle between analyzer axis (a) and normal (n) to the surface along the plane of the slit (theta, so the name “tht_an”).

Type:

float

Find fermi level using logaritmic derivative and then fit.

Parameters:
  • energy_range (ndarray) – Energy range where to find fermi level [min, max];

  • angle_range (ndarray) – Angle range where to find fermi level [min, max];

  • scan_range (ndarray) – Scan range where to find fermi level [min, max];

  • print_out (boolean, optional) – If True, print the obtained values.

Initialize fermi level (efermi) and binding energies (ebins).

Plot the fermi level fit result.

Parameters:
  • axfit (matplotlib.axes, optional) – Axes, if None it is created inside the function;

  • scan_i (integer) – scans index, in the case of efermi fit for each image along the scan axis.

Set the fermi level and then update the other attributes.

Parameters:

efermi (ndarray) – Fermi level kinetic energy (or energies);

Set tht_an, phi_an, scans_0 and phi.

Parameters:
  • tht_p (float) – Angular value of the reference point along the angular axis of the analyzer data;

  • k_along_slit_p (float) – k vector value of the reference point, along the slit direction;

  • scan_p (float) – Scan value of the reference point;

  • ks_p (float) – k vector value of the reference point in the direction consistent with the scan axis;

  • e_kin_p (float) – Kinetic energy value of the reference point;

  • inn_pot (float) – Inner potential, needed in hv scan;

  • p_hv (boolean, optional) – If True, add photon momentum;

  • hv_p (float, optional) – Photon energy for the reference point, requested if p_hv==True;

  • print_out (boolean, optional) – If True, print the obtained values.

Set angle between analyzer axis (a) and normal (n) to the

surface along the plane of the slit (theta, so the name “tht_an”).

Note

The photon momentum shifts the Gamma-point from (Kx, Ky) = (0, 0) In the following method the real tht_an value is calculated from a k-point and the photon momentum contribution can be taken into account by setting p_hv=True.

Parameters:
  • tht_p (float) – Angular value of the reference point along the angular axis of the analyzer data;

  • k_along_slit_p (float) – k vector value of the reference point, along the slit direction;

  • e_kin_p (float) – Kinetic energy value of the reference point;

  • p_hv (boolean, optional) – If True, add photon momentum;

  • hv_p (float, optional) – Photon energy for the reference point, requested if p_hv==True;

  • print_out (boolean, optional) – If True, print the obtained values.

Get only the string in the case of np.ndarray or byte.

Load the NavEntry from file_path.

The function loads entry from:
  • NXarpes file from LOREA/ALBA(ES) and I05/Diamond(GB);

  • HDF5 file from SXARPES-ADRESS/PSI(CH);

  • NEXUS file from Antares/Soleil(FR) (only deflector scan);

  • folder with txt-files from Cassiopee/Soleil(FR);

  • krx or txt file from MBS A1Soft program;

  • sp2 or itx file from SpecsLab Prodigy program;

  • zip or txt file from Scienta-Omicron SES program;

  • pxt, ibw and itx file of Igor-pro as saved by Scienta-Omicron SES program;

  • txt file in itx format of Igor-pro considering the order (energy, angle, scan);

  • yaml file with dictionary to load files (txt, sp2 or pxt) in a folder or to only add metadata to a single file.

The type of data is recognized from the file-extension:
  • .nxs is considered as NXarpes data if the first group is entry1 otherwise a NEXUS file from Antares/Soleil(FR) if second group is ANTARES

  • .h5 is considered for from SXARPES-ADRESS/PSI(CH);

  • .txt is considered as from Cassiopee/Soleil(FR) if ‘_ROI1_’ is in its name, otherwise the first line is read and if this line contains ‘Frames Per Step’ then it is from MBS A1Soft program, if it contains ‘[Info]’ then it is from Scienta-Omicron SES program;

  • .sp2 is considered as from Specs program;

  • .pxt and .ibw are considered as of Igor-pro as saved by Scienta-Omicron SES program;

  • .krx is considered as from MBS A1Soft program;

  • .yaml is considered as a dictionary with the complementary information for creating a valid NavEntry, here an example:

    file_path: '*.sp2'
    scans:
        start: 121.5
        step: 0.35
    scan_type: 'azimuth'
    
Parameters:

file_path (str) – File path of the file to open as NavEntry.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load ARPES data from Cassiopee/Soleil(FR).

Parameters:

path – file path of a ROI-file in the folder.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load ibw-file of Igor-pro as saved from Scienta-Omicro SES program.

Parameters:

path – file path of the ibw-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load ARPES data from itx file.

Parameters:

path – file path of the itx-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load pxt-file of Igor-pro as saved from Scienta-Omicro SES program.

Parameters:

path – file path of the pxt-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load txt-file from MBS A1Soft or Scienta-Omicro SES program.

Parameters:

path – file path of the txt-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load krx-file from MBS A1Soft program.

Parameters:

path – file path of the krx-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load files in a folder using yaml-file.

Parameters:

path – file path of the yaml-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load NXARPES data from LOREA/ALBA(ES) and I05/Diamond(GB).

Parameters:

h5f – The HDF5 file-object from h5py.File.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load generic NXARPES as saved by save_nxarpes_generic.

Parameters:

h5f – The HDF5 file-object from h5py.File.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load NXARPES example.

Parameters:

h5f – The HDF5 file-object from h5py.File.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load NEXUS file from Antares/Soleil(FR).

Parameters:

h5f – The HDF5 file-object from h5py.File.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load txt-file from MBS A1Soft or Scienta-Omicro SES program.

Parameters:

path – file path of the txt-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load zip-file from Scienta-Omicro SES program.

Parameters:

path – file path of the zip-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load sp2-file from Specs program.

Parameters:

path – file path of the sp2-file.

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Load data from SXARPES-ADRESS/PSI(CH).

Parameters:
  • h5f – The HDF5 file-object from h5py.File.

  • h5f_matrix_path – The path location of the data (matrix).

Returns:

the class for the data to be explored by NavARP.

Return type:

NavEntry (class)

Save NavEntry into file_path as generic NXARPES.

Parameters:
  • entry (NavEntry class) – entry to be saved.

  • file_path_nxs (str) – File path for the nxs-file to be saved.

  • instrument_name (string, optional) – name of the instrument where the data are from (e.g.: beamline or laboratory name).

navplt

This module is part of the Python NavARP library. It defines the functions for plotting the data using matplotlib.pyplot .

The function generate linear/log/power colormap scale.

Parameters:
  • cmapscale (string, optional, linear/log/power) – Select the scale mode.

  • vmin (scalar, optional) – Colorscale min and max. If None, suitable min/max values are automatically chosen by the Normalize instance.

  • vmax (scalar, optional) – Colorscale min and max. If None, suitable min/max values are automatically chosen by the Normalize instance.

  • clip (boolean, optional) – if is True, masked values are set to 1; otherwise they remain masked.

Returns:

Normalize class from matplotlib.colors.Normalize

Return type:

norm

The function applies a style to the pcolormesh generated by pimage.

Parameters:
  • ax (matplotlib.axes) – Axes where to impose the style.

  • style (string) – ‘xlabel_ylabel’, xlabel and ylabel in agreement with label dictionary (e.g. ‘tht_be’ or ‘kx_hv’ or ‘ky_kz’)

Returns:

None

Plot an histogram of z divited into 256 bins.

Parameters:
  • z (ndarray) – Intensity matrix

  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function

  • z_range (array, optional, [min, max]) – Extreme values for z scale

  • orientation (string, optional, vertical or horizontal) – Histogram axes orientation

Returns:

None

Normalize z values along the axis value between [0, 1].

Parameters:
  • z (ndarray) – Intensity matrix

  • mode (string, optional, all or each) – Select the normalization mode if “each”, every Slice are normalize by by the integral intensity of each Slice over their 90% of aixs range if “all”, the overall z values are normalize to its min and max

  • axis (int, optional) – Axis along which a sum is performed in the case mode == “each”

Returns:

Intensity matrix normalized

Return type:

z_norm (ndarray)

The function is adapting a more generic input format for pcolormesh.

Parameters:
  • x (ndarray) – Array for the horizontal axis

  • y (ndarray) – Array for the vertical axis

  • z (ndarray) – Intensity matrix

  • cmap (string, optional) – colormap

  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function

  • z_range (array, optional, [min, max]) – Extreme values for z scale

  • style (string, optional) – See give_style function

  • print_out (boolean, optional) – If True, print the axes dimension with them adaptations

Returns:

The returned value is the object matplotlib.collections.QuadMesh from

ax.pcolormesh

The function is adapting a more generic input format for pcolormesh.

Parameters:
  • x (ndarray) – Array for the horizontal axis

  • y (ndarray) – Array for the vertical axis

  • z (ndarray) – Intensity matrix

  • cmap (string, optional) – colormap

  • ax (matplotlib.axes, optional) – Axes, if None it is created inside the function

  • z_range (array, optional, [min, max]) – Extreme values for z scale

  • style (string, optional) – See give_style function

  • print_out (boolean, optional) – If True, print the axes dimension with them adaptations

Returns:

The returned value is the object matplotlib.collections.QuadMesh from

ax.pcolormesh

The function assign the cmapscale to the quadmesh.

Parameters:
  • quadmesh – matplotlib.collections.QuadMesh from ax.pcolormesh

  • cmapscale (string, optional, linear/log/power) – Select the scale mode.

  • vmin (scalar, optional) – Colorscale min and max. If None, suitable min/max values are automatically chosen by the Normalize instance.

  • vmax (scalar, optional) – Colorscale min and max. If None, suitable min/max values are automatically chosen by the Normalize instance.

  • clip (boolean, optional) – if is True, masked values are set to 1; otherwise they remain masked.

Returns:

None