1
- .. doctest-skip-all
2
-
3
1
.. _astroquery.cadc :
4
2
5
3
************************
@@ -28,6 +26,7 @@ The CADC hosts a number of collections and
28
26
these collections:
29
27
30
28
.. code-block :: python
29
+ .. doctest-remote-data ::
31
30
32
31
>>> from astroquery.cadc import Cadc
33
32
>>> cadc = Cadc()
@@ -36,8 +35,8 @@ these collections:
36
35
...
37
36
APASS : {'Description': 'The APASS collection at the CADC', 'Bands': ['Optical', 'Infrared', '']}
38
37
BLAST : {'Description': 'The BLAST collection at the CADC', 'Bands': ['', 'Millimeter']}
39
- CFHT : {' Description' : ' The CFHT collection at the CADC' , ' Bands' : [' Infrared|Optical' , ' ' , ' Optical' , ' Infrared' ]}
40
- CFHTMEGAPIPE : {' Description' : ' The CFHTMEGAPIPE collection at the CADC' , ' Bands' : [' Infrared' , ' Optical' ]}
38
+ CFHT : {'Description': 'The CFHT collection at the CADC', 'Bands': ['Infrared|Optical', 'Infrared|Optical|UV ', '', 'Infrared| Optical|UV|EUV|X-ray|Ga ', 'Optical', ' Infrared', 'X-ray|Gamma-ray ']}
39
+ CFHTMEGAPIPE : {'Description': 'The CFHTMEGAPIPE collection at the CADC', 'Bands': ['', 'Infrared|Optical', ' Infrared', 'Optical']}
41
40
CFHTTERAPIX : {'Description': 'The CFHTTERAPIX collection at the CADC', 'Bands': ['Optical', 'Infrared']}
42
41
CFHTWIRWOLF : {'Description': 'The CFHTWIRWOLF collection at the CADC', 'Bands': ['Infrared']}
43
42
CGPS : {'Description': 'The CGPS collection at the CADC', 'Bands': ['Infrared', 'Radio', 'Millimeter', '']}
@@ -63,7 +62,7 @@ these collections:
63
62
TESS : {'Description': 'The TESS collection at the CADC', 'Bands': ['Optical']}
64
63
UKIRT : {'Description': 'The UKIRT collection at the CADC', 'Bands': ['', 'Optical', 'Infrared']}
65
64
VGPS : {'Description': 'The VGPS collection at the CADC', 'Bands': ['Radio']}
66
- VLASS : {' Description' : ' The VLASS collection at the CADC' , ' Bands' : [' ' , ' Radio' ]}
65
+ VLASS : {'Description': 'The VLASS collection at the CADC', 'Bands': ['Radio']}
67
66
XMM : {'Description': 'The XMM collection at the CADC', 'Bands': ['Optical', 'UV', 'X-ray']}
68
67
69
68
@@ -73,35 +72,37 @@ France Hawaii Telescope (CFHT) data for a given region and resolves
73
72
the URLs for downloading the corresponding data.
74
73
75
74
.. code-block :: python
75
+ .. doctest-remote-data ::
76
76
77
77
>>> from astroquery.cadc import Cadc
78
78
>>> cadc = Cadc()
79
79
>>> result = cadc.query_region(' 08h45m07.5s +54d18m00s' , collection = ' CFHT' )
80
80
>>> print (result)
81
- observationURI sequenceNumber metaReadGroups ... accMetaChecksum2 lastModified2 maxLastModified2
82
- ...
83
- ---------------- - -------------- -------------- ... ------------------------------------ ---------------------- - ---------------------- -
84
- caom:CFHT / 2366432 2366432 ... md5:2a6a9b9d399b5ef84899f83206eecd0d 2019 - 01 - 08T10 :03 :36.057 2019 - 01 - 08T10 :17 :16.206
85
- caom:CFHT / 2366188 2366188 ... md5:af8096be4d9d9186b2cc39fb6bd9914c 2019 - 01 - 07T11 :27 :37.922 2019 - 01 - 07T18 :25 :49.914
86
- caom:CFHT / 2480747 2480747 ... md5:c24ace389b760c290a5bf31842fb4ea9 2020 - 09 - 09T12 :47 :39.890 2020 - 09 - 09T12 :47 :39.890
87
- caom:CFHT / 2366188 2366188 ... md5:935330f6f4bb8211eaa8d84c76fbec33 2019 - 02 - 07T12 :41 :55.814 2019 - 11 - 06T08 :37 :00.616
88
- caom:CFHT / 2376828 2376828 ... md5:7c84ae4b76485a28336f03b2b5af18b3 2019 - 03 - 04T08 :19 :23.766 2019 - 03 - 04T10 :55 :53.572
89
- caom:CFHT / 2366432 2366432 ... md5:3bddcbca4ce44a337d6ed2fd7a99507d 2019 - 02 - 07T12 :24 :09.625 2019 - 11 - 06T08 :37 :54.590
90
- caom:CFHT / 2376828 2376828 ... md5:a3e8ccba7bc69d14a07d261d8615cc47 2019 - 04 - 10T22 :14 :33.111 2019 - 11 - 06T08 :56 :14.246
91
- caom:CFHT / 2480747 2480747 ... md5:a7cccd9710cbca222dc8f8b1eedff3b5 2020 - 09 - 09T12 :47 :39.890 2020 - 09 - 09T12 :47 :39.890
92
-
81
+ observationURI sequenceNumber ... accMetaChecksum2
82
+ ...
83
+ ----------------- -------------- ... ------------------------------------
84
+ caom:CFHT/2366432 2366432 ... md5:76a5e97c9d2f726f456c92b6d2303dd3
85
+ caom:CFHT/2366432 2366432 ... md5:eff6ecab03761186d6ce699dff43ddc7
86
+ caom:CFHT/2366188 2366188 ... md5:896250159a7e80eecdad34150201f361
87
+ caom:CFHT/2376828 2376828 ... md5:1c9008a82af8e5b0ed377c8544ded497
88
+ caom:CFHT/2376828 2376828 ... md5:297b56e1f2e80602e0cb0cc901505108
89
+ caom:CFHT/2366188 2366188 ... md5:f0ec6252250a86963a102351c23d0ca7
90
+ caom:CFHT/2480747 2480747 ... md5:a7cccd9710cbca222dc8f8b1eedff3b5
91
+ caom:CFHT/2480747 2480747 ... md5:c24ace389b760c290a5bf31842fb4ea9
92
+
93
+ .. doctest-skip ::
93
94
>>> urls = cadc.get_data_urls(result)
94
95
>>> for url in urls:
95
96
... print (url)
96
97
...
97
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2366432o .fits.fz? RUNID = njvos75ijcw0vo4r
98
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2366188o .fits.fz? RUNID = njvos75ijcw0vo4r
99
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2480747p .fits.fz? RUNID = njvos75ijcw0vo4r
100
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2366188p .fits.fz? RUNID = njvos75ijcw0vo4r
101
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2376828o .fits.fz? RUNID = njvos75ijcw0vo4r
102
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2366432p .fits.fz? RUNID = njvos75ijcw0vo4r
103
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2376828p .fits.fz? RUNID = njvos75ijcw0vo4r
104
- https:// www.cadc- ccda.hia- iha.nrc- cnrc.gc.ca/ data/ pub/ CFHT / 2480747o .fits.fz? RUNID = njvos75ijcw0vo4r
98
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2366432o.fits.fz?RUNID=queoo1qg8y4pgiep
99
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2366432p .fits.fz?RUNID=queoo1qg8y4pgiep
100
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2366188p .fits.fz?RUNID=queoo1qg8y4pgiep
101
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2376828o .fits.fz?RUNID=queoo1qg8y4pgiep
102
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2376828p .fits.fz?RUNID=queoo1qg8y4pgiep
103
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2366188o .fits.fz?RUNID=queoo1qg8y4pgiep
104
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2480747o .fits.fz?RUNID=queoo1qg8y4pgiep
105
+ https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/data/pub/CFHT/2480747p .fits.fz?RUNID=queoo1qg8y4pgiep
105
106
106
107
107
108
The next example queries all the data in the same region and filters
@@ -110,13 +111,15 @@ filtering possible) and resolves the URLs for both the primary and
110
111
auxiliary data (in this case preview files)
111
112
112
113
.. code-block :: python
114
+ .. doctest-remote-data ::
113
115
114
116
>>> from astroquery.cadc import Cadc
115
117
>>> cadc = Cadc()
116
118
>>> result = cadc.query_region(' 08h45m07.5s +54d18m00s' )
117
119
>>> print (len (result))
118
- 3032
119
-
120
+ 3034
121
+
122
+ .. doctest-skip ::
120
123
>>> urls = cadc.get_data_urls(result[result[' target_name' ] == ' Nr3491_1' ],
121
124
... include_auxiliaries= True )
122
125
>>> for url in urls:
@@ -137,13 +140,13 @@ is not resolved. Instead it is matched against the target name in
137
140
the CADC metadata.
138
141
139
142
.. code-block :: python
143
+ .. doctest-remote-data ::
140
144
141
145
>>> from astroquery.cadc import Cadc
142
146
>>> cadc = Cadc()
143
147
>>> result = cadc.query_name(' M31' )
144
148
>>> print (len (result))
145
149
103949
146
-
147
150
>>> result = cadc.query_name(' Nr3491_1' )
148
151
>>> print (result)
149
152
observationURI sequenceNumber metaReadGroups ... accMetaChecksum2 lastModified2 maxLastModified2
@@ -157,6 +160,8 @@ If only a subsection of the FITS file is needed, CADC can query an
157
160
area and resolve the cutout of a result.
158
161
159
162
.. code-block :: python
163
+ .. doctest-skip ::
164
+ .. doctest-remote-data ::
160
165
161
166
>>> from astropy import units as u
162
167
>>> from astroquery.cadc import Cadc
@@ -175,6 +180,8 @@ Alternatively, if the query result is large and data does not need to be
175
180
in memory, lazy access to the downloaded FITS file can be used.
176
181
177
182
.. code-block :: python
183
+ .. doctest-skip ::
184
+ .. doctest-remote-data ::
178
185
179
186
>>> from astropy import units as u
180
187
>>> from astropy.coordinates import SkyCoord
@@ -205,6 +212,8 @@ are needed, the result table can be passed into the
205
212
cutout coordinates and radius.
206
213
207
214
.. code-block :: python
215
+ .. doctest-skip ::
216
+ .. doctest-remote-data ::
208
217
209
218
>>> from astroquery.cadc import Cadc
210
219
>>> from astropy import units as u
@@ -309,6 +318,8 @@ Examples of TAP access
309
318
To get a list of table objects:
310
319
311
320
.. code-block :: python
321
+ .. doctest-remote-data ::
322
+
312
323
313
324
>>> from astroquery.cadc import Cadc
314
325
>>> cadc = Cadc()
@@ -346,6 +357,7 @@ To get a list of table objects:
346
357
To get a single table object:
347
358
348
359
.. code-block :: python
360
+ .. doctest-remote-data ::
349
361
350
362
>>> from astroquery.cadc import Cadc
351
363
>>> cadc = Cadc()
@@ -419,49 +431,43 @@ The results can be saved in memory (default) or in a file.
419
431
Query without saving results in a file:
420
432
421
433
.. code-block :: python
434
+ .. doctest-remote-data ::
422
435
423
436
>>> from astroquery.cadc import Cadc
424
437
>>> cadc = Cadc()
425
438
>>> results = cadc.exec_sync(" SELECT top 100 observationID, intent FROM caom2.Observation" )
426
439
>>> print (results)
427
- observationID intent
428
- ---------------------------- ------ -
429
- C090503_0500 science
430
- c4d_151207_032018_opd_u_v3 science
431
- ct3264072 science
432
- tu558265 science
433
- ct2318747 science
434
- tu1826354 science
435
- c4d_150601_015113_ori science
436
- tu212518 science
437
- k4i_041101_174620_zri science
438
- tu072083 science
439
- psg_170118_012214_ori science
440
- k4n_131022_051755_opd_KXs_v3 science
441
- c15s_080828_031158_ori science
442
- c4d_160214_072405_opi_r_v1 science
443
- ... ...
444
- c4d_150902_000343_opd_i_v1 science
445
- c09i_141005_231309_sri science
446
- kcfs_081028_074111_ori science
447
- tu802011 science
448
- c4d_141122_004603_oow_u_v3 science
449
- c15s_071230_081528_ori science
450
- c15s_070924_203941_zri science
451
- tu1116697 science
452
- ct3429663 science
453
- dao_c182_2020_005631 science
454
- dao_c182_2020_005632 science
455
- C090317_0114 science
456
- cp828585 science
457
- c09i_060720_044639_ori science
458
- GS - 2004A - Q- 27 - 43 - 006 science
440
+ observationID intent
441
+ ----------------------------------------------- -----------
442
+ j8eh03boq science
443
+ j8f635020 science
444
+ jbfkb1peq science
445
+ j8ff06s2q science
446
+ icdx40oxq science
447
+ j8fd13rgq science
448
+ j8ff03020 science
449
+ GN-2014B-SV-101-761-010 science
450
+ j8ff07020 science
451
+ jbfh14020 science
452
+ ... ...
453
+ hst_10476_50_acs_wfc_f850lp_j9fo50ul science
454
+ GS-CAL20181018-10-026-G-BIAS calibration
455
+ GN-2020B-Q-120-40-050 calibration
456
+ GS-CAL20181018-10-021-G-BIAS calibration
457
+ GS-CAL20181018-10-036-G-BIAS calibration
458
+ GS-CAL20181018-10-061-G-BIAS calibration
459
+ icdx13u2q science
460
+ GS-CAL20181117-2-046-G-BIAS calibration
461
+ tess2019357164649-s0020-0000000159539617-0165-s science
462
+ GS-CAL20181117-2-061-G-BIAS calibration
463
+ GS-CAL20181018-10-086-G-BIAS calibration
459
464
Length = 100 rows
460
465
461
466
462
467
Query saving results in a file:
463
468
464
469
.. code-block :: python
470
+ .. doctest-remote-data ::
465
471
466
472
>>> from astroquery.cadc import Cadc
467
473
>>> cadc = Cadc()
@@ -474,6 +480,7 @@ Query saving results in a file:
474
480
A table can be uploaded to the server in order to be used in a query.
475
481
476
482
.. code-block :: python
483
+ .. doctest-remote-data ::
477
484
478
485
>>> from astroquery.cadc import Cadc
479
486
>>> cadc = Cadc()
@@ -501,48 +508,39 @@ The results can be saved in memory (default) or in a file.
501
508
Query without saving results in a file:
502
509
503
510
.. code-block :: python
511
+ .. doctest-skip ::
512
+ .. doctest-remote-data ::
504
513
505
514
>>> from astroquery.cadc import Cadc
506
515
>>> cadc = Cadc()
507
516
>>> job = cadc.create_async(" SELECT TOP 100 observationID, instrument_name, target_name FROM caom2.Observation AS Observation" )
508
517
>>> job.run().wait()
509
518
>>> job.raise_if_error()
510
519
>>> print (job.fetch_result().to_table())
511
- observationID instrument_name target_name
512
- ---------------------------- ---------------- --------------------------------
513
- C090503_0500 CPAPIR SH87
514
- c4d_151207_032018_opd_u_v3 decam Field14
515
- ct3264072 andicam 2227 - 08
516
- tu558265 mosaic_2 xcs0058940301
517
- ct2318747 ccd_spec test
518
- tu1826354 decam B1
519
- c4d_150601_015113_ori decam junk
520
- tu212518 newfirm Mask for K4N09B_20091129_783db2b
521
- k4i_041101_174620_zri ir_imager TEST bias
522
- tu072083 newfirm Mask for K4N07B_20071113_776684b
523
- psg_170118_012214_ori goodman NGC1672
524
- k4n_131022_051755_opd_KXs_v3 newfirm Mask for K4N13B_20131020_89c812c
525
- c15s_080828_031158_ori ccd_spec 082
526
- c4d_160214_072405_opi_r_v1 decam MAGLITES field: 5354 - 01 - r
527
- c4d_141122_004603_oki_u_v3 decam Field4
528
- c4d_140505_000543_opw_VR_v1 decam AiYN1Qv
529
- ... ... ...
530
- c09i_140321_044944_ori ccd_imager twhya filter1 = dia, filter2 = g
531
- c4d_150902_000343_opd_i_v1 decam C6p13c1A
532
- c09i_141005_231309_sri ccd_imager sflat
533
- kcfs_081028_074111_ori ccd_spec HD 22780
534
- tu802011 mosaic_1_1 86326
535
- c4d_141122_004603_oow_u_v3 decam Field4
536
- c15s_071230_081528_ori ccd_spec HD 95578
537
- c15s_070924_203941_zri ccd_spec Bias
538
- tu1116697 mosaic_2 sm43
539
- ct3429663 mosaic_2 test
540
- dao_c182_2020_005631 Newtonian Imager s2020ihc(150 @ 0 )
541
- dao_c182_2020_005632 Newtonian Imager s2020ihc(150 @ 0 )
542
- C090317_0114 CPAPIR 2M1106
543
- cp828585 spartan WISEJ1741 + 2533 x- 6y5
544
- c09i_060720_044639_ori ccd_imager G2239n05d1243
545
- GS - 2004A - Q- 27 - 43 - 006 GMOS - S LMCF4
520
+ observationID intent
521
+ ----------------------------------------------- -----------
522
+ j8eh03boq science
523
+ j8f635020 science
524
+ jbfkb1peq science
525
+ j8ff06s2q science
526
+ icdx40oxq science
527
+ j8fd13rgq science
528
+ j8ff03020 science
529
+ GN-2014B-SV-101-761-010 science
530
+ j8ff07020 science
531
+ jbfh14020 science
532
+ ... ...
533
+ hst_10476_50_acs_wfc_f850lp_j9fo50ul science
534
+ GS-CAL20181018-10-026-G-BIAS calibration
535
+ GN-2020B-Q-120-40-050 calibration
536
+ GS-CAL20181018-10-021-G-BIAS calibration
537
+ GS-CAL20181018-10-036-G-BIAS calibration
538
+ GS-CAL20181018-10-061-G-BIAS calibration
539
+ icdx13u2q science
540
+ GS-CAL20181117-2-046-G-BIAS calibration
541
+ tess2019357164649-s0020-0000000159539617-0165-s science
542
+ GS-CAL20181117-2-061-G-BIAS calibration
543
+ GS-CAL20181018-10-086-G-BIAS calibration
546
544
Length = 100 rows
547
545
548
546
@@ -554,6 +552,8 @@ the job.
554
552
555
553
556
554
.. code-block :: python
555
+ .. doctest-skip ::
556
+ .. doctest-remote-data ::
557
557
558
558
>>> from astroquery.cadc import Cadc
559
559
>>> cadc = Cadc()
@@ -633,6 +633,7 @@ users are applicable for authenticated ones.
633
633
Login with username and password:
634
634
635
635
.. code-block :: python
636
+ .. doctest-skip ::
636
637
637
638
>>> from astroquery.cadc import Cadc
638
639
>>> cadc = Cadc()
@@ -642,6 +643,7 @@ Login with username and password:
642
643
Login with certificate:
643
644
644
645
.. code-block :: python
646
+ .. doctest-skip ::
645
647
646
648
>>> from astroquery.cadc import Cadc
647
649
>>> cadc = Cadc()
@@ -652,6 +654,7 @@ To perform a logout:
652
654
653
655
654
656
.. code-block :: python
657
+ .. doctest-skip ::
655
658
656
659
>>> from astroquery.cadc import Cadc
657
660
>>> cadc = Cadc()
0 commit comments