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: documentation/spherex_data_access.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Each of these data access layers is described in greater detail in the subsectio
13
13
14
14
## Browsable Directories
15
15
SPHEREx data products are laid out in directories that can be navigated with standard web browsers.
16
-
This is convenient for users to get a quick sense of the types of data products that are available, to quickly download some examples by clicking through the directory tree, and to script bulk downloads using wget or curl.
16
+
This is convenient for users to get a quick sense of the types of data products that are available, to quickly download some examples by clicking through the directory tree, and to script bulk downloads using `wget` or `curl`.
17
17
18
18
The root of the SPHEREx data quick release data directories is:
19
19
https://irsa.ipac.caltech.edu/ibe/data/spherex/qr
@@ -54,7 +54,7 @@ IRSA's generic SIA2 endpoint is:
54
54
`https://irsa.ipac.caltech.edu/SIA?`
55
55
56
56
Users must add a `COLLECTION` parameter to this endpoint to specify which dataset to search.
57
-
There are three SPHEREx-related SIA2 collections:
57
+
There are three SPHEREx-related SIA2 collections:
58
58
59
59
* SPHEREx Quick Release Spectral Image MEFs that are part of the SPHEREx **Wide Survey** can be accessed with: `COLLECTION=spherex_qr`
A detailed description of SPHEREx data products available to the public is provided in the [SPHEREx Explanatory Supplement](https://irsa.ipac.caltech.edu/data/SPHEREx/docs/SPHEREx_Expsupp_QR.pdf).
4
4
Here we provide a concise summary of the science, calibration, and additional data products available at IRSA.
@@ -7,11 +7,10 @@ This summary includes filenaming conventions, for which we adopt the following d
7
7
-`Planning Period` designates the survey plan uploaded to the spacecraft, e.g. `2025W18_2B`.
8
8
Each planning period covers approximately 3.5 days of operation.
9
9
10
-
-`Observation ID` includes the survey planning period and the large
11
-
and small slew counters, e.g. `2025W18_2B_0001_1`. Each large slew
12
-
has a maximum of 4 small slews, so the allowed small slew counter
13
-
range is 1 to 4. Some large slews will have less than 4 small
14
-
slews.
10
+
-`Observation ID` includes the survey planning period and the large and small slew counters.
11
+
For example, `2025W18_2B_0001_1` contains the planning period (`2025W18_2B`), the large slew counter (`0001`), and the small slew counter (`1`).
12
+
Each large slew has a maximum of 4 small slews, so the allowed small slew counter range is 1 to 4.
13
+
Some large slews will have fewer than 4 small slews.
15
14
16
15
-`Detector` is an integer from 1 through 6.
17
16
@@ -22,12 +21,11 @@ Each planning period covers approximately 3.5 days of operation.
22
21
23
22
## Main Science Data Product: Spectral Image Multi-Extension FITS Files (MEF)
24
23
25
-
The main Quick Release data product is the Level 2 Spectral Image MEF.
26
-
There are 6 Spectral MEFs (one for each detector) for each sky
27
-
pointing. Because data quality assessments are evaluated per spectral
28
-
image band, some observations will not include all 6 bands in the
29
-
archive. Each Spectral MEF is approximately 70 MB and contains 6
30
-
extensions:
24
+
The main Quick Release data product is the Level 2 Spectral Image MEF,as described in Section 2.1 of the [Explanatory Supplement](https://irsa.ipac.caltech.edu/data/SPHEREx/docs/SPHEREx_Expsupp_QR.pdf).
25
+
26
+
There are 6 Spectral MEFs (one for each detector) for each sky pointing.
27
+
Because data quality assessments are evaluated per spectral image band, some observations will not include all 6 bands in the archive.
28
+
Each Spectral MEF is approximately 70 MB and contains 6 extensions:
31
29
32
30
HDU 1: IMAGE
33
31
: Calibrated surface brightness flux density in units of MJy/sr, stored as a 2040 x 2040 image.
@@ -87,121 +85,28 @@ HDU 6: WCS-WAVE
87
85
88
86
## Cutouts of Spectral Image MEFs
89
87
90
-
IRSA enables users to access rectangular cutouts of a SPHEREx Spectral
1. Let's say that we are interested in the requested position:
139
-
140
-
```
141
-
ra_deg = 305.59875000000005
142
-
dec_deg = 41.14888888888889
143
-
```
144
-
145
-
We can use the WCS header in the cutout to determine that these coordinates correspond to
88
+
IRSA enables users to access rectangular cutouts of a SPHEREx Spectral Image MEF by simply appending a [query string](https://irsa.ipac.caltech.edu/ibe/cutouts.html) containing center and size parameters to the image URL.
89
+
These cutout MEFs contain the same HDUs as the original Spectral Images (IMAGE, FLAGS, VARIANCE, ZODI, PSF, WCS-WAVE). However, the IMAGE, FLAGS, VARIANCE, AND ZODI HDUs have been modified to include only those pixels within the specified cutout size.
90
+
The WCS-WAVE HDU has also modified to provide the correct mapping between the pixels in the cutout to wavelength.
91
+
The PSF HDU from the original spectral image is included unmodified in the cutout MEF.
The spatially-varying PSF is represented as an image cube with 121 planes.
94
+
Each plane is a 101x101 pixel image representing a PSF for a different region of the detector. Users interested in performing photometry on a cutout using the information in the cutout PSF HDU will need to understand how to find the most applicable PSF cube plane for each pixel in the cutout.
95
+
The basic steps are described below, and a [https://caltech-ipac.github.io/irsa-tutorials/](Python notebook tutorial) is provided to help users get started with a simple implementation.
156
96
157
-
2. We can then use the values of CRPIX1A and CRPIX2A in the cutout header to
158
-
calculate what pixels these coordinates correspond to in the original
159
-
Spectral Image:
97
+
1. Determine the 0-based pixel coordinates of the position of interest in the IMAGE HDU of the cutout.
160
98
161
-
```
162
-
CRPIX1A = -220.0
163
-
CRPIX2A = -2004.0
99
+
2. Determine the 0-based pixel coordinates of the position of interest in the IMAGE HDU of the original Spectral Image.
3. Looking at the header of the cutout PSF HDU, we see that the XCTR_* values are:
170
-
171
-
```
172
-
XCTR zone0 = 93.22727273
173
-
XCTR zone1 = 278.68181818
174
-
XCTR zone2 = 464.13636364
175
-
XCTR zone3 = 649.59090909
176
-
XCTR zone4 = 835.04545455
177
-
XCTR zone5 = 1020.5
178
-
XCTR zone6 = 1205.95454545
179
-
XCTR zone7 = 1391.40909091
180
-
XCTR zone8 = 81576.86363636
181
-
XCTR zone9 = 1762.31818182
182
-
XCTR zone10 = 1947.77272727
183
-
```
184
-
185
-
and the `YCTR_*` values are:
186
-
187
-
```
188
-
YCTR zone0 = 93.22727273
189
-
YCTR zone1 = 278.68181818
190
-
YCTR zone2 = 464.13636364
191
-
YCTR zone3 = 649.59090909
192
-
YCTR zone4 = 835.04545455
193
-
YCTR zone5 = 1020.5
194
-
YCTR zone6 = 1205.95454545
195
-
YCTR zone7 = 1391.40909091
196
-
YCTR zone8 = 1576.86363636
197
-
YCTR zone9 = 1762.31818182
198
-
YCTR zone10 = 1947.77272727
102
+
xpix_orig = 1 + xpix_cutout - CRPIX1A
103
+
ypix_orig = 1 + ypix_cutout - CRPIX2A
199
104
```
200
105
201
-
Our original pixel coordates of 223.180467001, 2007.3413158 fall
202
-
closest to `XCTR` zone1 and `YCTR` zone10. This PSF for this zone is
203
-
stored in cube plane 22.
106
+
3. Examine the header of the PSF HDU of the cutout to determine the PSF zone and cube plane corresponding to the pixel of interest in the original Spectral Image.
204
107
108
+
The PSF HDU has a header containing the keywords `XCTR_*`, `YCTR_*`, `XWID_*`, and `YWID_*`, where * goes from [1 to 121].
109
+
To determine if a pixel in the original Spectral Image falls within a PSF zone, simply find the closest `XCTR_*` and `YCTR_*` to determine the cube plane that contains the corresponding PSF for this zone.
0 commit comments