syned.beamline.shape.Ellipsoid
- class syned.beamline.shape.Ellipsoid(min_axis=0.0, maj_axis=0.0, p_focus=0.0, convexity=0)[source]
Constructor.
Ellipsoid: Revolution ellipsoid (rotation around major axis). It is defined with three parameters: axes of the ellipse and an additional parameter defining the position of the origin of the mirror. This additional parameter can be “p”, “x0”, “y0” or the angle beta from the ellipsoid center (tan(beta)=y0/x0). For simplicity, we store “p” in syned.
- Parameters:
min_axis (float, optional) – the ellipse minor axis.
maj_axis (float, optional) – the ellipse majot axis.
p_focus (float, optional) – the distance from the first focus (source position) to the mirror pole.
convexity (int (as defined by Convexity), optional) – NONE = -1, UPWARD = 0, DOWNWARD = 1.
References
Conic Surfaces and Transformations for X-Ray Beamline Optics Modeling, Manuel Sanchez del Rio and Kenneth Goldberg (2024) https://arxiv.org/abs/2406.04079
Methods
__init__([min_axis, maj_axis, p_focus, ...])create_ellipsoid_from_axes([min_axis, ...])Creates an ellipsoid.
create_ellipsoid_from_p_q([p, q, ...])Creates an ellipsoid from factory parameters.
duplicate()Returns a copy of the SYNED object instance.
from_hex_tring(hex_string)get_a()Returns a = half of the major axis.
Return the angle from pole to origin (beta).
get_axes()Returns the ellipsoid axes.
get_axis_from_p_q([p, q, grazing_angle])Calculates the ellipse axes from the factory parameters.
get_b()Returns b = half of the minor axis.
get_c()Returns c = sqrt(a^2 - b^2).
get_convexity()Gets the convexity flag.
returns the eccentricity e = c / a.
Returns the grazing angle.
Returns the coordinates of the mirror pole or center.
Returns p (=p_focus).
get_p_q([grazing_angle])Returns p and q for a given grazing angle.
get_p_q_from_axis([min_axis, maj_axis, ...])Calculates the p and q values from axis and grazing angle.
Returns q.
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])Sets the ellipsoid parameters as calculated from the factory parameters.
initialize_from_shadow_parameters([axmaj, ...])Sets the ellipsoid parameters as calculated from the parameters used in SHADOW.
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.