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
@@ -73,31 +72,32 @@ Define some coordinates of interest.
73
72
```{code-cell} ipython3
74
73
ra_deg = 304.693508808
75
74
dec_deg = 42.4436872991
75
+
76
+
coord = SkyCoord(ra_deg, dec_deg, unit='deg')
77
+
search_radius = 1 * u.arcsec
76
78
```
77
79
78
-
Query IRSA for a list of Spectral Image MEFs that overlap this position.
80
+
Query IRSA for a list of Spectral Image MEFs that overlap this position. We use the [IRSA module in astroquery](https://astroquery.readthedocs.io/en/latest/ipac/irsa/irsa.html) and the Simple Image Access (SIA) API.
79
81
80
-
```{code-cell} ipython3
81
-
# Define the TAP service URL for IRSA
82
-
tap_url = "https://irsa.ipac.caltech.edu/TAP"
82
+
+++
83
83
84
-
# Connect to the TAP service
85
-
service = pyvo.dal.TAPService(tap_url)
84
+
```{tip}
85
+
The IRSA SIA collections can be listed using using the ``list_collections`` method, we can filter on the ones containing "spherex" in the collection name:
86
86
87
-
# Define your ADQL query
88
-
query = "SELECT * FROM spherex.obscore WHERE CONTAINS(POINT('ICRS',"+str(ra_deg)+","+str(dec_deg)+"), s_region)=1"
87
+
Irsa.list_collections(filter='spherex')
88
+
```
89
89
90
-
# Submit the asynchronous query
91
-
job = service.submit_job(query)
90
+
+++
92
91
93
-
# Run the job (starts the query execution on the server)
94
-
job.run()
92
+
The collections are documented at [SPHEREx Data Access: Application Program Interfaces (APIs)](https://caltech-ipac.github.io/spherex-archive-documentation/spherex-data-access#application-program-interfaces-apis)
Each row of the results of your query represents a different spectral image.
@@ -112,28 +112,14 @@ len(results)
112
112
The query results provide a lot of metadata about each spectral image. These columns have standard names as defined by the IVOA. Let's list them:
113
113
114
114
```{code-cell} ipython3
115
-
list(results.fieldnames)
115
+
results.colnames
116
116
```
117
117
118
-
The 'access_url' column is particularly important because it tells you how to access the data. Let's look at the 'access_url' value for the first row:
119
-
120
-
```{code-cell} ipython3
121
-
results['access_url'][0]
122
-
```
123
-
124
-
Examining this URL, it does not provide direct access to the SPHEREx spectral image. Rather, it returns a file that lists all the data products and services associated with this spectral image. For the SPHEREx Quick Release products, this includes:
125
-
126
-
(1) the primary product, a Spectral Image MEF ('semantics' column is #this); and
127
-
128
-
(2) a cutout service ('semantics' is #cutout).
129
-
130
-
Most users will be interested in the primary (#this) product. Here's how you get the URL to download it for the first row:
118
+
The `'access_url'` column is particularly important because it tells you how to access the data. Let's look at the `'access_url'` value for the first row:
0 commit comments