grid_from_bounding_box¶
-
gwcs.wcstools.
grid_from_bounding_box
(bounding_box, step=1, center=True)[source]¶ Create a grid of input points from the WCS bounding_box.
Parameters: bounding_box : tuple
ref: prop: bounding_box
step : scalar or tuple
Step size for grid in each dimension. Scalar applies to all dimensions.
center : bool
The bounding_box is in order of X, Y [, Z] and the output will be in the
same order.
Returns: x, y [, z]: ndarray
Grid of points.
Examples
>>> bb = ((-1, 2.9), (6, 7.5)) >>> grid_from_bounding_box(bb, step=(1, .5)) [[[-1. , 0. , 1. , 2. ], [-1. , 0. , 1. , 2. ], [-1. , 0. , 1. , 2. ], [-1. , 0. , 1. , 2. ]],
- [[ 6. , 6. , 6. , 6. ],
- [ 6.5, 6.5, 6.5, 6.5], [ 7. , 7. , 7. , 7. ], [ 7.5, 7.5, 7.5, 7.5]]])