srxraylib.metrology.profiles_simulation

This is a collection of functions to simulate profiles that can be used for describing surface errors in optical surfaces

Note that all the functions are dimensionless: therefore use always the same unit in horizontal, vertical, and RMS inputs. Angles are in rad.

Functions:
  • combine_two_transversal_profiles(): combine two profiles into a mesh

  • simulate_gaussian_profile_1D():

  • simulate_fractal_profile_1D():

  • simulate_profile_2D

  • simulate_profile_2D_from_1D

  • create_random_rough_surface_1D(): binding to simulate_gaussian_profile_1D and simulate_fractal_profile_1D

  • create_simulated_1D_file_APS

  • create_simulated_2D_profile_APS

  • create_2D_profile_from_1D

Authors and main contributors:

Luca Rebuffi, Ruben Reininger, Manuel Sanchez del Rio, Xianbo Shi

Functions

combine_two_transversal_profiles(WW_x, WW, ...)

Combine two profiles into a mesh.

create_2D_profile_from_1D(profile_1D_x, ...)

generates a 2-dimensional random rough surface z(x,y) with PSD following a power law. The surface has a power law PSD |f|**(-beta) in both y and x directions.

create_simulated_1D_file_APS([...])

Generates a 1-dimensional random rough surface z(x) with n_surface_points surface points. The surface has a power law PSD |f|**(-beta) where: * beta=power_law_exponent_beta for frequencies < frequency_power_law_match * beta=power_law_exponent_beta for frequencies > frequency_power_law_match. It is a fractal profile if 1<beta<3.

create_simulated_2D_profile_APS([...])

generates a 2-dimensional random rough surface z(x,y) with PSDs following a power law. The surface has a power law PSD |f|**(-beta) in both y and x directions.

simulate_profile_1D([step, mirror_length, ...])

Create a simulated 1D profile.

simulate_profile_1D_fractal([step, npoints, ...])

Generates a 1-dimensional random rough surface f(x) with 'npoint' surface points.

simulate_profile_1D_gaussian([step, ...])

Generates a 1-dimensional random rough surface f(x) with 'npoint' surface points.

simulate_profile_2D([combination, ...])

Combines two 1D simulated (GAUSSIAN or FRACTAL) or EXPERIMENTAL simulated profiles into a single 2D profile or surface.

slopes(z, x, y[, silent, return_only_rms])

This function calculates the slope errors of a surface along the mirror length y and mirror width x.