MDCs

File containing the MDCs class.

class xarpes.mdcs.MDCs(intensities, angles, angle_resolution, energy_resolution, temperature, enel, hnuminPhi)[source]

Container for momentum distribution curves (MDCs) and their fits.

This class stores the MDC intensity maps, angular and energy grids, and the aggregated fit results produced by fit_selection().

Parameters:
intensitiesndarray

MDC intensity data. Typically a 2D array with shape (n_energy, n_angle) or a 1D array for a single curve.

anglesndarray

Angular grid corresponding to the MDCs [degrees].

angle_resolutionfloat

Angular step size or effective angular resolution [degrees].

energy_resolutionfloat

Energy resolution associated with the MDCs [eV].

temperature: float

Temperature associated with the band map [K].

enelndarray or float

Electron binding energies of the MDC slices [eV]. Can be a scalar for a single MDC.

hnuminPhifloat

Photon energy minus work function, used to convert enel to kinetic energy [eV].

Attributes:
intensitiesndarray

2D or 3D intensity map (energy × angle).

anglesndarray

Angular axis for the MDCs.

angle_resolutionfloat

Angular resolution (float).

enelndarray or float

Photoelectron binding energies (array-like).

ekinndarray or float

Kinetic energy array: enel + hnuminPhi (computed on the fly).

hnuminPhifloat

Work-function/photon-energy offset.

ekin_rangendarray

Kinetic-energy slices that were fitted.

individual_propertiesdict

Aggregated fitted parameter values and uncertainties per component.

Notes

After calling fit_selection(), individual_properties has the structure:

{
    label: {
        class_name: {
            'label': label,
            '_class': class_name,
            param:       [values per energy slice],
            param_sigma: [1σ per slice or None],
            ...
        }
    }
}

where param is typically one of 'offset', 'slope', 'amplitude', 'peak', 'broadening', and param_sigma stores the corresponding uncertainty for each slice.

property angles

Angular axis for the MDCs.

property angle_resolution

Angular resolution (float).

property energy_resolution

Energy resolution (float).

property temperature

Temperature (float).

property enel

Photoelectron binding energies (array-like). Read-only.

property hnuminPhi

Work-function/photon-energy offset. Read-only.

property ekin

Kinetic energy array: enel + hnuminPhi (computed on the fly).

property intensities

2D or 3D intensity map (energy × angle).

property ekin_range

Kinetic-energy slices that were fitted.

property individual_properties

Aggregated fitted parameter values and uncertainties per component.

Returns:
dict

Nested mapping:

{
    label: {
        class_name: {
            'label': label,
            '_class': class_name,
            <param>:        [values per slice],
            <param>_sigma:  [1σ per slice or None],
            ...
        }
    }
}
energy_check(energy_value)[source]
plot(energy_value=None, energy_range=None, ax=None, **kwargs)[source]

Interactive or static plot with optional slider and full wrapper support. Behavior consistent with Jupyter and CLI based on show / fig_close.

visualize_guess(distributions, energy_value=None, matrix_element=None, matrix_args=None, ax=None)[source]

Notes

Keyword arguments controlling the display of the figure:

kwargs

Meaning

title

Title of the plot (Default: None).

show

True to show the figure (default: True).

savefig

“abc.png” or “abc.eps” to save the figure to a file.

size_kwargs

Dictionary with options passed to fig.set_size_inches e.g. size_kwargs=dict(w=3, h=4)

tight_layout

True to call fig.tight_layout (default: False)

ax_grid

True (False) to add (remove) grid from all axes in fig. Default: None i.e. fig is left unchanged.

ax_annotate

Add labels to subplots e.g. (a), (b). Default: False

fig_close

Close figure. Default: True.

fit_selection(distributions, energy_value=None, energy_range=None, matrix_element=None, matrix_args=None, ax=None, **kwargs)[source]
fit(distributions, energy_value=None, matrix_element=None, matrix_args=None, ax=None)[source]

Notes

Keyword arguments controlling the display of the figure:

kwargs

Meaning

title

Title of the plot (Default: None).

show

True to show the figure (default: True).

savefig

“abc.png” or “abc.eps” to save the figure to a file.

size_kwargs

Dictionary with options passed to fig.set_size_inches e.g. size_kwargs=dict(w=3, h=4)

tight_layout

True to call fig.tight_layout (default: False)

ax_grid

True (False) to add (remove) grid from all axes in fig. Default: None i.e. fig is left unchanged.

ax_annotate

Add labels to subplots e.g. (a), (b). Default: False

fig_close

Close figure. Default: True.

expose_parameters(select_label, fermi_wavevector=None, fermi_velocity=None, bare_mass=None, side=None)[source]

Select and return fitted parameters for a given component label, plus a flat export dictionary containing values and 1σ uncertainties.

Parameters:
select_labelstr

Label to look for among the fitted distributions.

fermi_wavevectorfloat, optional

Optional Fermi wave vector to include.

fermi_velocityfloat, optional

Optional Fermi velocity to include.

bare_massfloat, optional

Optional bare mass to include (used for SpectralQuadratic dispersions).

side{‘left’,’right’}, optional

Optional side selector for SpectralQuadratic dispersions.

Returns:
ekin_rangenp.ndarray

Kinetic-energy grid corresponding to the selected label.

hnuminPhifloat

Photoelectron work-function offset.

energy_resolutionfloat

Energy resolution associated with the extracted self-energy data.

temperaturefloat

Temperature [K] associated with the extracted self-energy data.

labelstr

Label of the selected distribution.

selected_propertiesdict or list of dict

Nested dictionary (or list thereof) containing <param> and <param>_sigma arrays. For SpectralQuadratic components, a scalar center_wavevector is also present.

exported_parametersdict

Flat dictionary of parameters and their uncertainties, plus optional Fermi quantities and side. For SpectralQuadratic components, center_wavevector is included and taken directly from the fitted distribution.