pad_grid
- hcipy.field.pad_grid(grid, pad_width)[source]
Pad a regularly-spaced or separated grid by adding points on each side.
- Parameters:
- gridGrid
The grid to pad. Must have regular or separated coordinates.
- pad_widthint, tuple of ints, or tuple of tuples of ints
The number of points to pad on each side. If int: the same number of points is padded on all sides in all dimensions. If tuple of 2 ints:
(pad_before, pad_after)for all dimensions. If tuple of tuples:((pad_before_0, pad_after_0), (pad_before_1, pad_after_1), ...)for each dimension.
- Returns:
- Grid
The padded grid.