syned.beamline.shape.DoubleRectangle
- class syned.beamline.shape.DoubleRectangle(x_left1=-0.01, x_right1=0.0, y_bottom1=-0.02, y_top1=0.0, x_left2=-0.01, x_right2=0.01, y_bottom2=-0.001, y_top2=0.02)[source]
Constructor.
- Parameters:
x_left1 (float, optional) – The coordinate (signed) of the minimum (left) along the X axis of rectangle 1.
x_right1 (float, optional) – The coordinate (signed) of the maximum (right) along the X axis of rectangle 1.
y_bottom1 (float, optional) – The coordinate (signed) of the minimum (left) along the Y axis of rectangle 1.
y_top1 (float, optional) – The coordinate (signed) of the maximum (right) along the Y axis of rectangle 1.
x_left2 (float, optional) – The coordinate (signed) of the minimum (left) along the X axis of rectangle 2.
x_right2 (float, optional) – The coordinate (signed) of the maximum (right) along the X axis of rectangle 2.
y_bottom2 (float, optional) – The coordinate (signed) of the minimum (left) along the Y axis of rectangle 2.
y_top2 (float, optional) – The coordinate (signed) of the maximum (right) along the Y axis of rectangle 2.
- __init__(x_left1=-0.01, x_right1=0.0, y_bottom1=-0.02, y_top1=0.0, x_left2=-0.01, x_right2=0.01, y_bottom2=-0.001, y_top2=0.02)[source]
Methods
__init__([x_left1, x_right1, y_bottom1, ...])append_circle(radius[, x_center, y_center])Appends a circle.
append_ellipse(a_axis_min, a_axis_max, ...)Appends an ellipse.
append_patch([patch])Append a patch.
append_polygon(x, y)Appends a polygon.
append_rectangle([x_left, x_right, ...])Appends a rectangle.
duplicate()Returns a copy of the SYNED object instance.
from_hex_tring(hex_string)get_boundaries()Returns a list with the concatenated boundaries of the sotred patches.
get_name_of_patch(index)Returns the name of the patch with a given index.
get_number_of_patches()Returns the number of stored patches.
get_patch(index)Returns the patch corresponding to a given index.
get_patches()Returns a list with the patches.
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.
reset()Removes all existing patches.
set_boundaries([x_left1, x_right1, ...])set_value_from_key_name(key, value)Sets a value using its key value.
to_dictionary()Gets the dictionary with the multiple patch parameters.
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.