agepy.spec.photons.Scan
- class Scan(data_files, anode, scan_var=None, raw='dld_rd#raw', time_per_step=None, roi=None, target_density=None, intensity_upstream=None, **norm)
Bases:
BaseScanScan over some variable 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.
- scan_var: str, optional
Path to the step 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:
- anode: PositionAnode
Anode object from agepy.spec.photons.
- spectra: np.ndarray
Array of the loaded Spectrum objects.
- steps: np.ndarray
Array of the scan variable values.
Notes
Very minimal implementation, needs to be expanded
Methods
convert_unitGet the photon-excitation energy spectrum.
Load 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- 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]
- 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]