You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/cosmodc2/cosmoDC2_TAP_access.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,11 +75,13 @@ adql
75
75
76
76
```{code-cell} ipython3
77
77
# In order to use TAP with this ADQL string using pyvo, you can do the following:
78
-
result = service.search(adql)
78
+
result = service.run_async(adql)
79
79
result
80
80
```
81
81
82
-
The above query shows that there are 597,488,849 redshifts in this table.
82
+
The above query shows that there are 597,488,849 redshifts in this table.
83
+
Running ``count`` on an entire table is an expensive operation, therefore we ran it asynchronously to avoid any potential timeout issues.
84
+
To learn more about synchronous versus asynchronous PyVO queries please read the [relevant PyVO documentation](https://pyvo.readthedocs.io/en/latest/dal/index.html#synchronous-vs-asynchronous-query).
83
85
84
86
+++
85
87
@@ -125,7 +127,7 @@ adql
125
127
Now we can use the previously-defined service to execute the query with the spatial contraint.
126
128
127
129
```{code-cell} ipython3
128
-
cone_results = service.search(adql)
130
+
cone_results = service.run_sync(adql)
129
131
```
130
132
131
133
```{code-cell} ipython3
@@ -151,7 +153,7 @@ We can easily see form this plot that the simulated galaxies go out to z = 3.
151
153
152
154
Now let's visualize the galaxy main sequence at z = 2.0. First, we'll do a narrow redshift cut with no spatial constraint.
153
155
154
-
Let's do it as an asynchronous search since this might take awhile.
156
+
Let's do it as an asynchronous search since this might take awhile, too.
155
157
156
158
```{code-cell} ipython3
157
159
service = vo.dal.TAPService("https://irsa.ipac.caltech.edu/TAP")
@@ -188,4 +190,4 @@ plt.show()
188
190
189
191
**Updated:** 2024-07-24
190
192
191
-
**Contact:**[the IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or reporting problems.
193
+
**Contact:**[the IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or reporting problems.
0 commit comments