3.1.1.7.2.13. opengate.source.helpers_source

3.1.1.7.2.13.1. Module Contents

3.1.1.7.2.13.1.1. Functions

read_beta_plus_spectra(rad_name)

read the file downloaded from LNHB

compute_bins_density(bins)

Given a list of (energy) bins center, compute the width of each bin.

get_rad_yield(rad_name)

compute_cdf_and_total_yield(data, bins)

Compute the CDF (Cumulative Density Function) of a list of non-uniform energy bins

generate_isotropic_directions(n[, min_theta, ...])

like in G4SPSAngDistribution.cc

get_rad_gamma_energy_spectrum(rad)

set_source_rad_energy_spectrum(source, rad)

3.1.1.7.2.13.1.2. Attributes

source_type_names

source_builders

gate_source_path

all_beta_plus_radionuclides

opengate.source.helpers_source.source_type_names[source]
opengate.source.helpers_source.source_builders[source]
opengate.source.helpers_source.gate_source_path[source]
opengate.source.helpers_source.all_beta_plus_radionuclides = ['F18', 'Ga68', 'Zr89', 'Na22', 'C11', 'N13', 'O15', 'Rb82'][source]
opengate.source.helpers_source.read_beta_plus_spectra(rad_name)[source]

read the file downloaded from LNHB there are 15 lines-long header to skip first column is E(keV) second column is dNtot/dE b+ WARNING : bins width is not uniform (need to scale for density)

opengate.source.helpers_source.compute_bins_density(bins)[source]

Given a list of (energy) bins center, compute the width of each bin.

opengate.source.helpers_source.get_rad_yield(rad_name)[source]
opengate.source.helpers_source.compute_cdf_and_total_yield(data, bins)[source]

Compute the CDF (Cumulative Density Function) of a list of non-uniform energy bins with associated probability. Also return the total probability.

opengate.source.helpers_source.generate_isotropic_directions(n, min_theta=0, max_theta=np.pi, min_phi=0, max_phi=2 * np.pi, rs=np.random)[source]

like in G4SPSAngDistribution.cc

Later : do a version with torch (gpu) instead of np (cpu) ?

opengate.source.helpers_source.get_rad_gamma_energy_spectrum(rad)[source]
opengate.source.helpers_source.set_source_rad_energy_spectrum(source, rad)[source]