Skip to content

Commit f2c346c

Browse files
committed
Remove product param from service calls
1 parent 924349a commit f2c346c

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

astroquery/mast/cutouts.py

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,9 @@ def _validate_product(self, product):
152152
-------
153153
InvalidQueryError
154154
If the product is not "SPOC".
155-
156-
Returns
157-
-------
158-
str
159-
The validated product type, converted to uppercase.
160155
"""
161-
product = product.upper()
162-
if product != "SPOC":
156+
if product.upper() != "SPOC":
163157
raise InvalidQueryError("Input product must be SPOC.")
164-
return product
165158

166159
@deprecated_renamed_argument('product', None, since='0.4.11', message='Tesscut no longer supports operations on '
167160
'TESS Image Calibrator (TICA) products. '
@@ -219,11 +212,11 @@ def get_sectors(self, *, coordinates=None, radius=0*u.deg, product='SPOC', objec
219212
response : `~astropy.table.Table`
220213
Sector/camera/chip information for given coordinates/objectname/moving_target.
221214
"""
222-
product = self._validate_product(product)
215+
self._validate_product(product)
223216
self._validate_target_input(coordinates, objectname, moving_target)
224217

225218
if moving_target:
226-
params = {"product": "SPOC", "obj_id": objectname}
219+
params = {"obj_id": objectname}
227220
if mt_type: # Add optional parameter if present
228221
params["obj_type"] = mt_type
229222
service = "mt_sector"
@@ -236,8 +229,7 @@ def get_sectors(self, *, coordinates=None, radius=0*u.deg, product='SPOC', objec
236229
radius = Angle(radius, u.deg)
237230
params = {"ra": coordinates.ra.deg,
238231
"dec": coordinates.dec.deg,
239-
"radius": radius.deg,
240-
"product": "SPOC"}
232+
"radius": radius.deg}
241233
service = "sector"
242234

243235
response = self._service_api_connection.service_request_async(service, params)
@@ -320,10 +312,9 @@ def download_cutouts(self, *, coordinates=None, size=5, sector=None, product='SP
320312
-------
321313
response : `~astropy.table.Table`
322314
"""
323-
product = self._validate_product(product)
315+
self._validate_product(product)
324316
self._validate_target_input(coordinates, objectname, moving_target)
325317
params = _parse_cutout_size(size)
326-
params["product"] = "SPOC"
327318

328319
if sector:
329320
params["sector"] = sector
@@ -431,14 +422,10 @@ def get_cutouts(self, *, coordinates=None, size=5, product='SPOC', sector=None,
431422
-------
432423
response : A list of `~astropy.io.fits.HDUList` objects.
433424
"""
434-
product = product.upper()
435-
if product != "SPOC":
436-
raise InvalidQueryError("Input product must be SPOC.")
437-
product = self._validate_product(product)
425+
self._validate_product(product)
438426
self._validate_target_input(coordinates, objectname, moving_target)
439427

440428
params = _parse_cutout_size(size)
441-
params["product"] = product
442429
if sector:
443430
params["sector"] = sector
444431

0 commit comments

Comments
 (0)