@@ -81,6 +81,16 @@ Radius is an optional parameter and the default is 0.2 degrees.
81
81
science SPITZER_SHA SSC Pipeline ... nan 19000016510 0.0
82
82
science SPITZER_SHA SSC Pipeline ... nan 19000016510 0.0
83
83
84
+ Optional parameters must be labeled. For example the query above will produce
85
+ an error if the "radius" field is not specified.
86
+
87
+ .. doctest-remote-data ::
88
+
89
+ >>> obs_table = Observations.query_object(" M8" , " .02 deg" )
90
+ Traceback (most recent call last):
91
+ ...
92
+ TypeError: ObservationsClass.query_object_async() takes 2 positional arguments but 3 were given
93
+
84
94
85
95
Observation Criteria Queries
86
96
----------------------------
@@ -210,6 +220,17 @@ To get a table of metadata associated with observation or product lists use the
210
220
obsID Product Group ID ... Long integer, e.g. 2007590987
211
221
obs_collection Mission ... HST, HLA, SWIFT, GALEX, Kepler, K2...
212
222
223
+ The `~astroquery.mast.ObservationsClass.get_metadata ` function only accepts the strings
224
+ "observations" or "products" as a parameter. Any other string or spelling will result
225
+ in an error.
226
+
227
+ .. doctest-remote-data ::
228
+
229
+ >>> meta_table = Observations.get_metadata(" observation" )
230
+ Traceback (most recent call last):
231
+ ...
232
+ astroquery.exceptions.InvalidQueryError: Unknown query type.
233
+
213
234
214
235
Downloading Data
215
236
================
@@ -391,6 +412,25 @@ which can be changed with the ``local_path`` keyword argument.
391
412
>>> print (result)
392
413
('COMPLETE', None, None)
393
414
415
+ The `~astroquery.mast.ObservationsClass.download_file ` and `~astroquery.mast.ObservationsClass.download_products `
416
+ methods are not interchangeable. Using the incorrect method for either single files or product lists will result
417
+ in an error.
418
+
419
+ .. doctest-remote-data ::
420
+
421
+ >>> result = Observations.download_products(product) # doctest: +IGNORE_OUTPUT
422
+ Traceback (most recent call last):
423
+ ...
424
+ RemoteServiceError: Error converting data type varchar to bigint.
425
+
426
+ .. doctest-remote-data ::
427
+
428
+ >>> result = Observations.download_file(data_products)
429
+ Traceback (most recent call last):
430
+ ...
431
+ TypeError: can only concatenate str (not "Table") to str
432
+
433
+
394
434
Cloud Data Access
395
435
------------------
396
436
Public datasets from the Hubble, Kepler and TESS telescopes are also available for free on Amazon Web Services
@@ -809,6 +849,22 @@ The TESS Input Catalog (TIC), Disk Detective Catalog, and PanSTARRS Catalog can
809
849
J170314.11-035210.4 ... https://talk.diskdetective.org/#/subjects/AWI0005ckv
810
850
811
851
852
+ The `~astroquery.mast.CatalogsClass.query_criteria ` function requires at least one non-positional parameter.
853
+ These parameters are the column names listed in the `field descriptions <https://mast.stsci.edu/api/v0/pages.html >`__
854
+ of the catalog being queried. They do not include objectname, coordinates, or radius. Running a query with only positional
855
+ parameters will result in an error.
856
+
857
+ .. doctest-remote-data ::
858
+
859
+ >>> from astroquery.mast import Catalogs
860
+ ...
861
+ >>> catalog_data = Catalogs.query_criteria(catalog = " Tic" ,
862
+ ... objectname= ' M101' , radius= 1 )
863
+ Traceback (most recent call last):
864
+ ...
865
+ astroquery.exceptions.InvalidQueryError: At least one non-positional criterion must be supplied.
866
+
867
+
812
868
The PanSTARRS catalog also accepts additional parameters to allow for query refinement. These options include column selection,
813
869
sorting, column criteria, page size and page number. Additional information on PanSTARRS queries may be found
814
870
`here <https://catalogs.mast.stsci.edu/docs/panstarrs.html >`__.
@@ -871,6 +927,7 @@ Given an HSC Match ID, return all catalog results.
871
927
410574498 63980492 ... -1.10056e-005 1.56577e-009 1.56577e-009 1.10056e-005
872
928
410574497 63980492 ... -1.10056e-005 1.56577e-009 1.56577e-009 1.10056e-005
873
929
930
+
874
931
HSC spectra accessed through this class as well. `~astroquery.mast.CatalogsClass.get_hsc_spectra `
875
932
does not take any arguments, and simply loads all HSC spectra.
876
933
@@ -921,7 +978,7 @@ TESSCut
921
978
=======
922
979
923
980
TESSCut is MAST's tool to provide full-frame image (FFI) cutouts from the Transiting
924
- Exoplanet Survey Satellite (TESS). The cutouts can be made from either the Science
981
+ Exoplanet Survey Satellite (TESS). The cutouts can be made from either the Science
925
982
Processing Operation's Center (`SPOC <https://archive.stsci.edu/missions-and-data/tess >`__) FFI products,
926
983
or the TESS Image CAlibrator (`TICA <https://archive.stsci.edu/hlsp/tica >`__) high-level science products.
927
984
Cutouts from the TICA products are not available for sectors 1-26,
@@ -958,7 +1015,7 @@ Requesting a cutout by coordinate or objectname accesses the
958
1015
`MAST TESScut API <https://mast.stsci.edu/tesscut/docs/getting_started.html#requesting-a-cutout >`__
959
1016
and returns a target pixel file, with format described
960
1017
`here <https://astrocut.readthedocs.io/en/latest/astrocut/file_formats.html#target-pixel-files >`__.
961
- Note that the product argument will default to request for SPOC cutouts when
1018
+ Note that the product argument will default to request for SPOC cutouts when
962
1019
not explicitly called for TICA.
963
1020
964
1021
.. doctest-remote-data ::
@@ -975,8 +1032,9 @@ not explicitly called for TICA.
975
1032
1 PIXELS 1 BinTableHDU 280 1196R x 12C [D, E, J, 25J, 25E, 25E, 25E, 25E, J, E, E, 38A]
976
1033
2 APERTURE 1 ImageHDU 81 (5, 5) int32
977
1034
978
- For users with time-sensitive targets who would like cutouts from the latest observations,
979
- we recommend requesting for the TICA product. Using the same target from the example above,
1035
+
1036
+ For users with time-sensitive targets who would like cutouts from the latest observations,
1037
+ we recommend requesting for the TICA product. Using the same target from the example above,
980
1038
this example shows a request for TICA cutouts:
981
1039
982
1040
.. doctest-remote-data ::
@@ -1028,16 +1086,16 @@ simply with either the objectname or coordinates.
1028
1086
2 APERTURE 1 ImageHDU 97 (2136, 2078) int32
1029
1087
1030
1088
Note that the moving targets functionality does not currently support TICA, so the product
1031
- parameter will always default to SPOC .
1089
+ parameter will result in an error when set to 'TICA' .
1032
1090
1033
1091
.. doctest-remote-data ::
1034
1092
1035
1093
>>> from astroquery.mast import Tesscut
1036
1094
...
1037
1095
>>> hdulist = Tesscut.get_cutouts(objectname = " Eleonora" , product = ' tica' , moving_target = True , size = 5 , sector = 6 )
1038
- WARNING: InputWarning: Only SPOC is available for moving targets queries. Defaulting to SPOC. [astroquery.mast.cutouts]
1039
- >>> hdulist[ 0 ][ 0 ].header[ ' FFI_TYPE ' ] # doctest: +IGNORE_OUTPUT
1040
- ' SPOC'
1096
+ Traceback (most recent call last):
1097
+ ...
1098
+ astroquery.exceptions.InvalidQueryError: Only SPOC is available for moving targets queries.
1041
1099
1042
1100
The `~astroquery.mast.TesscutClass.download_cutouts ` function takes a product type ("TICA" or "SPOC", but defaults to "SPOC"),
1043
1101
coordinate, cutout size (in pixels or an angular quantity), or object name (e.g. "M104" or "TIC 32449963") and moving target
@@ -1098,8 +1156,8 @@ To access sector information for a particular coordinate, object, or moving targ
1098
1156
tess-s0008-1-1 8 1 1
1099
1157
tess-s0034-1-2 34 1 2
1100
1158
1101
- Note that because of the delivery cadence of the
1102
- TICA high level science products, later sectors will be available sooner with TICA than with
1159
+ Note that because of the delivery cadence of the
1160
+ TICA high level science products, later sectors will be available sooner with TICA than with
1103
1161
SPOC. Also note that TICA is not available for sectors 1-26. The following example is the same
1104
1162
query as above, but for TICA. Notice that products for sector 8 are no longer available,
1105
1163
but are now available for sector 61.
@@ -1152,7 +1210,6 @@ so the query will always default to SPOC.
1152
1210
>>> from astroquery.mast import Tesscut
1153
1211
...
1154
1212
>>> sector_table = Tesscut.get_sectors(objectname = " Ceres" , moving_target = True )
1155
- WARNING: InputWarning: Only SPOC is available for moving targets queries. Defaulting to SPOC. [astroquery.mast.cutouts]
1156
1213
>>> print (sector_table)
1157
1214
sectorName sector camera ccd
1158
1215
-------------- ------ ------ ---
@@ -1390,6 +1447,26 @@ The basic MAST query function returns query results as an `~astropy.table.Table`
1390
1447
Length = 77 rows
1391
1448
1392
1449
1450
+ Many mast services, specifically JWST and Catalog services, require the two principal keywords, 'columns' and 'filters',
1451
+ to list parameters. Positional services will also require right ascension and declination parameters, either in
1452
+ addition to columns and filters or on their own. For example, the cone search service only requires the 'ra' and
1453
+ 'dec' parameters. Using the wrong service parameters will result in an error. Read the
1454
+ `MAST API services documentation <https://mast.stsci.edu/api/v0/_services.html >`__ for more information on valid
1455
+ service parameters.
1456
+
1457
+ .. doctest-remote-data ::
1458
+
1459
+ >>> from astroquery.mast import Mast
1460
+ ...
1461
+ >>> service = ' Mast.Caom.Cone'
1462
+ >>> params = {' columns' : " *" ,
1463
+ ... ' filters' : {}}
1464
+ >>> observations = Mast.service_request(service, params)
1465
+ Traceback (most recent call last):
1466
+ ...
1467
+ astroquery.exceptions.RemoteServiceError: Request Object is Missing Required Parameter : RA
1468
+
1469
+
1393
1470
If the output is not the MAST json result type it cannot be properly parsed into a `~astropy.table.Table `.
1394
1471
In this case, the async method should be used to get the raw http response, which can then be manually parsed.
1395
1472
0 commit comments