3.1.2.19. opengate.helpers_transform

3.1.2.19.1. Module Contents

3.1.2.19.1.1. Functions

is_rotation_matrix(R)

https://stackoverflow.com/questions/53808503/how-to-test-if-a-matrix-is-a-rotation-matrix

vec_np_as_g4(v)

vec_g4_as_np(v)

rot_np_as_g4(rot)

rot_g4_as_np(rot)

get_vol_g4_translation(vol)

get_vol_g4_rotation(vol)

get_vol_g4_transform(vol)

get_translation_from_rotation_with_center(rot, center)

get_transform_orbiting(position, axis, angle_deg)

get_transform_world_to_local(vol_name)

repeat_ring(name, start_deg, nb, translation[, axis])

Build a repeater for the given volume name, according to a ring rotation.

repeat_array(name, size, translation)

repeat_array_start(name, start, size, translation)

build_param_repeater(sim, mother_name, ...[, rot])

volume_orbiting_transform(axis, start, end, n, ...)

opengate.helpers_transform.is_rotation_matrix(R)[source]

https://stackoverflow.com/questions/53808503/how-to-test-if-a-matrix-is-a-rotation-matrix

opengate.helpers_transform.vec_np_as_g4(v)[source]
opengate.helpers_transform.vec_g4_as_np(v)[source]
opengate.helpers_transform.rot_np_as_g4(rot)[source]
opengate.helpers_transform.rot_g4_as_np(rot)[source]
opengate.helpers_transform.get_vol_g4_translation(vol)[source]
opengate.helpers_transform.get_vol_g4_rotation(vol)[source]
opengate.helpers_transform.get_vol_g4_transform(vol)[source]
opengate.helpers_transform.get_translation_from_rotation_with_center(rot, center)[source]
opengate.helpers_transform.get_transform_orbiting(position, axis, angle_deg)[source]
opengate.helpers_transform.get_transform_world_to_local(vol_name)[source]
opengate.helpers_transform.repeat_ring(name, start_deg, nb, translation, axis=[0, 0, 1])[source]
Build a repeater for the given volume name, according to a ring rotation.

start_deg must be in degrees nb is the number of repeated positions translation is the initial translation of the volume according to the center axis is the rotation axis

The output is a dict (Box) of all positions (name + translation + rotation) than can be set to the ‘repeat’ member of a volume.

opengate.helpers_transform.repeat_array(name, size, translation)[source]
opengate.helpers_transform.repeat_array_start(name, start, size, translation)[source]
opengate.helpers_transform.build_param_repeater(sim, mother_name, repeated_vol_name, size, translation, rot=None)[source]
opengate.helpers_transform.volume_orbiting_transform(axis, start, end, n, initial_t, initial_rot)[source]