crop_grid
- hcipy.field.crop_grid(grid, crop_width)[source]
Crop a regularly-spaced or separated grid by removing points from each side.
- Parameters:
- gridGrid
The grid to crop. Must have regular or separated coordinates.
- crop_widthint, tuple of ints, or tuple of tuples of ints
The number of points to remove from each side. If int: the same number of points is removed from all sides in all dimensions. If tuple of 2 ints:
(crop_before, crop_after)for all dimensions. If tuple of tuples:((crop_before_0, crop_after_0), (crop_before_1, crop_after_1), ...)for each dimension.
- Returns:
- Grid
The cropped grid.