0
# Observatory Archives
1
2
Data archives from major ground-based and space-based observatories providing access to processed observations, raw data, calibration files, and metadata. These archives enable researchers to access telescope observations across multiple wavelengths and epochs.
3
4
## Capabilities
5
6
### ALMA - Atacama Large Millimeter/submillimeter Array
7
8
ALMA archive provides access to interferometric observations in the millimeter and submillimeter wavelength range, including both processed data products and raw visibility data.
9
10
```python { .api }
11
from astroquery.alma import Alma
12
13
def query_object(object_name: str, public: bool = True, science: bool = True,
14
payload: bool = False, **kwargs) -> Table:
15
"""
16
Query ALMA archive for observations of a specific object.
17
18
Parameters:
19
- object_name: Name of the astronomical object
20
- public: Include public observations only
21
- science: Include science observations only
22
- payload: Return query payload instead of executing
23
- **kwargs: Additional query parameters
24
25
Returns:
26
Table with ALMA observation metadata
27
"""
28
29
def query_region(coordinates: Union[SkyCoord, str], radius: Union[Quantity, str] = None,
30
public: bool = True, science: bool = True) -> Table:
31
"""
32
Query ALMA archive for observations in a sky region.
33
34
Parameters:
35
- coordinates: Center coordinates as SkyCoord or string
36
- radius: Search radius (default: 1 arcmin)
37
- public: Include public observations only
38
- science: Include science observations only
39
40
Returns:
41
Table with ALMA observations in the region
42
"""
43
44
def query_sia(pos: Union[SkyCoord, str] = None, band: Union[int, List[int]] = None,
45
time: str = None, pol: str = None) -> Table:
46
"""
47
Simple Image Access (SIA) query for ALMA images.
48
49
Parameters:
50
- pos: Position for spatial constraint
51
- band: ALMA band number(s) to search
52
- time: Time constraint
53
- pol: Polarization constraint
54
55
Returns:
56
Table with available image products
57
"""
58
59
def download_and_extract_files(urls: List[str], delete: bool = True,
60
regex: str = r'.*\.fits$') -> List[str]:
61
"""
62
Download and extract ALMA data files.
63
64
Parameters:
65
- urls: List of download URLs from query results
66
- delete: Delete downloaded tar files after extraction
67
- regex: Regular expression to filter extracted files
68
69
Returns:
70
List of paths to extracted files
71
"""
72
73
def get_data_info(uids: Union[List[str], str], *, expand_tarfiles: bool = False,
74
with_auxiliary: bool = True, with_rawdata: bool = True) -> Table:
75
"""
76
Get detailed information about ALMA observations by UID.
77
78
Parameters:
79
- uids: List of valid UIDs or a single UID (format: 'uid://A002/X391d0b/X7b')
80
- expand_tarfiles: Include information about files within tar archives
81
- with_auxiliary: Include auxiliary data files
82
- with_rawdata: Include raw data files
83
84
Returns:
85
Table with detailed file information for the specified UIDs
86
"""
87
88
# Configuration
89
from astroquery.alma import conf
90
conf.server: str # ALMA archive server
91
conf.timeout: int = 60 # Connection timeout
92
```
93
94
Usage examples:
95
96
```python
97
from astroquery.alma import Alma
98
import astropy.units as u
99
from astropy.coordinates import SkyCoord
100
101
# Query for public observations of a source
102
result = Alma.query_object('NGC 1068', public=True)
103
print(f"Found {len(result)} ALMA observations")
104
print(result['obs_id', 'target_name', 'frequency'])
105
106
# Region query with specific constraints
107
coords = SkyCoord('12h30m43.2s', '+12d23m28s', frame='icrs')
108
result = Alma.query_region(coords, radius=30*u.arcsec)
109
110
# Get download URLs and retrieve data
111
download_urls = Alma.get_data_urls(result)
112
files = Alma.download_and_extract_files(download_urls[:5])
113
print(f"Downloaded {len(files)} FITS files")
114
```
115
116
### MAST - Mikulski Archive for Space Telescopes
117
118
MAST provides access to data from NASA's space-based observatories including Hubble, Webb, Kepler, TESS, and other missions, with both observation data and source catalogs.
119
120
```python { .api }
121
from astroquery.mast import Observations, Catalogs, Tesscut, Zcut
122
123
# Observations service
124
def query_object(objectname: str, radius: Union[Quantity, str] = None,
125
pagesize: int = None, page: int = None) -> Table:
126
"""
127
Query MAST for observations of a specific object.
128
129
Parameters:
130
- objectname: Name of the astronomical object
131
- radius: Search radius around object
132
- pagesize: Number of results per page
133
- page: Page number for paginated results
134
135
Returns:
136
Table with observation metadata
137
"""
138
139
def query_region(coordinates: Union[SkyCoord, str], radius: Union[Quantity, str] = None) -> Table:
140
"""
141
Query MAST observations in a sky region.
142
143
Parameters:
144
- coordinates: Center coordinates
145
- radius: Search radius
146
147
Returns:
148
Table with observations in the region
149
"""
150
151
def query_criteria(**criteria) -> Table:
152
"""
153
Query observations with specific criteria.
154
155
Parameters:
156
- **criteria: Search criteria (instrument_name=, proposal_id=, etc.)
157
158
Returns:
159
Table with observations matching criteria
160
"""
161
162
# Catalogs service
163
def query_object(objectname: str, radius: Union[Quantity, str] = None,
164
catalog: str = "Gsc", pagesize: int = None) -> Table:
165
"""
166
Query MAST catalogs for sources around an object.
167
168
Parameters:
169
- objectname: Object name for search
170
- radius: Search radius
171
- catalog: Catalog name ("Gsc", "TIC", "Ctl", etc.)
172
- pagesize: Results per page
173
174
Returns:
175
Table with catalog sources
176
"""
177
178
def query_region(coordinates: Union[SkyCoord, str], radius: Union[Quantity, str] = None,
179
catalog: str = "Gsc") -> Table:
180
"""
181
Query MAST catalogs in a region.
182
183
Parameters:
184
- coordinates: Center coordinates
185
- radius: Search radius
186
- catalog: Catalog to search
187
188
Returns:
189
Table with catalog sources in region
190
"""
191
192
# TESS cutouts
193
def get_cutouts(coordinates: Union[SkyCoord, str], size: Union[int, Quantity] = None,
194
sector: int = None) -> List:
195
"""
196
Get TESS Full Frame Image cutouts.
197
198
Parameters:
199
- coordinates: Target coordinates
200
- size: Cutout size in pixels or angular units
201
- sector: Specific TESS sector
202
203
Returns:
204
List of HDUList objects with cutout data
205
"""
206
207
# Configuration
208
from astroquery.mast import conf
209
conf.server: str # MAST server URL
210
conf.timeout: int = 600 # Connection timeout
211
```
212
213
Usage examples:
214
215
```python
216
from astroquery.mast import Observations, Catalogs, Tesscut
217
import astropy.units as u
218
from astropy.coordinates import SkyCoord
219
220
# Query Hubble observations
221
obs_table = Observations.query_object("M83", radius=0.02*u.deg)
222
hubble_obs = obs_table[obs_table['obs_collection'] == 'HST']
223
print(f"Found {len(hubble_obs)} Hubble observations")
224
225
# Query Guide Star Catalog
226
coords = SkyCoord('12h30m43s', '+12d23m28s', frame='icrs')
227
sources = Catalogs.query_region(coords, radius=2*u.arcmin, catalog="Gsc")
228
print(f"Found {len(sources)} guide stars")
229
230
# Get TESS cutouts
231
cutouts = Tesscut.get_cutouts(coords, size=20)
232
for cutout in cutouts:
233
print(f"Cutout shape: {cutout[1].data.shape}")
234
235
# Download observation data products
236
data_products = Observations.get_product_list(obs_table[:5])
237
download_table = Observations.download_products(data_products[:10])
238
```
239
240
### ESO - European Southern Observatory
241
242
ESO archive provides access to observations from ESO's ground-based telescopes including VLT, ALMA (as partner), and La Silla facilities, with both raw and processed data products.
243
244
```python { .api }
245
from astroquery.eso import Eso
246
247
def query_object(name: str, cache: bool = True) -> Table:
248
"""
249
Query ESO archive for observations of a specific object.
250
251
Parameters:
252
- name: Name of the astronomical object
253
- cache: Enable result caching
254
255
Returns:
256
Table with ESO observation records
257
"""
258
259
def query_region(coordinates: Union[SkyCoord, str], radius: Union[Quantity, str] = None) -> Table:
260
"""
261
Query ESO archive for observations in a sky region.
262
263
Parameters:
264
- coordinates: Center coordinates
265
- radius: Search radius
266
267
Returns:
268
Table with observations in the specified region
269
"""
270
271
def query_instrument(instrument: str, **kwargs) -> Table:
272
"""
273
Query ESO archive by instrument name.
274
275
Parameters:
276
- instrument: ESO instrument name (e.g., 'FORS2', 'XSHOOTER')
277
- **kwargs: Additional instrument-specific parameters
278
279
Returns:
280
Table with observations from the specified instrument
281
"""
282
283
def get_headers(data_files: List[str]) -> List[Dict]:
284
"""
285
Retrieve FITS headers for ESO data files.
286
287
Parameters:
288
- data_files: List of ESO data file identifiers
289
290
Returns:
291
List of dictionaries containing FITS header information
292
"""
293
294
def login(username: str = None, password: str = None, store_password: bool = False) -> None:
295
"""
296
Login to ESO archive for accessing proprietary data.
297
298
Parameters:
299
- username: ESO archive username
300
- password: ESO archive password
301
- store_password: Store password securely
302
"""
303
304
# Configuration
305
from astroquery.eso import conf
306
conf.server: str # ESO archive server
307
conf.timeout: int = 60 # Connection timeout
308
```
309
310
Usage examples:
311
312
```python
313
from astroquery.eso import Eso
314
import astropy.units as u
315
from astropy.coordinates import SkyCoord
316
317
# Query for observations of a target
318
result = Eso.query_object('NGC 1365')
319
print(f"Found {len(result)} ESO observations")
320
print(result['target', 'instrument', 'exptime'])
321
322
# Query by instrument
323
fors2_obs = Eso.query_instrument('FORS2', target='NGC*')
324
print(f"Found {len(fors2_obs)} FORS2 observations")
325
326
# Region query
327
coords = SkyCoord('03h33m36s', '-36d08m25s', frame='icrs')
328
region_obs = Eso.query_region(coords, radius=5*u.arcmin)
329
330
# Login and access proprietary data (requires ESO account)
331
# Eso.login() # Prompts for credentials
332
# proprietary_obs = Eso.query_object('my_target')
333
```
334
335
### CASDA - CSIRO ASKAP Science Data Archive
336
337
CASDA provides access to data from the Australian Square Kilometre Array Pathfinder (ASKAP) radio telescope, including continuum and spectral line observations.
338
339
```python { .api }
340
from astroquery.casda import Casda
341
342
def query_region(coordinates: Union[SkyCoord, str], radius: Union[Quantity, str] = None,
343
cache: bool = True) -> Table:
344
"""
345
Query CASDA for observations in a sky region.
346
347
Parameters:
348
- coordinates: Center coordinates
349
- radius: Search radius
350
- cache: Enable result caching
351
352
Returns:
353
Table with ASKAP observations in the region
354
"""
355
356
def query_object(object_name: str, radius: Union[Quantity, str] = None) -> Table:
357
"""
358
Query CASDA for observations of a specific object.
359
360
Parameters:
361
- object_name: Name of the astronomical object
362
- radius: Search radius around object
363
364
Returns:
365
Table with ASKAP observation metadata
366
"""
367
368
# Configuration
369
from astroquery.casda import conf
370
conf.server: str # CASDA server URL
371
conf.timeout: int = 60 # Connection timeout
372
```
373
374
Usage examples:
375
376
```python
377
from astroquery.casda import Casda
378
import astropy.units as u
379
from astropy.coordinates import SkyCoord
380
381
# Query ASKAP observations in a region
382
coords = SkyCoord('21h30m00s', '-30d00m00s', frame='icrs')
383
result = Casda.query_region(coords, radius=1*u.deg)
384
print(f"Found {len(result)} ASKAP observations")
385
386
# Query by object name
387
result = Casda.query_object('SMC', radius=2*u.deg)
388
```
389
390
## Common Types
391
392
```python { .api }
393
from astropy.table import Table
394
from astropy.coordinates import SkyCoord
395
from astropy.units import Quantity
396
from astropy.io.fits import HDUList
397
from typing import Union, List, Dict, Optional
398
399
# Input types
400
coordinates: Union[SkyCoord, str] # Sky coordinates
401
object_name: str # Astronomical object name
402
radius: Union[Quantity, str, None] # Search radius with units
403
instrument: str # Instrument name
404
405
# Query parameters
406
public: bool = True # Include public data only
407
science: bool = True # Science observations only
408
cache: bool = True # Enable caching
409
pagesize: int # Results per page
410
411
# Return types
412
Table # Observation metadata
413
List[str] # File paths
414
List[HDUList] # FITS data
415
List[Dict] # Header information
416
```