Skip to content

Commit 519273b

Browse files
committed
checking for limit reached for 2d inputs
1 parent 44611e1 commit 519273b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

astroquery/mast/cutouts.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ def _parse_cutout_size(size, timeout=None, mission=None):
9494
if len(size) > 2:
9595
warnings.warn("Too many dimensions in cutout size, only the first two will be used.",
9696
InputWarning)
97+
98+
# Checking 2d size inputs for the recommended cutout size
99+
if (len(size) == 2) & (mission == 'TESS'):
100+
101+
if np.isscalar(size[0]):
102+
size = size * u.pixel
103+
with u.set_enabled_equivalencies(u.pixel_scale(21 * u.arcsec / u.pixel)):
104+
limit_reached = (size > 30 * u.pixel).any()
105+
97106

98107
# Getting x and y out of the size
99108

0 commit comments

Comments
 (0)