Skip to content

Commit 16b1f12

Browse files
committed
Swap some pyvo for astroquery in 2_euclid
1 parent 03aba72 commit 16b1f12

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
@@ -50,27 +50,25 @@ If you have questions about this notebook, please contact the [IRSA helpdesk](ht
5050

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

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

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

65-
```{code-cell} ipython3
66-
service = vo.dal.TAPService("https://irsa.ipac.caltech.edu/TAP")
67-
```
65+
+++
66+
67+
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.
6868

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

7674
### Choose the Euclid MER table
@@ -84,13 +82,12 @@ table_mer = 'euclid_q1_mer_catalogue'
8482
- List the column names
8583

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

9189
```{code-cell} ipython3
92-
for col in columns:
93-
print(f'{f"{col.name}":30s} {col.unit} {col.description}')
90+
columns_info
9491
```
9592

9693
```{tip}
@@ -121,7 +118,7 @@ adql_stars = ("SELECT TOP 10000 mer.object_id, mer.ra, mer.dec, mer.flux_vis_psf
121118
122119
# Run the query
123120
124-
result_stars = service.search(adql_stars)
121+
result_stars = Irsa.query_tap(adql_stars)
125122
```
126123

127124
```{code-cell} ipython3

0 commit comments

Comments
 (0)