Skip to content

Commit 7bf8b9b

Browse files
committed
Updated CHANGES.rst & documentation update
1 parent 13c5fa4 commit 7bf8b9b

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ mast
142142
- Expanding ``Cutouts`` functionality to support making Hubble Advanced Product (HAP)
143143
cutouts via HAPCut. [#2613]
144144

145+
- Expanding ``Cutouts`` functionality to support TICA HLSPs now available through
146+
``TesscutClass``. [##2668]
147+
145148
oac
146149
^^^
147150

astroquery/mast/cutouts.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ def get_sectors(self, *, coordinates=None, radius=0*u.deg, product='SPOC', objec
163163

164164
# The Moving Targets service is currently only available for SPOC
165165
if product.upper() != "SPOC":
166-
product = "SPOC"
167-
warnings.warn("Only SPOC is available for moving targets queries. Defaulting to SPOC.", InputWarning)
166+
raise InvalidQueryError("Only SPOC is available for moving targets queries.")
168167

169168
# Check that objectname has been passed in and coordinates
170169
# is not
@@ -291,8 +290,7 @@ def download_cutouts(self, *, coordinates=None, size=5, sector=None, product='SP
291290

292291
# The Moving Targets service is currently only available for SPOC
293292
if product.upper() != "SPOC":
294-
product = "SPOC"
295-
warnings.warn("Only SPOC is available for moving targets queries. Defaulting to SPOC.", InputWarning)
293+
raise InvalidQueryError("Only SPOC is available for moving targets queries.")
296294

297295
# Check that objectname has been passed in and coordinates
298296
# is not
@@ -427,8 +425,7 @@ def get_cutouts(self, *, coordinates=None, size=5, product='SPOC', sector=None,
427425

428426
# The Moving Targets service is currently only available for SPOC
429427
if product.upper() != "SPOC":
430-
product = "SPOC"
431-
warnings.warn("Only SPOC is available for moving targets queries. Defaulting to SPOC.", InputWarning)
428+
raise InvalidQueryError("Only SPOC is available for moving targets queries.")
432429

433430
param_dict['product'] = product.upper()
434431

docs/mast/mast.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ Cutouts
910910

911911
The `~astroquery.mast.TesscutClass.get_cutouts` function takes a product type
912912
("TICA" or "SPOC", but defaults to "SPOC"), coordinate, object name (e.g. "M104" or "TIC 32449963"),
913-
or moving target (e.g. "Eleonora") and cutout size (in pixels or an angular quantity)
913+
or moving target (e.g. "Eleonora") and cutout size (in pixels or an angular quantity, default is 5 pixels)
914914
and returns the cutout target pixel file(s) as a list of `~astropy.io.fits.HDUList` objects.
915915

916916
If the given coordinate/object location appears in more than one TESS sector a target pixel
@@ -921,7 +921,7 @@ Requesting a cutout by coordinate or objectname accesses the
921921
`MAST TESScut API <https://mast.stsci.edu/tesscut/docs/getting_started.html#requesting-a-cutout>`__
922922
and returns a target pixel file, with format described
923923
`here <https://astrocut.readthedocs.io/en/latest/astrocut/file_formats.html#target-pixel-files>`__.
924-
Note that the `product` argument will default to request for SPOC cutouts when
924+
Note that the product argument will default to request for SPOC cutouts when
925925
not explicitly called for TICA.
926926

927927
.. doctest-remote-data::
@@ -930,7 +930,7 @@ not explicitly called for TICA.
930930
>>> from astropy.coordinates import SkyCoord
931931
...
932932
>>> cutout_coord = SkyCoord(107.18696, -70.50919, unit="deg")
933-
>>> hdulist = Tesscut.get_cutouts(coordinates=cutout_coord, size=5)
933+
>>> hdulist = Tesscut.get_cutouts(coordinates=cutout_coord)
934934
>>> hdulist[0].info() # doctest: +IGNORE_OUTPUT
935935
Filename: <class '_io.BytesIO'>
936936
No. Name Ver Type Cards Dimensions Format
@@ -940,26 +940,26 @@ not explicitly called for TICA.
940940

941941
For users with time-sensitive targets who would like cutouts from the latest observations,
942942
we recommend requesting for the TICA product. Using the same target from the example above,
943-
let's request for the TICA cutouts:
943+
this example shows a request for TICA cutouts:
944944

945945
.. doctest-remote-data::
946946

947947
>>> from astroquery.mast import Tesscut
948948
>>> from astropy.coordinates import SkyCoord
949949
...
950950
>>> cutout_coord = SkyCoord(107.18696, -70.50919, unit="deg")
951-
>>> hdulist = Tesscut.get_cutouts(coordinates=cutout_coord, size=5, product='tica')
951+
>>> hdulist = Tesscut.get_cutouts(coordinates=cutout_coord, product='tica')
952952
>>> hdulist[0][0].header['FFI_TYPE'] # doctest: +IGNORE_OUTPUT
953953
'TICA'
954954

955-
The following example will request SPOC cutouts using the `objectname` argument, rather
955+
The following example will request SPOC cutouts using the objectname argument, rather
956956
than a set of coordinates.
957957

958958
.. doctest-remote-data::
959959

960960
>>> from astroquery.mast import Tesscut
961961
...
962-
>>> hdulist = Tesscut.get_cutouts(objectname="TIC 32449963", size=5)
962+
>>> hdulist = Tesscut.get_cutouts(objectname="TIC 32449963")
963963
>>> hdulist[0].info() # doctest: +IGNORE_OUTPUT
964964
Filename: <class '_io.BytesIO'>
965965
No. Name Ver Type Cards Dimensions Format
@@ -990,7 +990,7 @@ simply with either the objectname or coordinates.
990990
1 PIXELS 1 BinTableHDU 150 355R x 16C [D, E, J, 25J, 25E, 25E, 25E, 25E, J, E, E, 38A, D, D, D, D]
991991
2 APERTURE 1 ImageHDU 97 (2136, 2078) int32
992992

993-
Note that the moving targets functionality does not currently support TICA, so the `product`
993+
Note that the moving targets functionality does not currently support TICA, so the product
994994
parameter will always default to SPOC.
995995

996996
.. doctest-remote-data::
@@ -1025,7 +1025,7 @@ pixel file will be produced for each one.
10251025
./tess-s0009-4-1_107.186960_-70.509190_21x15_astrocut.fits
10261026

10271027
The query from the example above defaults to downloading cutouts from SPOC. The following example is a query for
1028-
the same target from above, but with the `products` argument passed as TICA to explicitly request for TICA cutouts,
1028+
the same target from above, but with the product argument passed as TICA to explicitly request for TICA cutouts,
10291029
and because the TICA products are not available for sectors 1-26, we request cutouts from sector 27 rather than sector 9.
10301030

10311031
.. doctest-remote-data::
@@ -1080,7 +1080,7 @@ but are now available for sector 61.
10801080
tica-s0034-1-2 34 1 2
10811081
tica-s0061-1-2 61 1 2
10821082

1083-
The following example will request SPOC cutouts using the `objectname` argument, rather
1083+
The following example will request SPOC cutouts using the objectname argument, rather
10841084
than a set of coordinates.
10851085

10861086
.. doctest-remote-data::

0 commit comments

Comments
 (0)