opengate.contrib.phantoms.nemaiec ================================= .. py:module:: opengate.contrib.phantoms.nemaiec Attributes ---------- .. autoapisummary:: opengate.contrib.phantoms.nemaiec.iec_plastic opengate.contrib.phantoms.nemaiec.water opengate.contrib.phantoms.nemaiec.iec_lung opengate.contrib.phantoms.nemaiec.red opengate.contrib.phantoms.nemaiec.blue opengate.contrib.phantoms.nemaiec.gray opengate.contrib.phantoms.nemaiec.transparent Functions --------- .. autoapisummary:: opengate.contrib.phantoms.nemaiec.create_material opengate.contrib.phantoms.nemaiec.add_iec_phantom opengate.contrib.phantoms.nemaiec.add_iec_body opengate.contrib.phantoms.nemaiec.add_iec_central_cylinder opengate.contrib.phantoms.nemaiec.add_iec_all_spheres opengate.contrib.phantoms.nemaiec.add_iec_one_sphere opengate.contrib.phantoms.nemaiec.add_spheres_sources opengate.contrib.phantoms.nemaiec.compute_sphere_activity opengate.contrib.phantoms.nemaiec.compute_total_spheres_activity opengate.contrib.phantoms.nemaiec.dump_spheres_activity opengate.contrib.phantoms.nemaiec.dump_bg_activity opengate.contrib.phantoms.nemaiec.add_one_sphere_source opengate.contrib.phantoms.nemaiec.add_central_cylinder_source opengate.contrib.phantoms.nemaiec.add_background_source opengate.contrib.phantoms.nemaiec.generate_pos_dir_one_sphere opengate.contrib.phantoms.nemaiec.generate_pos_one_sphere opengate.contrib.phantoms.nemaiec.generate_pos_dir_spheres opengate.contrib.phantoms.nemaiec.generate_pos_spheres opengate.contrib.phantoms.nemaiec.get_n_samples_from_ratio opengate.contrib.phantoms.nemaiec.compute_sphere_centers_and_volumes opengate.contrib.phantoms.nemaiec.get_default_sphere_centers_and_volumes_old opengate.contrib.phantoms.nemaiec.get_default_sphere_centers_and_volumes Module Contents --------------- .. py:data:: iec_plastic :value: 'IEC_PLASTIC' .. py:data:: water :value: 'G4_WATER' .. py:data:: iec_lung :value: 'G4_LUNG_ICRP' .. py:data:: red :value: [1, 0.7, 0.7, 0.8] .. py:data:: blue :value: [0.5, 0.5, 1, 0.8] .. py:data:: gray :value: [0.5, 0.5, 0.5, 1] .. py:data:: transparent :value: [0, 0, 0, 0] .. py:function:: create_material(simulation) .. py:function:: add_iec_phantom(simulation, name='iec', check_overlap=False, sphere_starting_angle=False, toggle_sphere_order=False) .. py:function:: add_iec_body(simulation, name, thickness=0.0, thickness_z=0.0) .. py:function:: add_iec_central_cylinder(sim, name, top_interior) .. py:function:: add_iec_all_spheres(simulation, name, thickness_z, starting_angle=False, reverse_order=False) Starting angle : in deg. Indicate the (angle) position of the first smallest sphere. It is 180 deg by default. .. py:function:: add_iec_one_sphere(sim, name, vol, diam, sph_thick, cap_thick, position, thickness_z) .. py:function:: add_spheres_sources(simulation, iec_name, src_name, spheres, activity_Bq_mL, verbose=False, source_type='GenericSource') .. py:function:: compute_sphere_activity(simulation, iec_name, src_name, diam) .. py:function:: compute_total_spheres_activity(simulation, iec_name, src_name) .. py:function:: dump_spheres_activity(simulation, iec_name, src_name) .. py:function:: dump_bg_activity(simulation, iec_name, src_name) .. py:function:: add_one_sphere_source(simulation, iec_name, src_name, diameter, activity_Bq_mL, source_type) .. py:function:: add_central_cylinder_source(simulation, iec_name, src_name, activity_Bq_mL, verbose=False) .. py:function:: add_background_source(simulation, iec_name, src_name, activity_Bq_mL, verbose=False) .. py:function:: generate_pos_dir_one_sphere(center, radius, n, rs=np.random) This function should be useful to generate conditional data for condGAN. It samples the position in a sphere and isotropic direction. The center/radius is the center and radius of the sphere A numpy array of (n,6) is returned. 3 first = position 3 last = direction .. py:function:: generate_pos_one_sphere(center, radius, n, rs=np.random) .. py:function:: generate_pos_dir_spheres(centers, radius, n_samples, shuffle, rs=np.random) This function generate conditional data for condGAN. It samples the position in several spheres, with isotropic direction. The center/radius are the center and radius of the spheres. n_samples is the number of samples per sphere, with a total of n. Samples can be shuffled (by default). A numpy array of (n,6) is returned. .. py:function:: generate_pos_spheres(centers, radius, n_samples, shuffle, rs=np.random) Like generate_pos_dir_spheres, but position only .. py:function:: get_n_samples_from_ratio(n, ratio) For a given proportion of activities (in ratio) and total number of particle n, compute the list of particle for each index. .. py:function:: compute_sphere_centers_and_volumes(sim, name) .. py:function:: get_default_sphere_centers_and_volumes_old() Global spheres centers in the phantom, to avoid using the phantom in same cases. Were computed with 10/06/2022 version. No translation. To be recomputed with compute_sphere_centers_and_volumes .. py:function:: get_default_sphere_centers_and_volumes() Global spheres centers in the phantom, to avoid using the phantom in same cases. Were computed with 23/08/2023 version. No translation. To be recomputed with compute_sphere_centers_and_volumes