syned.beamline.shape.Polygon

class syned.beamline.shape.Polygon(x=[], y=[])[source]

Constructor.

Parameters:
  • x (list, optional) – A list with the X coordinates of the patch vertices.

  • y (list, optional) – A list with the Y coordinates of the patch vertices.

__init__(x=[], y=[])[source]

Methods

__init__([x, y])

check_inside(x, y)

Checks if a set of points are inside the patch (closed as polygon).

check_inside_one_point(x0, y0)

Checks if a single point is inside the patch (closed as polygon).

check_inside_vector(x0, y0)

Checks if a set of points are inside the patch (closed as polygon).

check_outside(x0, y0)

Checks if a set of points are outside the patch (closed as polygon).

duplicate()

Returns a copy of the SYNED object instance.

from_hex_tring(hex_string)

get_boundaries()

Returns the coordinates of the patch vertices.

get_number_of_vertices()

Returns the number of vertices.

get_polygon()

Returns the vertices arranges as a polugon.

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, y)

Sets the coordinates of the patch vertices.

set_value_from_key_name(key, value)

Sets a value using its key value.

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.