opengate.sources.phidsources ============================ .. py:module:: opengate.sources.phidsources Attributes ---------- .. autoapisummary:: opengate.sources.phidsources.rd opengate.sources.phidsources.pandas Classes ------- .. autoapisummary:: opengate.sources.phidsources.PhotonFromIonDecaySource opengate.sources.phidsources.PhotonIonDecayIsomericTransitionExtractor opengate.sources.phidsources.NumpyArrayHandler Functions --------- .. autoapisummary:: opengate.sources.phidsources.update_tac_activity_ui opengate.sources.phidsources.print_phid_info opengate.sources.phidsources.get_nuclide_from_name opengate.sources.phidsources.get_nuclide_and_direct_progeny opengate.sources.phidsources.get_nuclide_progeny opengate.sources.phidsources.atomic_relaxation_load opengate.sources.phidsources.atomic_relaxation_load_from_data_file_OLD opengate.sources.phidsources.atomic_relaxation_load_from_data_file_NEW1 opengate.sources.phidsources.atomic_relaxation_load_from_data_file opengate.sources.phidsources.atomic_relaxation_load_from_iaea_website opengate.sources.phidsources.atomic_relaxation_get_filename opengate.sources.phidsources.atomic_relaxation_load_from_file opengate.sources.phidsources.atomic_relaxation_store_to_file opengate.sources.phidsources.atomic_relaxation_get_ene_weights_from_df opengate.sources.phidsources.atomic_relaxation_load_all_gammas opengate.sources.phidsources.lc_read_csv opengate.sources.phidsources.isomeric_transition_get_filename opengate.sources.phidsources.isomeric_transition_load opengate.sources.phidsources.isomeric_transition_load_OLD opengate.sources.phidsources.isomeric_transition_store opengate.sources.phidsources.isomeric_transition_store_df_to_file opengate.sources.phidsources.isomeric_transition_load_from_df_file opengate.sources.phidsources.isomeric_transition_get_ene_weights_from_df opengate.sources.phidsources.isomeric_transition_load_from_iaea_website opengate.sources.phidsources.isomeric_transition_load_from_file opengate.sources.phidsources.isomeric_transition_extract_from_ion_decay opengate.sources.phidsources.isomeric_transition_load_all_gammas opengate.sources.phidsources.isomeric_transition_read_g4_data opengate.sources.phidsources.isomeric_transition_read_one_gamma_deex_channel_line opengate.sources.phidsources.get_tac_from_decay opengate.sources.phidsources.gid_build_all_sub_sources opengate.sources.phidsources.gid_build_all_sub_sources_atomic_relaxation opengate.sources.phidsources.gid_build_all_sub_sources_isomeric_transition opengate.sources.phidsources.gid_build_one_sub_source opengate.sources.phidsources.isomeric_transition_get_n_greater_energy Module Contents --------------- .. py:data:: rd .. py:data:: pandas .. py:class:: PhotonFromIonDecaySource(user_info) Bases: :py:obj:`opengate.sources.generic.GenericSource` Manage a set of sources, one for each nuclide gamma lines, for all daughters of the given ion. Each source will have: - activity managed by a TAC, corresponding to the Bateman equation during the time range - spectrum energy line for isomeric transition - spectrum energy line for atomic relaxation (fluo) .. py:attribute:: type_name :value: 'PhotonFromIonDecaySource' .. py:method:: set_default_user_info(user_info) :staticmethod: .. py:method:: __del__() .. py:method:: __getstate__() .. py:attribute:: ui_sub_sources .. py:attribute:: daughters .. py:attribute:: g4_sub_sources :value: [] .. py:attribute:: log .. py:method:: create_g4_source() .. py:method:: initialize(run_timing_intervals) .. py:method:: add_to_source_manager(source_manager) .. py:function:: update_tac_activity_ui(ui, g4_source) .. py:class:: PhotonIonDecayIsomericTransitionExtractor(z, a, verbose=False) For a given ion, extract all possible gamma emission, with corresponding intensity 1. Create a 'fake' gate simulation because G4 engine must be initialized. This is done in a separate process. The function "_get_all_gamma_emissions" is used. 2. From the IonTable all the Decay Channels are extracted -> function '_get_all_decay_channels' 3. For one decay channel, we look all possible excitation levels This is read in the G4 data file G4LEVELGAMMADATA of the corresponding ion -> _get_gammas_for_one_channel -> _get_gammas_for_one_level .. py:attribute:: z .. py:attribute:: a .. py:attribute:: channels :value: None .. py:attribute:: gammas :value: [] .. py:attribute:: verbose .. py:method:: extract() .. py:method:: _get_all_gamma_emissions(sim_engine) .. py:method:: _get_all_decay_channels() .. py:method:: _get_gammas_for_one_channel(channel) .. py:method:: _get_gammas_for_one_level(levels, level, br, p=1, tab='') .. py:method:: _level_daughter_info(d) .. py:function:: print_phid_info(rad_name, br=1.0, tab='') .. py:function:: get_nuclide_from_name(rad_name) .. py:function:: get_nuclide_and_direct_progeny(z, a) .. py:function:: get_nuclide_progeny(nuclide, intensity=1.0, parent=None) .. py:function:: atomic_relaxation_load(nuclide, load_type='local') .. py:function:: atomic_relaxation_load_from_data_file_OLD(nuclide, filename) .. py:function:: atomic_relaxation_load_from_data_file_NEW1(nuclide, filename) .. py:function:: atomic_relaxation_load_from_data_file(nuclide, filename) .. py:function:: atomic_relaxation_load_from_iaea_website(a, rad_name) .. py:function:: atomic_relaxation_get_filename(nuclide_name) .. py:function:: atomic_relaxation_load_from_file(nuclide_name, filename=None) .. py:function:: atomic_relaxation_store_to_file(nuclide_name, df, filename=None) .. py:function:: atomic_relaxation_get_ene_weights_from_df(df) .. py:function:: atomic_relaxation_load_all_gammas(nuclide) .. py:function:: lc_read_csv(url) .. py:function:: isomeric_transition_get_filename(nuclide_name) .. py:function:: isomeric_transition_load(nuclide, filename=None, half_life=None) .. py:function:: isomeric_transition_load_OLD(nuclide, filename=None) .. py:function:: isomeric_transition_store(nuclide_name, data_to_save, filename) .. py:function:: isomeric_transition_store_df_to_file(nuclide_name, df, filename=None) .. py:function:: isomeric_transition_load_from_df_file(nuclide_name, half_life, filename=None) .. py:function:: isomeric_transition_get_ene_weights_from_df(df, half_life) .. py:function:: isomeric_transition_load_from_iaea_website(a, rad_name) .. py:function:: isomeric_transition_load_from_file(filename) .. py:function:: isomeric_transition_extract_from_ion_decay(nuclide, verbose=False) .. py:function:: isomeric_transition_load_all_gammas(nuclide, half_life=None) .. py:function:: isomeric_transition_read_g4_data(z, a, ignore_zero_deex=True) .. py:function:: isomeric_transition_read_one_gamma_deex_channel_line(line) .. py:function:: get_tac_from_decay(ion_name, daughter, start_activity, start_time, end_time, bins) The following will be modified according to the TAC: ui.start_time, ui.end_time, ui.activity. param is ui.tac_from_decay_parameters param is a dict with: - nuclide: a Nuclide object from radioactivedecay module, with the main ion - daughter: the daughter for which we compute the intensity in the time intervals - bins: number of bins for the discretised TAC - run_timing_intervals: is the list of time range from the Simulation .. py:class:: NumpyArrayHandler Bases: :py:obj:`jsonpickle.handlers.BaseHandler` .. py:method:: flatten(obj, data) .. py:method:: restore(obj) .. py:function:: gid_build_all_sub_sources(source) Build all gamma sources for the given nuclide all isomeric transition gammas and all atomic relaxation fluo x-rays .. py:function:: gid_build_all_sub_sources_atomic_relaxation(ui, z, a, debug_first_daughter_only=False) .. py:function:: gid_build_all_sub_sources_isomeric_transition(ui, z, a) Build (or read from file) all isomeric transition gammas for all daughters in the decay .. py:function:: gid_build_one_sub_source(stype, ui, daughter, ene, w, first_nuclide) .. py:function:: isomeric_transition_get_n_greater_energy(nuclide, n)