1
- .. doctest-skip-all
2
-
3
1
.. _astroquery.ned :
4
2
5
3
******************************
@@ -15,21 +13,23 @@ and spectra queries on the other hand return the results as a list of
15
13
`~astropy.io.fits.HDUList ` objects. Below are some working examples that
16
14
illustrate common use cases.
17
15
16
+
18
17
Query an object
19
18
---------------
20
19
21
20
This may be used to query the object *by name * from the NED service. For
22
21
instance if you want to query NGC 224
23
22
24
- .. code-block :: python
23
+ .. doctest-remote-data ::
25
24
26
25
>>> from astroquery.ned import Ned
27
26
>>> result_table = Ned.query_object(" NGC 224" )
28
27
>>> print (result_table) # an astropy.table.Table
29
-
30
- No. Object Name RA(deg) ... Redshift Points Diameter Points Associations
28
+ No. Object Name RA ... Redshift Points Diameter Points Associations
29
+ degrees ...
31
30
--- ----------- ---------- ... --------------- --------------- ------------
32
- 1 MESSIER 031 10.68479 ... 26 7 2
31
+ 1 MESSIER 031 10.68479 ... 37 7 2
32
+
33
33
34
34
Query a region
35
35
--------------
@@ -43,38 +43,32 @@ be specified as a string in which case it will be parsed using
43
43
arcmin. Another optional parameter is the equinox if coordinates are
44
44
specified. By default this is J2000.0 but can also be set to B1950.0.
45
45
46
- .. code-block :: python
46
+ .. doctest-remote-data ::
47
47
48
48
>>> from astroquery.ned import Ned
49
49
>>> import astropy.units as u
50
50
>>> result_table = Ned.query_region(" 3c 273" , radius = 0.05 * u.deg)
51
51
>>> print (result_table)
52
+ No. Object Name RA ... Diameter Points Associations
53
+ degrees ...
54
+ --- -------------------------- ---------- ... --------------- ------------
55
+ 1 WISEA J122855.03+020309.1 187.22917 ... 0 0
56
+ 2 SSTSL2 J122855.02+020313.7 187.22925 ... 0 0
57
+ 3 SSTSL2 J122855.23+020341.5 187.23013 ... 0 0
58
+ 4 SSTSL2 J122855.36+020346.9 187.23068 ... 0 0
59
+ ... ... ... ... ... ...
60
+ 863 SSTSL2 J122918.24+020330.7 187.326 ... 0 0
61
+ 864 SDSS J122918.38+020323.4 187.3266 ... 4 0
62
+ 865 SSTSL2 J122918.52+020338.9 187.32718 ... 0 0
63
+ 866 SSTSL2 J122918.64+020326.7 187.32767 ... 0 0
64
+ Length = 866 rows
52
65
53
- No. Object Name ... Diameter Points Associations
54
- -- - ------------------------ ... -------------- - ------------
55
- 1 3C 273 :[PWC2011 ] 3640 ... 0 0
56
- 2 3C 273 :[PWC2011 ] 3592 ... 0 0
57
- 3 3C 273 :[PWC2011 ] 3593 ... 0 0
58
- 4 3C 273 :[PWC2011 ] 3577 ... 0 0
59
- 5 SDSS J122856.35+ 020325.3 ... 3 0
60
- 6 3C 273 :[PWC2011 ] 3553 ... 0 0
61
- 7 3C 273 :[PWC2011 ] 3544 ... 0 0
62
- 8 3C 273 :[PWC2011 ] 3521 ... 0 0
63
- ... ... ... ... ...
64
- 346 3C 273 :[PWC2011 ] 2370 ... 0 0
65
- 347 SDSS J122917.00+ 020436.3 ... 4 0
66
- 348 3C 273 :[PWC2011 ] 2338 ... 0 0
67
- 349 3C 273 :[PWC2011 ] 2349 ... 0 0
68
- 350 SDSS J122917.52+ 020301.5 ... 4 0
69
- 351 3C 273 :[PWC2011 ] 2326 ... 0 0
70
- 352 SDSS J122917.72+ 020356.8 ... 3 0
71
- 353 SDSS J122918.38+ 020323.4 ... 4 0
72
66
73
67
Instead of using the name, the target may also be specified via
74
68
coordinates. Any of the coordinate systems available in `astropy.coordinates `
75
69
may be used (ICRS, Galactic, FK4, FK5). Note also the use of the equinox keyword argument:
76
70
77
- .. code-block :: python
71
+ .. doctest-remote-data ::
78
72
79
73
>>> from astroquery.ned import Ned
80
74
>>> import astropy.units as u
@@ -83,14 +77,20 @@ may be used (ICRS, Galactic, FK4, FK5). Note also the use of the equinox keyword
83
77
... unit= (u.deg, u.deg), frame= ' fk4' )
84
78
>>> result_table = Ned.query_region(co, radius = 0.1 * u.deg, equinox = ' B1950.0' )
85
79
>>> print (result_table)
80
+ No. Object Name RA ... Diameter Points Associations
81
+ degrees ...
82
+ --- ------------------------- ---------- ... --------------- ------------
83
+ 1 WISEA J035137.90+384313.7 57.90793 ... 0 0
84
+ 2 WISEA J035138.59+384305.6 57.91062 ... 0 0
85
+ 3 WISEA J035139.28+384324.4 57.91371 ... 0 0
86
+ 4 WISEA J035139.77+384507.4 57.91572 ... 0 0
87
+ ... ... ... ... ... ...
88
+ 631 WISEA J035237.78+384519.3 58.15743 ... 0 0
89
+ 632 WISEA J035238.62+384431.9 58.16083 ... 0 0
90
+ 633 WISEA J035238.74+384352.1 58.16145 ... 0 0
91
+ 634 WISEA J035238.84+384437.0 58.16177 ... 0 0
92
+ Length = 634 rows
86
93
87
- No. Object Name ... Diameter Points Associations
88
- -- - ---------------------- - ... -------------- - ------------
89
- 1 2MASX J03514350+ 3841573 ... 2 0
90
- 2 2MASX J03514563+ 3839573 ... 2 0
91
- 3 NVSS J035158+ 384747 ... 0 0
92
- 4 2MASX J03521115+ 3849288 ... 2 0
93
- 5 2MASX J03521844+ 3840179 ... 2 0
94
94
95
95
Query in the IAU format
96
96
^^^^^^^^^^^^^^^^^^^^^^^
@@ -104,19 +104,25 @@ queries). It defaults to ``B1950`` but again it may be set to ``J2000.0``. Note
104
104
that Ned report results by searching in a 15 arcmin radius around the specified
105
105
target.
106
106
107
- .. code-block :: python
107
+ .. doctest-remote-data ::
108
108
109
109
>>> from astroquery.ned import Ned
110
110
>>> result_table = Ned.query_region_iau(' 1234-423' , frame = ' SuperGalactic' , equinox = ' J2000.0' )
111
111
>>> print (result_table)
112
+ No. Object Name RA ... Diameter Points Associations
113
+ degrees ...
114
+ --- ------------------------- ---------- ... --------------- ------------
115
+ 1 WISEA J123639.37-423822.9 189.16406 ... 0 0
116
+ 2 WISEA J123639.47-423656.3 189.16458 ... 0 0
117
+ 3 WISEA J123639.61-423637.9 189.16506 ... 0 0
118
+ 4 WISEA J123639.91-423709.9 189.1663 ... 0 0
119
+ ... ... ... ... ... ...
120
+ 760 2MASS J12374631-4236174 189.44299 ... 0 0
121
+ 761 WISEA J123746.44-423727.9 189.44359 ... 0 0
122
+ 762 WISEA J123746.48-423838.1 189.4437 ... 0 0
123
+ 763 WISEA J123747.07-423742.9 189.44616 ... 0 0
124
+ Length = 763 rows
112
125
113
- No. Object Name RA(deg) ... Diameter Points Associations
114
- -- - ---------------------- - ---------- ... -------------- - ------------
115
- 1 SUMSS J123651- 423554 189.21425 ... 0 0
116
- 2 SUMSS J123658- 423457 189.245 ... 0 0
117
- 3 SUMSS J123711- 424119 189.29663 ... 0 0
118
- 4 2MASX J12373141- 4239342 189.38083 ... 2 0
119
- 5 2MASX J12373567- 4239122 189.39908 ... 2 0
120
126
121
127
Query a reference code for objects
122
128
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -125,42 +131,36 @@ These queries can be used to retrieve all objects that appear in the specified
125
131
19 digit reference code. These are similar to the
126
132
:meth: `~astroquery.simbad.SimbadClass.query_bibobj ` queries.
127
133
128
- .. code-block :: python
134
+ .. doctest-remote-data ::
129
135
130
136
>>> from astroquery.ned import Ned
131
137
>>> result_table = Ned.query_refcode(' 1997A&A...323...31K' )
132
138
>>> print (result_table)
139
+ No. Object Name RA ... Diameter Points Associations
140
+ degrees ...
141
+ --- ------------------------- ---------- ... --------------- ------------
142
+ 1 NGC 0262 12.19642 ... 8 0
143
+ 2 NGC 0449 19.0302 ... 7 0
144
+ 3 NGC 0591 23.38028 ... 7 0
145
+ 4 UGC 01214 25.99084 ... 7 0
146
+ ... ... ... ... ... ...
147
+ 33 WISEA J202325.39+113134.6 305.85577 ... 2 0
148
+ 34 UGC 12149 340.28163 ... 8 0
149
+ 35 MRK 0522 345.07954 ... 4 0
150
+ 36 NGC 7674 351.98635 ... 8 0
151
+ Length = 36 rows
133
152
134
- No. Object Name RA(deg) ... Diameter Points Associations
135
- -- - ---------------------- - ---------- ... -------------- - ------------
136
- 1 NGC 0262 12.19642 ... 8 0
137
- 2 NGC 0449 19.0302 ... 7 0
138
- 3 NGC 0591 23.38028 ... 7 0
139
- 4 UGC 01214 25.99084 ... 7 0
140
- 5 2MASX J01500266- 0725482 27.51124 ... 2 0
141
- 6 MESSIER 077 40.66963 ... 8 0
142
- 7 MRK 0599 41.94759 ... 6 0
143
- 8 MRK 1058 42.46596 ... 4 0
144
- ... ... ... ... ... ...
145
- 30 NGC 5643 218.16977 ... 18 0
146
- 31 SBS 1439 + 537 220.1672 ... 2 3
147
- 32 MRK 1388 222.65772 ... 6 0
148
- 33 2MASX J20232535+ 1131352 305.85577 ... 2 0
149
- 34 UGC 12149 340.28163 ... 8 0
150
- 35 MRK 0522 345.07954 ... 4 0
151
- 36 NGC 7674 351.98635 ... 8 0
152
153
153
154
Image and Spectra Queries
154
155
^^^^^^^^^^^^^^^^^^^^^^^^^
155
156
156
157
The image queries return a list of `~astropy.io.fits.HDUList ` objects for the
157
158
specified name. For instance:
158
159
159
- .. code-block :: python
160
+ .. doctest-remote-data ::
160
161
161
162
>>> from astroquery.ned import Ned
162
- >> > images = Ned.get_images(" m1" )
163
-
163
+ >>> images = Ned.get_images(" m1" ) # doctest: +IGNORE_OUTPUT
164
164
Downloading http://ned.ipac.caltech.edu/dss1B2/Bb/MESSIER_001:I:103aE:dss1.fits.gz
165
165
|===========================================| 32k/ 32k (100.00%) 00s
166
166
Downloading http://ned.ipac.caltech.edu/img5/1995RXCD3.T...0000C/p083n22a:I:0.1-2.4keV:cop1995.fits.gz
@@ -171,9 +171,7 @@ specified name. For instance:
171
171
|===========================================| 52k/ 52k (100.00%) 01s
172
172
Downloading http://ned.ipac.caltech.edu/img5/1998RXCD8.T...0000C/h083n22a:I:0.1-2.4keV:cps1998.fits.gz
173
173
|===========================================| 35k/ 35k (100.00%) 00s
174
-
175
- >> > images # may be used to do further processing on individual cutouts
176
-
174
+ >>> images # doctest: +IGNORE_OUTPUT
177
175
[[<astropy.io.fits.hdu.image.PrimaryHDU at 0x4311890>],
178
176
[<astropy.io.fits.hdu.image.PrimaryHDU at 0x432b350>],
179
177
[<astropy.io.fits.hdu.image.PrimaryHDU at 0x3e9c5d0>],
@@ -182,49 +180,47 @@ specified name. For instance:
182
180
183
181
To get the URLs of the downloadable FITS images:
184
182
185
- .. code-block :: python
183
+ .. doctest-remote-data ::
186
184
187
185
>>> from astroquery.ned import Ned
188
186
>>> image_list = Ned.get_image_list(" m1" )
189
- >> > image_list
190
-
187
+ >>> image_list # doctest: +NORMALIZE_WHITESPACE
191
188
['http://ned.ipac.caltech.edu/dss1B2/Bb/MESSIER_001:I:103aE:dss1.fits.gz',
192
- ' http://ned.ipac.caltech.edu/img5/1995RXCD3.T...0000C/p083n22a:I:0.1-2.4keV:cop1995.fits.gz' ,
193
- ' http://ned.ipac.caltech.edu/img5/1996RXCD6.T...0000C/p083n22a:I:0.1-2.4keV:cps1996.fits.gz' ,
194
- ' http://ned.ipac.caltech.edu/img5/1995RXCD3.T...0000C/p084n22a:I:0.1-2.4keV:cop1995.fits.gz' ,
195
- ' http://ned.ipac.caltech.edu/img5/1998RXCD8.T...0000C/h083n22a:I:0.1-2.4keV:cps1998.fits.gz' ]
189
+ 'http://ned.ipac.caltech.edu/img/1995RXCD3.T...0000C/p084n22a:I:0.1-2.4keV:cop1995.fits.gz',
190
+ 'http://ned.ipac.caltech.edu/img/1996RXCD6.T...0000C/p083n22a:I:0.1-2.4keV:cps1996.fits.gz',
191
+ 'http://ned.ipac.caltech.edu/img/1998RXCD8.T...0000C/h083n22a:I:0.1-2.4keV:cps1998.fits.gz',
192
+ 'http://ned.ipac.caltech.edu/img/1995RXCD3.T...0000C/p083n22a:I:0.1-2.4keV:cop1995.fits.gz']
193
+
196
194
197
195
Spectra can also be fetched in the same way:
198
196
199
- .. code-block :: python
197
+ .. doctest-remote-data ::
200
198
201
199
>>> from astroquery.ned import Ned
202
- >> > spectra = Ned.get_spectra(' 3c 273' )
203
-
200
+ >>> spectra = Ned.get_spectra(' 3c 273' ) # doctest: +IGNORE_OUTPUT
204
201
Downloading http://ned.ipac.caltech.edu/spc1/2009A+A...495.1033B/3C_273:S:B:bcc2009.fits.gz
205
202
|===========================================| 7.8k/7.8k (100.00%) 00s
206
203
Downloading http://ned.ipac.caltech.edu/spc1/1992ApJS...80..109B/PG_1226+023:S:B_V:bg1992.fits.gz
207
204
|===========================================| 5.0k/5.0k (100.00%) 00s
208
205
Downloading http://ned.ipac.caltech.edu/spc1/2009A+A...495.1033B/3C_273:S:RI:bcc2009.fits.gz
209
206
|===========================================| 9.4k/9.4k (100.00%) 00s
210
-
211
- >> > spectra
212
-
207
+ >>> spectra # doctest: +IGNORE_OUTPUT
213
208
[[<astropy.io.fits.hdu.image.PrimaryHDU at 0x41b4190>],
214
209
[<astropy.io.fits.hdu.image.PrimaryHDU at 0x41b0990>],
215
210
[<astropy.io.fits.hdu.image.PrimaryHDU at 0x430a450>]]
216
211
212
+
217
213
Similarly the list of URLs for spectra of a particular object may be fetched:
218
214
219
- .. code-block :: python
215
+ .. doctest-remote-data ::
220
216
221
217
>>> from astroquery.ned import Ned
222
- >> > image_list = Ned.get_image_list(" 3c 273" , item = ' spectra' )
223
- >> > image_list
218
+ >>> spectra_list = Ned.get_image_list(" 3c 273" , item = ' spectra' )
219
+ >>> spectra_list
220
+ ['http://ned.ipac.caltech.edu/spc1/1992/1992ApJS...80..109B/PG_1226+023:S:B_V:bg1992.fits.gz',
221
+ 'http://ned.ipac.caltech.edu/spc1/2009/2009A+A...495.1033B/3C_273:S:B:bcc2009.fits.gz',
222
+ 'http://ned.ipac.caltech.edu/spc1/2009/2009A+A...495.1033B/3C_273:S:RI:bcc2009.fits.gz']
224
223
225
- [' http://ned.ipac.caltech.edu/spc1/2009A+A...495.1033B/3C_273:S:B:bcc2009.fits.gz' ,
226
- ' http://ned.ipac.caltech.edu/spc1/1992ApJS...80..109B/PG_1226+023:S:B_V:bg1992.fits.gz' ,
227
- ' http://ned.ipac.caltech.edu/spc1/2009A+A...495.1033B/3C_273:S:RI:bcc2009.fits.gz' ]
228
224
229
225
Fetching other data tables for an object
230
226
----------------------------------------
@@ -235,26 +231,25 @@ queries. These take a keyword argument ``table``, which may be set to one of
235
231
instance the ``table=photometry `` will fetch all the relevant photometric data
236
232
for the specified object. We look at a simple example:
237
233
238
- .. code-block :: python
234
+ .. doctest-remote-data ::
239
235
240
236
>>> from astroquery.ned import Ned
241
237
>>> result_table = Ned.get_table(" 3C 273" , table = ' positions' )
242
238
>>> print (result_table)
239
+ No. RA ... Published Frequence Mode Qualifiers
240
+ ...
241
+ --- -------------- ... ------------------------ -------------------------
242
+ 0 12h29m06.6997s ...
243
+ 1 12h29m06.7000s ... Uncertain origin
244
+ 2 12h29m06.7000s ... Uncertain origin
245
+ 3 12h29m06.7000s ... Uncertain origin
246
+ ... ... ... ... ...
247
+ 113 12h29m07.9s ... Uncertain origin
248
+ 114 12h29m04s ... Uncertain origin
249
+ 115 12h29m06s ... Uncertain origin
250
+ 116 12h29m08s ... Uncertain origin
251
+ Length = 117 rows
243
252
244
- No. RA DEC ... Published Frame Published Frequence Mode Qualifiers
245
- -- - -------------- -------------- ... -------------- - ------------------------ - --------------------------------------------------------------
246
- 0 12h29m06 .6997s + 02d03m08 .598s ...
247
- 1 12h29m06 .6997s + 02d03m08 .598s ... ICR Multiple line measurement From new, raw data
248
- 2 12h29m06 .699s + 02d03m08 .59s ... ICR Broad- band measurement From new, raw data
249
- 3 12h29m06 .64s + 02d03m09 .0s ... FK4 Broad- band measurement From reprocessed raw data; Corrected for contaminating sources
250
- 4 12h29m06 .79s + 02d03m08 .0s ... FK5 Broad- band measurement From new, raw data; Systematic errors in RA and Dec corrected
251
- 5 12h29m06 .05s + 02d02m57 .1s ... FK4 Broad- band measurement From new, raw data
252
- 6 12h29m05 .60s + 02d03m09 .0s ... FK5 Broad- band measurement From new, raw data
253
- 7 12h29m04 .5s + 02d03m03s ... Broad- band measurement From new, raw data
254
- 8 12h29m07 .55s + 02d03m02 .3s ... FK4 Broad- band measurement From reprocessed raw data
255
- 9 12h29m06 .05s + 02d03m11 .3s ... FK4 Broad- band measurement From new, raw data
256
- 10 12h29m06 .5s + 02d02m53s ... FK4 Broad- band measurement From new, raw data
257
- 11 12h29m06 .5s + 02d02m52s ... FK4 Broad- band measurement From reprocessed raw data
258
253
259
254
Reference/API
260
255
=============
0 commit comments