irradiapy.analysis.analysisdb module

This module contains the AnalysisDB class.

class irradiapy.analysis.analysisdb.AnalysisDB(path)[source]

Bases: Database

SQLite database for storing analysis results.

load_cluster_size_hist(vacancies)[source]

Load cluster size histogram from the database.

Parameters:

vacancies (bool) – Whether the histogram is for vacancies or SIAs.

Returns:

A tuple containing size centers and histogram values.

Return type:

tuple[GenericAlias[double], GenericAlias[double]]

load_cluster_size_hist_fit_errors(vacancies, small)[source]

Load cluster size histogram fit errors from the database.

Fit: power law function.

Parameters:
  • vacancies (bool) – Whether the histogram is for vacancies or SIAs.

  • small (bool) – Whether the fit is for small or large sizes.

Returns:

Fit errors (a, k).

Return type:

tuple[float, float]

load_cluster_size_hist_fit_function(vacancies, small)[source]

Load cluster size histogram fit function from the database.

Fit: power law function.

Parameters:
  • vacancies (bool) – Whether the histogram is for vacancies or SIAs.

  • small (bool) – Whether the fit is for small or large sizes.

Returns:

A function representing the fit.

Return type:

Callable

load_cluster_size_hist_fit_parameters(vacancies, small)[source]

Load cluster size histogram fit parameters from the database.

Fit: power law function.

Parameters:
  • vacancies (bool) – Whether the histogram is for vacancies or SIAs.

  • small (bool) – Whether the fit is for small or large sizes.

Returns:

Fit parameters (a, k).

Return type:

tuple[float, float]

load_clustering_fraction_hist(axis, min_size)[source]

Load clustering fraction histogram from the database.

Parameters:
  • axis (str) – Axis along which the clustering fraction data is calculated (‘x’, ‘y’, or ‘z’).

  • min_size (int) – Minimum cluster size to be considered clustered.

Returns:

A tuple containing depth centers and clustering fractions for SIAs and vacancies.

Return type:

tuple[GenericAlias[double], GenericAlias[double], GenericAlias[double]]

load_depth_dpa_hist(axis, model)[source]

Load depth-dpa histogram data from the database.

Parameters:
  • axis (str) – Axis along which the depth-dpa data is calculated (‘x’, ‘y’, or ‘z’).

  • model (str) – Model name.

Returns:

A tuple containing depth centers and dpa histogram for the specified model.

Return type:

tuple[GenericAlias[double], GenericAlias[double]]

load_depth_dpa_hist_fit_errors(axis, model)[source]

Load depth-dpa histogram fit errors from the database.

Fit: asymmetric lorentzian function.

Parameters:
  • axis (str) – Axis along which the depth-dpa data is calculated (‘x’, ‘y’, or ‘z’).

  • model (str) – Model name.

Returns:

A tuple containing fit errors (x0, sigma, amplitude, asymmetry).

Return type:

tuple[float, float, float, float]

load_depth_dpa_hist_fit_functions(axis, model)[source]

Load depth-dpa histogram fit function from the database.

Parameters:
  • axis (str) – Axis along which the depth-dpa data is calculated (‘x’, ‘y’, or ‘z’).

  • model (str) – Model name.

Returns:

A function representing the fit.

Return type:

Callable

load_depth_dpa_hist_fit_parameters(axis, model)[source]

Load depth-dpa histogram fit parameters from the database.

Fit: asymmetric lorentzian function.

Parameters:
  • axis (str) – Axis along which the depth-dpa data is calculated (‘x’, ‘y’, or ‘z’).

  • model (str) – Model name.

Returns:

A tuple containing fit parameters (x0, sigma, amplitude, asymmetry).

Return type:

tuple[float, float, float, float]

load_depth_ions_hist(axis)[source]

Load depth ions histogram from the database.

Parameters:

axis (str) – Axis along which the depth ions data is calculated (‘x’, ‘y’, or ‘z’).

