@@ -291,6 +291,31 @@ Using "obs_id" instead of "obsid" from the previous example will result in the f
291
291
...
292
292
RemoteServiceError: Error converting data type varchar to bigint.
293
293
294
+ To return only unique data products for an observation, use `~astroquery.mast.ObservationsClass.get_unique_product_list `.
295
+
296
+ .. doctest-remote-data ::
297
+ >>> obs = Observations.query_criteria(obs_collection = ' HST' ,
298
+ ... filters= ' F606W' ,
299
+ ... instrument_name= ' ACS/WFC' ,
300
+ ... proposal_id= [' 12062' ],
301
+ ... dataRights= ' PUBLIC' )
302
+ >>> unique_products = Observations.get_unique_product_list(obs)
303
+ INFO: 180 of 370 products were duplicates. Only returning 190 unique product(s). [astroquery.mast.observations]
304
+ INFO: To return all products, use `Observations.get_product_list` [astroquery.mast.observations]
305
+ >>> print (unique_products[:10 ][' dataURI' ])
306
+ dataURI
307
+ -------------------------------------------------------------------
308
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveo_drc.fits
309
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveo_drc.jpg
310
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveo_point-cat.ecsv
311
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveo_segment-cat.ecsv
312
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveo_trl.txt
313
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveoes_drc.fits
314
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveoes_drc.jpg
315
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveoes_flc.fits
316
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveoes_hlet.fits
317
+ mast:HST/product/hst_12062_eo_acs_wfc_f606w_jbeveoes_trl.txt
318
+
294
319
Filtering
295
320
---------
296
321
@@ -481,7 +506,7 @@ This approach is recommended for code brevity. Query criteria are supplied as ke
481
506
... proposal_id= [' 12062' ],
482
507
... dataRights= ' PUBLIC' ,
483
508
... filter_products= {' productSubGroupDescription' : ' DRZ' })
484
- INFO: 2 of 4 products were duplicates. Only downloading 2 unique product(s). [astroquery.mast.observations]
509
+ INFO: 2 of 4 products were duplicates. Only returning 2 unique product(s). [astroquery.mast.observations]
485
510
>>> print (s3_uris)
486
511
['s3://stpubdata/hst/public/jbev/jbeveo010/jbeveo010_drz.fits', 's3://stpubdata/hst/public/jbev/jbevet010/jbevet010_drz.fits']
487
512
>>> Observations.disable_cloud_dataset()
0 commit comments