agepy.spec.photons.QEffScan

class QEffScan(data_files, anode, raw='dld_rd#raw', time_per_step=None, roi=None, model='gaussian', **norm)

Bases: Scan

Scan over grating positions with a spectrum for each step.

Parameters:
data_files: Sequence[str]

List of data files to be processed.

anode: PositionAnode

Anode object from agepy.spec.photons.

raw: str, optional

Path to the raw data in the data files. Default: “dld_rd#raw/0”.

time_per_step: int, optional

Time per step in the scan. Default: None.

**norm

Path to normalization parameters in the h5 data files.

Attributes:
spectra: np.ndarray

Array of the loaded Spectrum objects.

energies: np.ndarray

Array of the scan variable values.

Methods

convert_unit

counts

Get the photon-excitation energy spectrum.

efficiencies

efficiencies_fit

fit_highest_peak

fit_results

interactive

Plot the spectra in an interactive window.

load

Load a scan with pickle.

norm

plot_eff

remove_steps

save

Save a scan with pickle.

set_bkg

set_calib

set_qeff

show_spectra

Plot the spectra in an interactive window.

spectrum_at

Get the spectrum at a specific step.

transform_norm

counts(roi=None)

Get the photon-excitation energy spectrum.

Parameters:
roi: dict, optional

Ignore set region of interest and use the provided one instead.

Returns:
Tuple[np.ndarray, np.ndarray, np.ndarray]

The number of counts (normalized), the respective statistical uncertainties, and the exciting-photon energies.

Return type:

Tuple[ndarray, ndarray, ndarray]

interactive()

Plot the spectra in an interactive window.

static load(filepath)

Load a scan with pickle.

Return type:

Scan

save(filepath)

Save a scan with pickle.

Return type:

None

show_spectra()

Plot the spectra in an interactive window.

spectrum_at(step, edges, roi=None)

Get the spectrum at a specific step.

Return type:

Tuple[ndarray, ndarray]