Returns:

A tuple containing depth centers and histogram values.

Return type:

tuple[GenericAlias[double], GenericAlias[double]]

load_depth_ions_hist_fit_errors(axis)[source]

Load depth ions histogram fit errors from the database.

Fit: asymmetric gaussian function.

Parameters:

axis (str) – Axis along which the depth ions data is calculated (‘x’, ‘y’, or ‘z’).

Returns:

Fit errors (x0, sigma, amplitude, asymmetry).

Return type:

tuple[float, float, float, float]

load_depth_ions_hist_fit_function(axis)[source]

Load depth ions histogram fit function from the database.

Fit: asymmetric gaussian function.

Parameters:

axis (str) – Axis along which the depth ions data is calculated (‘x’, ‘y’, or ‘z’).

Returns:

A function representing the fit.

Return type:

Callable

load_depth_ions_hist_fit_parameters(axis)[source]

Load depth ions histogram fit parameters from the database.

Fit: asymmetric gaussian function.

Parameters:

axis (str) – Axis along which the depth ions data is calculated (‘x’, ‘y’, or ‘z’).

Returns:

Fit parameters (x0, sigma, amplitude, asymmetry).

Return type:

tuple[float, float, float, float]

load_dpa(model)[source]

Load dpa value from the database.

Parameters:

model (str) – Model name.

Returns:

dpa value.

Return type:

float

load_recoil_energies_hist()[source]

Load recoil energies histogram from the database.

Returns:

A tuple containing energy centers and histogram values.

Return type:

tuple[GenericAlias[double], GenericAlias[double]]

load_recoil_energies_hist_fit_errors()[source]

Load recoil energies histogram fit errors from the database.

Fit: power law function.

Returns:

Fit errors (a, k).

Return type:

tuple[float, float]

load_recoil_energies_hist_fit_function()[source]

Load recoil energies histogram fit function from the database.

Fit: power law function.

Returns:

A function representing the fit.

Return type:

Callable

load_recoil_energies_hist_fit_parameters()[source]

Load recoil energies histogram fit parameters from the database.

Fit: power law function.

Returns:

Fit parameters (a, k).

Return type:

tuple[float, float]

save_cluster_size_hist(vacancies, size_centers, hist)[source]

Save cluster size histogram into the database.

Parameters:
  • vacancies (bool) – Whether the histogram is for vacancies or SIAs.

  • size_centers (GenericAlias[double]) – Centers of the size bins.

  • hist (GenericAlias[double]) – Histogram values.

Return type:

None

save_cluster_size_hist_fit_errors(vacancies, small, a, k)[source]

Save cluster size histogram fit errors into the database.

Fit: power law function.

Parameters:
  • vacancies (bool) – Whether the histogram is for vacancies or SIAs.

  • small (bool) – Whether the fit is for small or large sizes.

  • a (float) – Fit error for parameter a.

  • k (float) – Fit error for parameter k.

Return type:

None

save_cluster_size_hist_fit_params(vacancies, small, a, k)[source]

Save cluster size histogram fit parameters into the database.

Fit: power law function.

Parameters:
  • vacancies (bool) – Whether the histogram is for vacancies or SIAs.

  • small (bool) – Whether the fit is for small or large sizes.

  • a (float) – Fit parameter a.

  • k (float) – Fit parameter k.

Return type:

None

save_clustering_fraction_hist(axis, min_size, depth_centers, ifraction, vfraction)[source]

Save clustering fraction histogram into the database.

Parameters:
  • axis (str) – Axis along which the clustering fraction data is calculated (‘x’, ‘y’, or ‘z’).

  • min_size (int) – Minimum cluster size to be considered clustered.

  • depth_centers (GenericAlias[double]) – Centers of the depth bins.

  • ifraction (GenericAlias[double]) – SIA clustering fraction values.

  • vfraction (GenericAlias[double]) – Vacancy clustering fraction values.

Return type:

None

