ronchi_mask

lenstest.ronchi.ronchi_mask(RoC, lpm, z_offset, conic, X, Y, mask=False, phi=0)[source]

Create Ronchigram with random points.

This assumes that the point source of light is located at the center of the mirror madius of curvature, RoC.

The Ronchi grating is located at RoC + z_offset and oriented so lines are perpendicular to the x-axis

The conic section is specified by conic:

conic = ∞ for surface that is flat conic > 0 for surface that is an oblate spheroid conic = 0 for surface that is a sphere 0<conic<-1 for surface that is a prolate spheroid conic = -1 for surface that is a paraboloid conic < -1 for surface that is a hyperboloid

Parameters:
  • D – diameter of mirror [mm]

  • RoC – radius of curvature of mirror [mm]

  • lpm – line pairs per mm [1/mm]

  • z_offset – axial z_offset of grating from center of mirror’s RoC [mm]

  • conic – conic constant or Schwartzchild constant [-]

  • X, Y – grid of points to evaluate

  • invert – boolean to draw dark or light areas

Returns:

x, y – masked listed of points to plot