ptypy.core.xy.raster_scan#

ptypy.core.xy.raster_scan(dy=1.5e-06, dx=1.5e-06, ny=10, nx=10, ang=0.0)#

Generates a raster scan.

Parameters:
  • ny (int) – Number of steps in y (vertical) and x (horizontal) direction x is the fast axis

  • nx (int) – Number of steps in y (vertical) and x (horizontal) direction x is the fast axis

  • dy (float) – Step size (grid spacing) in y and x

  • dx (float) – Step size (grid spacing) in y and x

  • ang (float) – Rotation angle of the raster grid (counterclockwise, in degrees)

Returns:

pos – A (N,2)-array of positions. It is N = (nx+1)*(nx+1)

Return type:

ndarray

Examples

>>> from ptypy.core import xy
>>> from matplotlib import pyplot as plt
>>> pos = xy.raster_scan()
>>> plt.plot(pos[:, 1], pos[:, 0], 'o-'); plt.show()