rayoptics.raytr.sampler module
Various generators and utilities for producing 2d distributions
- grid_ray_generator(grid_rng)[source]
Generator function to produce a 2d square regular grid.
- Parameters:
grid_rng – start, stop, num
start – 2d numpy array of lower left grid coords
stop – 2d numpy array of upper right grid coords
num – the number of samples along each axis
- A sample input might be:
grid_start = np.array([-1., -1.]) grid_stop = np.array([1., 1.]) grid_rng = grid_start, grid_stop, num_rays