handybeam.translator

File: translator.py

Module handybeam.translator

Contains the handybeam.translator.Translator

Primary contributor: Salvador Catsis

class handybeam.translator.Translator(parent=None)[source]

calls the OpenCL wrapper for the translator functions.

__init__(parent=None)[source]

This method intialises an instance of class Translator.

Parameters:parent (handybeam world) – This is an instance of the handybeam world class.
__repr__

Return repr(self).

__str__

Return str(self).

set_parent(new_parent)[source]

This method changes the parent of an instance of the class Translator.

Parameters:parent (handybeam world) – This is an instance of the handybeam world class.
xy_translate(x_translate, y_translate, plane_height, local_work_size=(1, 1, 1), print_performance_feedback=False)[source]

Calls the OpenCL wrapper mixin class xy_translator which translates a given focal point, created at a height plane_height,by a distance x_translate along the x-axis and y_translate along the y-axis.

Parameters:
  • x_translate (numpy float) – This is the desired distance to translate the focal point along the x-axis.
  • y_translate (numpy float) – This is the desired distance to translate the focal point along the y-axis.
  • plane_height (numpy float) – This is the z-coordinate of the focal point position.
  • local_work_size (tuple) – Tuple containing the local work sizes for the GPU.
  • print_performance_feedback (boolean) – Boolean value determining whether or not to output the GPU performance.
xyz_translate(x_focus, y_focus, z_focus, x_translate, y_translate, z_translate, local_work_size=(1, 1, 1), print_performance_feedback=False)[source]

Calls the OpenCL wrapper mixin class xyz_translator which translates a given focal point, created at a height plane_height, by a distance x_translate along the x-axis and y_translate along the y-axis.

Parameters:
  • x_focus (numpy float) – This is the x-coordinate of the original focal point position.
  • y_focus (numpy float) – This is the y-coordinate of the original focal point position.
  • z_focus (numpy float) – This is the z-coordinate of the original focal point position.
  • x_translate (numpy float) – This is the desired distance to translate the focal point along the x-axis.
  • y_translate (numpy float) – This is the desired distance to translate the focal point along the y-axis.
  • z_translate (numpy float) – This is the desired distance to translate the focal point along the z-axis.
  • local_work_size (tuple) – Tuple containing the local work sizes for the GPU.
  • print_performance_feedback (boolean) – Boolean value determining whether or not to output the GPU performance.

Back to Index

Licence (documentation): Creative Commons CC BY-NC-SA 4.0

Licence (source code): Apache 2.0

EU logo

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 737087.