syned.beamline.shape.Rectangle
- class syned.beamline.shape.Rectangle(x_left=-0.01, x_right=0.01, y_bottom=-0.02, y_top=0.02)[source]
Constructor.
- Parameters:
x_left (float, optional) – The coordinate (signed) of the minimum (left) along the X axis.
x_right (float, optional) – The coordinate (signed) of the maximum (right) along the X axis.
y_bottom (float, optional) – The coordinate (signed) of the minimum (left) along the Y axis.
y_top (float, optional) – The coordinate (signed) of the maximum (right) along the Y axis.
Methods
__init__([x_left, x_right, y_bottom, y_top])duplicate()Returns a copy of the SYNED object instance.
from_hex_tring(hex_string)Return the rectangle coordinates.
get_value_from_key_name(key)Gets a value using its key value.
info()Get text info of recurrent SYNED objects.
info_recurrent(fd[, prefix])Get text info of recurrent SYNED objects.
keys()Returns the keys of the supporting doctionary.
set_boundaries([x_left, x_right, y_bottom, ...])Sets the rectangle coordinates.
set_value_from_key_name(key, value)Sets a value using its key value.
set_width_and_length([width, length])Sets the rectangle parameters from width and length (centered at the origin).
to_dictionary()Returns a dictionary with the object fields.
to_full_dictionary()Returns a dictionary with the object fields, including other syned objects embedded or list of elements.
to_hex_tring()to_json([file_name])Writes a json file with the SYNED object data.