agepy.spec.photons.EnergyScan
- class EnergyScan(data_files, anode, energies=None, raw='dld_rd#raw', time_per_step=None, roi=None, target_density=None, intensity_upstream=None, **norm)
Bases:
ScanScan over exciting-photon energies 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.
- energies: str, optional
Path to the energy values in the data files. If None, the keys are used as the values.
- 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.
- target_density: str, optional
Path to the target density in the data files. Default: None.
- intensity_downstream: str, optional
Path to the downstream intensity in the data files. Default: None.
- intensity_upstream: str, optional
Path to the upstream intensity in the data files. Default: None.
- Attributes:
- spectra: np.ndarray
Array of the loaded Spectrum objects.
- energies: np.ndarray
Array of the scan variable values.
Notes
Very minimal implementation, needs to be expanded
Methods
Calibrate the exciting-photon energies.
Calibrate the exciting-photon energies.
Get the spectrum with assigned energies.
convert_unitGet the photon-excitation energy spectrum.
counts_fitLoad a scan with pickle.
normremove_stepsSave a scan with pickle.
set_bkgset_calibset_qeffPlot the spectra in an interactive window.
Get the spectrum at a specific step.
transform_norm- assign_phem(reference, qnum, wl_range, simulation=None)
Calibrate the exciting-photon energies.
- Return type:
None
- assign_phex(reference, qnum, energy_range, simulation=None)
Calibrate the exciting-photon energies.
- Return type:
None
- assigned_spectrum(phex, edges, qeff=True, bkg=True, calib=True)
Get the spectrum with assigned energies.
- Return type:
Tuple[ndarray,ndarray]
- 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]
- phexphem(xedges=None, yedges=None, qeff=True, bkg=True, calib=True)
- Return type:
ndarray
- 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]