echidna.calc package¶
Submodules¶
echidna.calc.constants module¶
echidna.calc.decay module¶
Double beta decay utility converter
Provides a useful tool for converting between different double beta dacay parameters.
-
class
echidna.calc.decay.
DBIsotope
(name, atm_weight_iso, atm_weight_nat, abundance, phase_space, matrix_element, loading=None, outer_radius=None, scint_density=None)[source]¶ Bases:
object
- Class which calculates expected counts for a DBD isotope
- over a given experiment livetime.
Parameters: - name (string) – Name of the isotope.
- atm_weight_iso (float) – Atomic weight of isotope in g/mol.
- atm_weight_nat (float) – Atomic weight of natural element in g/mol.
- abundance (float) – Natural abundance of isotope with 0 to 1 equivalent to 0% to 100%.
- phase_space (float) – Phase space of the isotope.
- matrix_element (float) – Matrix element of the isotope.
- loading (float, optional) – Loading of isotope with 0 to 1
equivalent to 0% to 100%. Default is stored in
echidna.calc.constants
- scint_density (float, optional) – Density of liquid scintillator in
kg/mm^3. Default is stored in
echidna.calc.constants
- outer_radius (float, optional) – Radius of outer container
containing fiducial volume, e.g. AV, in mm. Default is stored in
echidna.calc.constants
Variables: - _name (string) – Name of the isotope.
- _atm_weight_iso (float) – Atomic weight of isotope in g/mol.
- _atm_weight_nat (float) – Atomic weight of natural element in g/mol.
- _abundance (float) – Natural abundance of isotope with 0 to 1 equivalent to 0% to 100%.
- _phase_space (float) – Phase space of the isotope.
- _matrix_element (float) – Matrix element of the isotope.
- _loading (float) – Loading of isotope with 0 to 1 equivalent to 0%
to 100%. Default is stored in
echidna.calc.constants
- _scint_density (float) – Density of liquid scintillator in
kg/mm^3. Default is stored in
echidna.calc.constants
- _outer_radius (float) – Radius of outer container containing
fiducial volume, e.g. AV, in mm. Default is stored in
echidna.calc.constants
Raises: ValueError
– If abundance is < 0. or > 1.ValueError
– Ifouter_radius
is negative or zero.
-
activity_to_counts
(activity, livetime=5.0)[source]¶ Converts activity to number of counts, assuming constant activity.
Parameters: - activity (float) – Initial activity of the isotope in \(years^{-1}\).
- livetime (float, optional) – Amount of years of data taking. Default is 5 years.
Raises: ValueError
– Iflivetime
is not positive and non-zero.Returns: Number of counts.
Return type: float
-
activity_to_half_life
(activity, n_atoms=None)[source]¶ Calculates the half-life of an isotope with a given activity and number of atoms.
Parameters: - activity (float) – Activity of the isotope in
- n_atoms (float, optional) – Number of atoms of an isotope.
Returns: Half-life in years.
Return type: float
-
counts_to_activity
(counts, livetime=5.0)[source]¶ Converts counts to activity, assuming constant activity.
Parameters: - counts (float) – Number of counts.
- livetime (float, optional) – Amount of years of data taking. Default is 5 years.
Raises: ValueError
– Iflivetime
is not positive and non-zero.Returns: Activity of the isotope in \(years^{-1}\).
Return type: float
-
counts_to_eff_mass
(counts, n_atoms=None, livetime=5.0)[source]¶ Converts from signal counts to effective majorana mass.
Parameters: - counts (float) – Number of signal counts within the livetime specified.
- n_atoms (float, optional) – Number of isotope atoms/nuclei that could potentially decay to produce signal.
- livetime (float, optional) – Amount of years of data taking. Default is 5 years.
Raises: ValueError
– Iflivetime
is not positive and non-zero.Returns: Effective majorana mass in eV.
Return type: float
-
counts_to_half_life
(counts, n_atoms=None, livetime=5.0)[source]¶ Converts from signal count to isotope’s half-life.
Parameters: - count (float) – Number of signal counts within the livetime specified.
- n_atoms (float, optional) – Number of isotope atoms/nuclei that could potentially decay to produce signal.
- livetime (float, optional) – Amount of years of data taking. Default is 5 years.
Raises: ValueError
– Iflivetime
is not positive and non-zero.Returns: Isotope’s \(0\nu2\beta\) half-life in years.
Return type: float
-
eff_mass_to_counts
(eff_mass, n_atoms=None, livetime=5.0)[source]¶ Converts from effective majorana mass to signal counts.
Parameters: - eff_mass (float) – Effective majorana mass in eV.
- n_atoms (float, optional) – Number of isotope atoms/nuclei that could potentially decay to produce signal.
- livetime (float, optional) – Amount of years of data taking. Default is 5 years.
Raises: ValueError
– If effective mass is not positive and non-zero.ValueError
– If arg:livetime is not positive and non-zero.
Returns: Expected number of signal counts within the livetime specified.
Return type: float
-
eff_mass_to_half_life
(eff_mass)[source]¶ Converts from effective majorana mass to \(0\nu2\beta\) half-life.
Parameters: eff_mass (float) – Effective majorana mass, in eV. Raises: ValueError
– If effective mass is not positive and non-zero.Returns: \(0\nu2\beta\) half-life, in years. Return type: float
-
get_n_atoms
(loading=None, scint_density=None, target_mass=None, scint_mass=None, outer_radius=None)[source]¶ Calculates the number of atoms of the double-beta isotope.
Set up to follow the full (SNO+-specific) calculation as per SNO+-doc-1728v2 but can look at other scenarios/detectors by overriding the default args.Warning
All args default to SNO+ specific values!
Parameters: - loading (float, optional) – Loading of isotope with 0 to 1 equivalent to 0% to 100%. Default is stored as a class variable.
- scint_density (float, optional) – Density of liquid scintillator in kg/mm^3. Default is stored as a class variable.
- target_mass (float, optional) – Target mass in kg. Calculates a value by default.
- scint_mass (float, optional) – Mass of scintillator in kg. Calculates a value by default.
- outer_radius (float, optional) – Radius of outer container containing fiducial volume, e.g. AV, in mm. Default is stored as a class variable.
Raises: ValueError
– Ifloading
is not between zero and 1.ValueError
– Ifouter_radius
is negative or zero.
Returns: Number of atoms.
Return type: float
-
half_life_to_activity
(half_life, n_atoms=None)[source]¶ - Calculates the activity for an isotope with a given half-life
- and number of atoms.
Parameters: - half_life (float) – Half-life of an isotope in years.
- n_atoms (float, optional) – Number of atoms of an isotope.
Returns: Activity in decays per year.
Return type: float
-
half_life_to_counts
(half_life, n_atoms=None, livetime=5.0)[source]¶ Converts from isotope’s half-life to signal counts.
Parameters: - half_life (float) – Isotope’s \(0\nu2\beta\) half-life in years.
- n_atoms (float, optional) – Number of isotope atoms/nuclei that could potentially decay to produce signal.
- livetime (float, optional) – Amount of years of data taking. Default is 5 years.
Raises: ValueError
– Iflivetime
is not positive and non-zero.Returns: Expected number of counts.
Return type: float