gauge_volume : Creating the gauge volume by the collimator
- c3dp.gaugevol.gauge_volume.angle2span(Verticle_distance, angle)[source]
- Parameters
Verticle_distance
angle
- c3dp.gaugevol.gauge_volume.gauge_volume(square_theta_phy_sample, square_theta_phy_detector, sample_points_x_y)[source]
Calculate the non-zero gauge volume for different positions of the sample.
- Parameters
- square_theta_phy_sample (tuple) – the tuple of theta, phi of the four points of the collimator squared opening at
sample side where each element of the tuple is the array of theta/phi of four points of the collimator for a particular point of the sample. e.g. (array([theta1, theta2, theta3, theta4]), array([phi1, phi2, phi3, phi4]))
- square_theta_phy_detectortuple
the tuple of theta, phi of the four points of the collimator squared opening at detector side where each element of the tuple is the array of theta/phi of four points of the collimator for a particular point of the sample. e.g. (array([theta1, theta2, theta3, theta4]), array([phi1, phi2, phi3, phi4]))
sample_points_x_y (
ndarray
) – array of two coordinates of the sample (x,y)
- Returns
the tuple of positions in the sample (array([y,z])) (where the gaauge volume is non-zero) , corresponding gauge volume (list)
where the position of the sample is an array, i.e. (array([x,y]))
- c3dp.gaugevol.gauge_volume.make_cylindrical_surface(channel_start_from_sample_center, angle, height, length_misalignment_offset=0.0, height_misalignment_offset=0.0)[source]
create a cylinder which axis is along the vertical axis (z- axis)
- Parameters
channel_start_from_sample_center (float) – Longitudinal coordinate of the collimator (radius of the cylinder).
height (float) – Height of the collimator channel ( height of the cylinder).
angle (degree) – angular size of collimator channel ( curvature of the cylinder)
length_misalignment_offset (float) – misalignment offset along the cylinder radius
height_misalignment_offset (float) – misalignment offset along the cylinder axis
- Returns
- Return type
the list of the four points of the collimator channel’s cylindrical opening
- c3dp.gaugevol.gauge_volume.make_square(x, size, length_misalignment_offset=0.0, misalignment_offset=0.0)[source]
create a square with the longitudinal coordinate and the height/width of the collimator .
- Parameters
x (float) – Longitudinal coordinate of the collimator.
size (float) – Height or width of the collimator (collimator is square).
length_misalignment_offset (float) – misalignment offset along the cylinder radius
misalignment_offset (float) – misalignment offset along the vertical and transversal axis
- Returns
- Return type
the list of the four points of the collimator squared opening
- c3dp.gaugevol.gauge_volume.making_plot(sample_points_x_y_nonZero, gauge_volume, y_upper_imit, y_lower_limit, sample_height=10, sample_width=5.0, min_color=None, max_color=None)[source]
Saved the contour of the gauge volume in different positions of the sample in “Figure directory”.
- Parameters
sample_points_x_y_nonZero (
ndarray
) – array of two coordinates of the sample (x,y) points where gauge volume is non-zerogauge_volume (list) – list of the non zero gauge volumes of different positions of the sample
y_upper_imit (float) – the upper limit of Y-axis for the plotting view
y_lower_imit (float) – the lower limit of Y-axis for the plotting view
- c3dp.gaugevol.gauge_volume.non_center_channels(channel_at_center)[source]
create a square with the longitudinal coordinate and the height/width of the collimator .
- Parameters
x (float) – Longitudinal coordinate of the collimator.
size (float) – Height or width of the collimator (collimator is square).
- Returns
- Return type
the list of the four points of the collimator squared opening
- c3dp.gaugevol.gauge_volume.rotation_around_x_axis(vector_point, rotation_angle)[source]
create a vector point after rotating a vector around x axis in 3D space anticlockwise
- vector_pointlist
list of the three coordinates of a point
- rotation_angledegree
angle to rotate the vector.
the array of the rotated vector consisting of three coordinates of the vector
- c3dp.gaugevol.gauge_volume.rotation_around_y_axis(vector_point, rotation_angle)[source]
create a vector point after rotating a vector around y axis in 3D space anticlockwise
- vector_pointlist
list of the three coordinates of a point
- rotation_angledegree
angle to rotate the vector.
the array of the rotated vector consisting of three coordinates of the vector
- c3dp.gaugevol.gauge_volume.rotation_around_z_axis(vector_point, rotation_angle)[source]
create a vector point after rotating a vector around z axis in 3D space anticlockwise
- vector_pointlist
list of the three coordinates of a point
- rotation_angledegree
angle to rotate the vector.
the array of the rotated vector consisting of three coordinates of the vector
- c3dp.gaugevol.gauge_volume.span2angle(distance, distance_fr_sample)[source]
- Parameters
distance
distance_fr_sample
- c3dp.gaugevol.gauge_volume.theta_phi(Collimator_square, sample_point)[source]
Calculate the spherical coordinate( theta and phi) of the four points of the square collimator from the sample.
- Parameters
Collimator_square (list) – List of the four points of the collimator openning cross-section .
sample_point (
ndarray
) – array of three coordinates of the sample (x,y,z).T
- Returns
the tuple of theta, phi of the four points of the collimator squared opening
where each element of the tuple is the array of theta/phi of four points of the
collimator for a particular point of the sample