pycroxe.beam#

Beam-on-target processes#

This module contains data classes, queries and functions related to processes of the kind:

projectile + target -> product

Corresponding database tables:

  • beam_processes

  • beam_fit_params

  • beam_fit_coefficients

Data classes#

BeamProcessRecord(projectile, target, ...)

All data needed to indentify beam-on-target processes.

BeamFitRecord(projectile, target, product, ...)

All data needed to evaluate fits of beam-on-target processes.

Database queries#

get_processes(conn[, projectiles, targets, ...])

List all beam-on-target processes stored in the database.

get_descendant_processes_by_projectiles(...)

Return all beam-on-target processes reachable from projectile in initial_projectiles .

get_fits_by_process(conn, projectile, ...[, ...])

Return all the possible fits for the given process, identified by projectile, target, product, product_frame, and sorted according to sort_by.

Cross-sections retrieval#

get_cross_sections_by_projectiles(conn, ...)

Given a certain set of initial projectiles, retrieve all processes necessary to solve the problem of the evolution of the inital species, evaluate the cross-section for each process at each energy value in energies.

Types#

Usage#

If you are trying to solve problems of the like

(1)#\[\frac{d\Gamma_i}{dx}=n(x)\sigma_{ij}\Gamma_j\text{,}\]

either analytically or numerically, your go-to function is pycroxe.beam.get_cross_sections_by_projectiles(), which will retrieve the cross-sections of all the necessary processes to solve your problem, given the initial conditions of the starting projectile species and their energies.

Alternatively, you can get direct access to database queries with functions from section Database queries.

You also get access to classes and type aliases for type hinting in your code.

Notes#

In equation (1) \(\Gamma_i\) and \(\Gamma_j\) are respectively the particle fluxes of the i-th product and the j-th species, while \(\sigma_{ij}\) is the cross-section of the process that trasnforms the j-th projectile into the i-th product. pycroxe.beam.get_cross_sections_by_projectiles() returns a 3-dimensional version of the \(\sigma_{ij}\) tensor, where the extra dimension, set as the first index of the array, represents the provided energy values.

CroXe and this API store and accept energies in eV and cross-section in m². In the case of authors using different units of measurments (usually cm² for cross-sections, and eV/amu or keV for energies), the conversion is handled internally by each fit function registered in pycroxe.fitfunctions.