save_depth_dpa_hist(axis, model, depth_centers, hist)[source]

Save depth-dpa histogram into the database.

Parameters:
  • axis (str) – Axis along which the depth-dpa data is calculated (‘x’, ‘y’, or ‘z’).

  • model (str) – Model name.

  • depth_centers (GenericAlias[double]) – Centers of the depth bins.

  • hist (GenericAlias[double]) – Histogram values.

Return type:

None

save_depth_dpa_hist_fit_errors(axis, model, x0, sigma, amplitude, asymmetry)[source]

Save depth-dpa histogram fit errors into the database.

Fit: asymmetric lorentzian function.

Parameters:
  • axis (str) – Axis along which the depth-dpa data is calculated (‘x’, ‘y’, or ‘z’).

  • model (str) – Model name.

  • x0 (float) – Position with maximum value.

  • sigma (float) – Linewidth.

  • amplitude (float) – Maximum amplitude.

  • asymmetry (float) – Asymmetry.

Return type:

None

save_depth_dpa_hist_fit_params(axis, model, x0, sigma, amplitude, asymmetry)[source]

Save depth-dpa histogram fit parameters into the database.

Fit: asymmetric lorentzian function.

Parameters:
  • axis (str) – Axis along which the depth-dpa data is calculated (‘x’, ‘y’, or ‘z’).

  • model (str) – Model name.

  • x0 (float) – Position with maximum value.

  • sigma (float) – Linewidth.

  • amplitude (float) – Maximum amplitude.

  • asymmetry (float) – Asymmetry.

Return type:

None

save_depth_ions_hist(axis, depth_centers, hist)[source]

Save depth ions histogram into the database.

Parameters:
  • axis (str) – Axis along which the depth ions data is calculated (‘x’, ‘y’, or ‘z’).

  • depth_centers (GenericAlias[double]) – Centers of the depth bins.

  • hist (GenericAlias[double]) – Histogram values.

Return type:

None

save_depth_ions_hist_fit_errors(axis, x0, sigma, amplitude, asymmetry)[source]

Save depth ions histogram fit errors into the database.

Fit: asymmetric gaussian function.

Parameters:
  • axis (str) – Axis along which the depth ions data is calculated (‘x’, ‘y’, or ‘z’).

  • x0 (float) – Position with maximum value.

  • sigma (float) – Linewidth.

  • amplitude (float) – Maximum amplitude.

  • asymmetry (float) – Asymmetry.

Return type:

None

save_depth_ions_hist_fit_params(axis, x0, sigma, amplitude, asymmetry)[source]

Save depth ions histogram fit parameters into the database.

Fit: asymmetric gaussian function.

Parameters:
  • axis (str) – Axis along which the depth ions data is calculated (‘x’, ‘y’, or ‘z’).

  • x0 (float) – Position with maximum value.

  • sigma (float) – Linewidth.

  • amplitude (float) – Maximum amplitude.

  • asymmetry (float) – Asymmetry.

Return type:

None

save_dpa(model, dpa)[source]

Save dpa value into the database.

Parameters:
  • model (str) – Model name.

  • dpa (float) – dpa value.

Return type:

None

save_recoil_energies_hist(energy_centers, hist)[source]

Save recoil energies histogram into the database.

Parameters:
  • energy_centers (GenericAlias[double]) – Centers of the energy bins.

  • hist (GenericAlias[double]) – Histogram values.

Return type:

None

save_recoil_energies_hist_fit_errors(a, k)[source]

Save recoil energies histogram fit errors into the database.

Fit: power law function.

Parameters:
  • a (float) – Fit error for parameter a.

  • k (float) – Fit error for parameter k.

Return type:

None

save_recoil_energies_hist_fit_params(a, k)[source]

Save recoil energies histogram fit parameters into the database.

Fit: power law function.

Parameters:
  • a (float) – Fit parameter a.

  • k (float) – Fit parameter k.

Return type:

None