wofryimpl.beamline.optical_elements.util.s4_conic

S4Conic — conic-section optical surface (sphere, ellipsoid, paraboloid, hyperboloid, plane) for wofryimpl mirrors.

Classes

S4Conic([ccc])

class wofryimpl.beamline.optical_elements.util.s4_conic.S4Conic(ccc=array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]))[source]
apply_crystal_diffraction_bragg_symmetric_on_beam(newbeam)[source]
apply_grating_diffraction_on_beam(newbeam, ruling=[0.0], order=0, f_ruling=0)[source]
apply_refraction_on_beam(newbeam, refraction_index_object, refraction_index_image)[source]
apply_specular_reflection_on_beam(newbeam)[source]
classmethod calculate_ellipsoid_parameters_from_focal_distances(ssour, simag, theta_grazing, verbose=True)[source]
calculate_intercept(XIN, VIN, keep=0)[source]
choose_solution(TPAR1, TPAR2, reference_distance=10.0)[source]
duplicate()[source]
get_coefficients()[source]
get_normal(x2)[source]
height(y=0, x=0, return_solution=0)[source]

Compute the surface height z for given transverse coordinates.

Parameters:
  • y (float or array_like) – Coordinate along the tangential (length) axis [m]. Must be homogeneous with x (both scalars, both vectors, or one scalar and the other a vector).

  • x (float or array_like) – Coordinate along the sagittal (width) axis [m].

  • return_solution (int, optional) –

    Which root of the conic equation to return:

    • 0 (default) — the root closest to zero at the pole.

    • 1 — first root (positive sign).

    • 2 — second root (negative sign).

Returns:

Surface height z(x, y) [m].

Return type:

float or numpy.ndarray

info()[source]

Return a human-readable summary of the conic coefficients.

Returns:

Multi-line string showing the ten conic equation coefficients.

Return type:

str

classmethod initialize_as_ellipsoid_from_focal_distances(p, q, theta1, cylindrical=0, cylangle=0.0, switch_convexity=0)[source]
classmethod initialize_as_hyperboloid_from_focal_distances(p, q, theta1, cylindrical=0, cylangle=0.0, switch_convexity=0)[source]
classmethod initialize_as_paraboloid_from_focal_distances(p, q, theta1, cylindrical=0, cylangle=0.0, switch_convexity=0)[source]
classmethod initialize_as_plane()[source]
classmethod initialize_as_sphere_from_curvature_radius(radius, cylindrical=0, cylangle=0.0, switch_convexity=0)[source]
classmethod initialize_as_sphere_from_focal_distances(p, q, theta1, cylindrical=0, cylangle=0.0, switch_convexity=0)[source]
classmethod initialize_from_coefficients(ccc)[source]
rotation_surface_conic(alpha, axis)[source]
rotation_surface_conic_x(alpha)[source]
rotation_surface_conic_y(alpha)[source]
rotation_surface_conic_z(alpha)[source]
set_coefficients(ccc)[source]
set_cylindrical(CIL_ANG)[source]
set_ellipsoid_from_external_parameters(AXMAJ, AXMIN, ELL_THE)[source]
set_ellipsoid_from_focal_distances(ssour, simag, theta_grazing, verbose=True)[source]
set_hyperboloid_from_focal_distances(SSOUR, SIMAG, theta_grazing, verbose=True)[source]
set_paraboloid_from_focal_distances(SSOUR, SIMAG, theta_grazing, infinity_location='', verbose=True)[source]
set_sphere_from_curvature_radius(rmirr)[source]
set_sphere_from_focal_distances(ssour, simag, theta_grazing, verbose=True)[source]
surface_height(x, y, return_solution=0)[source]
switch_convexity()[source]
translation_surface_conic(x0, axis='x')[source]
translation_surface_conic_x(x0)[source]
translation_surface_conic_y(y0)[source]
translation_surface_conic_z(z0)[source]
vector_reflection(v1, normal)[source]
z_vs_xy(x, y)[source]