irradiapy.recoilsdb module
This module contains the RecoilsDB class.
- class irradiapy.recoilsdb.RecoilsDB(path)[source]
Bases:
DatabaseSQLite3 database for SPECTRA-PKA to SRIM events, recoils and ions/vacancies.
- get_nevents()[source]
Get the number of events in the recoils database.
- Returns:
Number of events.
- Return type:
- get_nrecoils()[source]
Get the number of recoils in the recoils database.
- Returns:
Number of recoils.
- Return type:
- insert_ion_vac(event, atom_numb, x, y, z)[source]
Insert an ion or vacancy into the ions_vacs database.
- insert_recoil(event, atomic_number, recoil_energy, x, y, z, cosx, cosy, cosz)[source]
Insert a recoil into the recoils database.
- Parameters:
event (
int) – Original SPECTRA event index (1-based).atomic_number (
int) – Atomic number of the recoil.recoil_energy (
float) – Recoil energy in eV.x (
float) – x-position, in Angstrom.y (
float) – y-position in Angstrom.z (
float) – z-position in Angstrom.cosx (
float) – x-cosine velocity direction.cosy (
float) – y-cosine velocity direction.cosz (
float) – z-cosine velocity direction.
- Return type:
- process_config_events(spectrapka_events_path, exclude_recoils=None)[source]
Transform SPECTRA-PKA config_event.pka file into a SQLite3 table.