grid_from_domain

gwcs.wcstools.grid_from_domain(domain)[source]

Deprecated since version 0.8: The grid_from_domain function is deprecated and may be removed in a future version. Use grid_from_bounding_box instead.

Create a grid of input points from the WCS domain.

Parameters:

domain : list of dicts

Domain of this WCS. The format is a list of dictionaries for each axis in the input frame. [{‘lower’: float, ‘upper’: float, ‘includes_lower’: bool, ‘includes_upper’: bool, ‘step’: float}]

The assumption is the list is in order of X, Y [, Z] and the output will be in the same order.

For example, if the domain is

[{‘lower’: 0, ‘upper’: 1623}, {‘lower’: 785, ‘upper’: 835}] then the output will be:

array([[[ 0, 1, 2, …, 1620, 1621, 1622],

[ 0, 1, 2, …, 1620, 1621, 1622], [ 0, 1, 2, …, 1620, 1621, 1622], …, [ 0, 1, 2, …, 1620, 1621, 1622], [ 0, 1, 2, …, 1620, 1621, 1622], [ 0, 1, 2, …, 1620, 1621, 1622]],

[[ 785, 785, 785, …, 785, 785, 785],

[ 786, 786, 786, …, 786, 786, 786], [ 787, 787, 787, …, 787, 787, 787], …, [ 832, 832, 832, …, 832, 832, 832], [ 833, 833, 833, …, 833, 833, 833], [ 834, 834, 834, …, 834, 834, 834]]])

Returns:

x, y : ndarray

Input points.