wofryimpl.beamline.optical_elements.util.s4_optical_surface

S4OpticalSurface — abstract base class for optical surface shapes used in wofryimpl mirror elements.

Functions

write_shadow_surface(s, xx, yy[, outFile])

Write a 2-D height mesh to disk in the SHADOW presurface format.

Classes

S4OpticalSurface()

class wofryimpl.beamline.optical_elements.util.s4_optical_surface.S4OpticalSurface[source]
apply_crystal_diffraction_bragg_symmetric_on_beam(beam, **kwargs)[source]
apply_refraction_on_beam(beam, **kwargs)[source]
apply_specular_reflection_on_beam(beam, **kwargs)[source]
calculate_intercept(XIN, VIN, **kwargs)[source]
duplicate()[source]
get_normal(x, **kwargs)[source]
info()[source]
surface_height(x, y, **kwargs)[source]
write_mesh_file(x, y, filename='surface.dat')[source]
write_mesh_h5file(x, y, filename='surface.h5', subgroup_name='surface_file', overwrite=True)[source]
wofryimpl.beamline.optical_elements.util.s4_optical_surface.write_shadow_surface(s, xx, yy, outFile='presurface.dat')[source]

Write a 2-D height mesh to disk in the SHADOW presurface format.

Parameters:
  • s (numpy.ndarray, shape (Nx, Ny)) – 2-D array of surface heights [m].

  • xx (numpy.ndarray, shape (Nx,)) – Spatial coordinates along the mirror width (sagittal axis) [m].

  • yy (numpy.ndarray, shape (Ny,)) – Spatial coordinates along the mirror length (tangential axis) [m].

  • outFile (str, optional) – Path to the output file. Default 'presurface.dat'.

Returns:

1 on success, 0 on failure.

Return type:

int