Skip to content

Commit 5238b2f

Browse files
committed
Swap some pyvo for astroquery in 2_euclid
1 parent 8a0b44c commit 5238b2f

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

tutorials/euclid_access/2_Euclid_intro_MER_catalog.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,25 @@ Other Euclid notebooks show how to use other data products released as part of E
4949

5050
```{code-cell} ipython3
5151
# Uncomment the next line to install dependencies if needed
52-
# !pip install numpy matplotlib pyvo
52+
# !pip install numpy matplotlib astroquery>=0.4.10
5353
```
5454

5555
```{code-cell} ipython3
5656
import numpy as np
5757
import matplotlib.pyplot as plt
5858
59-
import pyvo as vo
59+
from astroquery.ipac.irsa import Irsa
6060
```
6161

6262
## 1. Download MER catalog from IRSA directly to this notebook
6363

64-
```{code-cell} ipython3
65-
service = vo.dal.TAPService("https://irsa.ipac.caltech.edu/TAP")
66-
```
64+
+++
65+
66+
First, have a look at what Euclid catalogs are available. With the ``list_catalogs`` functionality, we'll receive a list of the name of the catalogs as well as their brief desciption.
6767

6868
```{code-cell} ipython3
69-
tables = service.tables
70-
for tablename in tables.keys():
71-
if "tap_schema" not in tablename and "euclid_q1" in tablename:
72-
tables[tablename].describe()
69+
tables = Irsa.list_catalogs(filter='euclid')
70+
tables
7371
```
7472

7573
### Choose the Euclid MER table
@@ -83,13 +81,12 @@ table_mer = 'euclid_q1_mer_catalogue'
8381
- List the column names
8482

8583
```{code-cell} ipython3
86-
columns = tables[table_mer].columns
87-
print(len(columns))
84+
columns_info = Irsa.list_columns(catalog=table_mer)
85+
print(len(columns_info))
8886
```
8987

9088
```{code-cell} ipython3
91-
for col in columns:
92-
print(f'{f"{col.name}":30s} {col.unit} {col.description}')
89+
columns_info
9390
```
9491

9592
### Define the following ADQL query to find the first 10k stars in the MER catalog
@@ -110,7 +107,7 @@ adql_stars = ("SELECT TOP 10000 mer.ra, mer.dec, mer.flux_vis_psf, mer.fluxerr_v
110107
111108
# Run the query
112109
113-
result_stars = service.search(adql_stars)
110+
result_stars = Irsa.query_tap(adql_stars)
114111
```
115112

116113
```{code-cell} ipython3

0 commit comments

Comments
 (0)