syned.beamline.shape.Sphere
- class syned.beamline.shape.Sphere(radius=1.0, convexity=0)[source]
Defines an spherical surface.
- Parameters:
radius (float) – The sphere radius.
convexity (int (as defined by Convexity), optional) – NONE = -1, UPWARD = 0, DOWNWARD = 1.
Methods
__init__([radius, convexity])create_sphere_from_p_q([p, q, ...])Defines an spherical surface.
create_sphere_from_radius([radius, convexity])Defines an spherical surface.
duplicate()Returns a copy of the SYNED object instance.
from_hex_tring(hex_string)get_convexity()Gets the convexity flag.
Returns the radius of the sphere.
get_radius_from_p_q([p, q, grazing_angle])Calculates the radius of the sphere from factory parameters (1/p+1/q=2/(R sin theta_grazing)))
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.
initialize_from_p_q([p, q, grazing_angle])Defines an spherical surface.
keys()Returns the keys of the supporting doctionary.
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.