Skip to content

Commit 3e9f9c7

Browse files
authored
Merge pull request #56 from bsipocz/euclid_remove_irsadev
Euclid: Remove irsadev urls and notes to testers
2 parents 02077b8 + c01bdcb commit 3e9f9c7

File tree

4 files changed

+83
-98
lines changed

4 files changed

+83
-98
lines changed

tutorials/euclid_access/1_Euclid_intro_MER_images.md

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ kernelspec:
1919

2020
+++
2121

22-
By the end of this tutorial, you will:
22+
By the end of this tutorial, you will:
2323
- Understand the basic characteristics of Euclid Q1 MER mosaics.
2424
- How do download full MER mosaics.
2525
- How to make smaller cutouts of MER mosaics.
@@ -32,11 +32,17 @@ By the end of this tutorial, you will:
3232

3333
+++
3434

35-
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe. The Quick Data Release 1 (Q1) are the first data release from the Euclid mission after the Early Release Observations (ERO). On March 19, 2025 the data will be available on the ESA archive (https://easidr.esac.esa.int/sas/) and on the IRSA archive (https://irsa.ipac.caltech.edu).
35+
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe.
36+
The Quick Data Release 1 (Q1) are the first data release from the Euclid mission after the Early Release Observations (ERO).
37+
On March 19, 2025 the data will be available on the [ESA archive](https://easidr.esac.esa.int/sas/) and on the [IRSA archive](https://irsa.ipac.caltech.edu).
3638

37-
These notebooks focus on how to access, download, and process Euclid Q1 data from the IRSA archive. At the end of the notebook, we also include some information for how to access the Q1 data from the ESA archive. If you have any issues accessing data from the archives, please contact the helpdesk directly: IRSA ([email protected]) and ESA (https://support.cosmos.esa.int/euclid).
39+
These Q1 notebooks focus on how to access, download, and process Euclid Q1 data from the IRSA archive.
40+
If you have any issues accessing data from the archives, please contact the helpdesk directly: [IRSA helpdesk]([email protected]) and [ESA Euclid Helpdesk](https://support.cosmos.esa.int/euclid).
3841

39-
MER mosaic images are all the images from Level 2 images in different filters mapped to a common pixel scale. This notebook provides an introduction to MER mosaics released as part of Euclid Q1. Other Euclid notebooks show how to use other data products released as part of Euclid Q1.
42+
MER mosaic images are all the images from Level 2 images in different filters mapped to a common pixel scale.
43+
44+
This notebook provides an introduction to MER mosaics released as part of Euclid Q1.
45+
Other Euclid notebooks show how to use other data products released as part of Euclid Q1.
4046

4147
+++
4248

@@ -82,12 +88,12 @@ search_radius = 10 * u.arcsec
8288
coord = SkyCoord.from_name('HD 168151')
8389
```
8490

85-
Use IRSA to search for all Euclid data on this target.
86-
This searches specifically in the euclid_DpdMerBksMosaic "collection" which is the MER images and catalogs.
91+
Use IRSA to search for all Euclid data on this target.
92+
This searches specifically in the euclid_DpdMerBksMosaic "collection" which is the MER images and catalogs.
8793
This query will return any image with pixels that overlap the search region.
8894

8995
```{code-cell} ipython3
90-
irsa_service= vo.dal.sia2.SIA2Service('https://irsadev.ipac.caltech.edu/SIA')
96+
irsa_service= vo.dal.sia2.SIA2Service('https://irsa.ipac.caltech.edu/SIA')
9197
9298
image_table = irsa_service.search(pos=(coord, search_radius), collection='euclid_DpdMerBksMosaic')
9399
```
@@ -147,37 +153,22 @@ tileID=re.search(r'TILE\s*(\d{9})', filename).group(1)
147153
print('The MER tile ID for this object is :',tileID)
148154
```
149155

150-
```{code-cell} ipython3
151-
######### TEMP
152-
######## Note to testers, for now we need to replace the irsa.ipac.caltech.edu url with irsadev
153-
######## This will not be the same after the data are made public so this cell will be deleted at that time
154-
def add_dev_to_domain(domain):
155-
parts = domain.split('.', 1) # Split at the first dot
156-
if len(parts) == 2:
157-
return f"{parts[0]}dev.{parts[1]}"
158-
return domain
159-
160-
filename_dev = add_dev_to_domain(filename)
161-
print(filename_dev)
162-
163-
#####################
164-
```
165-
166156
Download the MER image -- note this file is about 1.46 GB
167157

168158
```{code-cell} ipython3
169-
fname = download_file(filename_dev, cache=True)
159+
fname = download_file(filename, cache=True)
170160
hdu_mer_irsa = fits.open(fname)
171161
print(hdu_mer_irsa.info())
172162
173163
head_mer_irsa = hdu_mer_irsa[0].header
174164
```
175165

176-
Now you've downloaded this large file, if you would like to save it to disk, uncomment the following cell
166+
Now you've downloaded this large file, if you would like to save it to disk, uncomment the following cell.
167+
Please also define a suitable download directory; by default it will be `data` at the same location as your notebook.
177168

178169
```{code-cell} ipython3
179-
# download_path='/Users/meshkat/data/Euclid/'
180-
# hdu_mer_irsa.writeto(download_path+'./MER_image_VIS.fits', overwrite=True)
170+
# download_path = 'data'
171+
# hdu_mer_irsa.writeto(os.path.join(download_path, 'MER_image_VIS.fits'), overwrite=True)
181172
```
182173

183174
Have a look at the header information for this image
@@ -215,17 +206,6 @@ urls = df_im_euclid['access_url'].to_list()
215206
urls
216207
```
217208

218-
```{code-cell} ipython3
219-
######### TEMP
220-
######## Note to testers, for now we need to replace the irsa.ipac.caltech.edu url with irsadev
221-
######## reusing the add_dev_to_domain function from before
222-
######## This will not be the same after the data are made public so this cell will be deleted at that time
223-
224-
urls = list(map(add_dev_to_domain, urls))
225-
print(urls)
226-
#####################
227-
```
228-
229209
Create an array with the instrument and filter name so we can add this to the plots.
230210

231211
```{code-cell} ipython3
@@ -245,8 +225,8 @@ filters
245225
## How large do you want the image cutout to be?
246226
im_cutout= 1.0 * u.arcmin
247227
248-
## What is the center of the cutout?
249-
## For now choosing a random location on the image
228+
## What is the center of the cutout?
229+
## For now choosing a random location on the image
250230
## because the star itself is saturated
251231
ra = 273.8667
252232
dec = 64.525
@@ -269,14 +249,14 @@ for url in urls:
269249
print(f"Opened {url}")
270250
271251
## Store the header
272-
header = hdu[0].header
252+
header = hdu[0].header
273253
274254
## Read in the cutout of the image that you want
275255
cutout_data = Cutout2D(hdu[0].section, position=coords_cutout, size=im_cutout, wcs=WCS(hdu[0].header))
276256
277257
## Close the file
278258
# hdu.close()
279-
259+
280260
## Define a new fits file based on this smaller cutout, with accurate WCS based on the cutout size
281261
new_hdu = fits.PrimaryHDU(data=cutout_data.data, header=header)
282262
new_hdu.header.update(cutout_data.wcs.to_header())
@@ -296,7 +276,7 @@ Need to determine the number of images for the grid layout, then we iterate thro
296276
```{code-cell} ipython3
297277
num_images = len(final_hdulist)
298278
columns = 4
299-
rows = -(-num_images // columns)
279+
rows = -(-num_images // columns)
300280
301281
fig, axes = plt.subplots(rows, columns, figsize=(4 * columns, 4 * rows), subplot_kw={'projection': WCS(final_hdulist[0].header)})
302282
axes = axes.flatten()
@@ -326,7 +306,7 @@ filters
326306
```
327307

328308
```{code-cell} ipython3
329-
filt_index = np.where(filters == 'VIS')[0][0]
309+
filt_index = np.where(filters == 'VIS')[0][0]
330310
331311
img1=final_hdulist[filt_index].data
332312
```
@@ -340,7 +320,7 @@ Need to do some initial steps (swap byte order) with the cutout to prevent sep f
340320

341321
```{code-cell} ipython3
342322
img2 = img1.byteswap().view(img1.dtype.newbyteorder())
343-
c_contiguous_data = np.array(img2, dtype=np.float32)
323+
c_contiguous_data = np.array(img2, dtype=np.float32)
344324
345325
bkg = sep.Background(c_contiguous_data)
346326
@@ -414,6 +394,6 @@ for i in range(len(sources_thr)):
414394

415395
**Author**: Tiffany Meshkat (IPAC Scientist)
416396

417-
**Updated**: March 19, 2025
397+
**Updated**: 2025-03-19
418398

419399
**Contact:** [the IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or reporting problems.

tutorials/euclid_access/2_Euclid_intro_MER_catalog.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ kernelspec:
1919

2020
+++
2121

22-
By the end of this tutorial, you will:
22+
By the end of this tutorial, you will:
2323
- Understand the basic characteristics of Euclid Q1 MER catalogs.
2424
- What columns are available in the MER catalog.
2525
- How to query with ADQL in the MER catalog.
@@ -31,11 +31,17 @@ By the end of this tutorial, you will:
3131

3232
+++
3333

34-
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe. The Quick Data Release 1 (Q1) are the first data release from the Euclid mission after the Early Release Observations (ERO). On March 19, 2025 the data will be available on the ESA archive (https://easidr.esac.esa.int/sas/) and on the IRSA archive (https://irsa.ipac.caltech.edu).
34+
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe.
35+
The Quick Data Release 1 (Q1) are the first data release from the Euclid mission after the Early Release Observations (ERO).
36+
On March 19, 2025 the data will be available on the [ESA archive](https://easidr.esac.esa.int/sas/) and on the [IRSA archive](https://irsa.ipac.caltech.edu).
3537

36-
These notebooks focus on how to access, download, and process Euclid Q1 data from the IRSA archive. At the end of the notebook, we also include some information for how to access the Q1 data from the ESA archive. If you have any issues accessing data from the archives, please contact the helpdesk directly: IRSA ([email protected]) and ESA (https://support.cosmos.esa.int/euclid).
38+
These Q1 notebooks focus on how to access, download, and process Euclid Q1 data from the IRSA archive.
39+
If you have any issues accessing data from the archives, please contact the helpdesk directly: [IRSA helpdesk]([email protected]) and [ESA Euclid Helpdesk](https://support.cosmos.esa.int/euclid).
3740

38-
Each entry in the MER catalog is a single source containing all its photometry from the MER Mosaics (VIS, Y, J, H and any accompanying external ground observations) along with other basic measurements, like size and shape. This notebook provides an introduction to the MER catalog released as part of Euclid Q1. Other Euclid notebooks show how to use other data products released as part of Euclid Q1.
41+
Each entry in the MER catalog is a single source containing all its photometry from the MER Mosaics (VIS, Y, J, H and any accompanying external ground observations) along with other basic measurements, like size and shape.
42+
43+
This notebook provides an introduction to the MER catalog released as part of Euclid Q1.
44+
Other Euclid notebooks show how to use other data products released as part of Euclid Q1.
3945

4046
+++
4147

@@ -56,7 +62,7 @@ import pyvo as vo
5662
## 1. Download MER catalog from IRSA directly to this notebook
5763

5864
```{code-cell} ipython3
59-
service = vo.dal.TAPService("https://irsadev.ipac.caltech.edu/TAP")
65+
service = vo.dal.TAPService("https://irsa.ipac.caltech.edu/TAP")
6066
```
6167

6268
```{code-cell} ipython3
@@ -83,7 +89,7 @@ print(len(columns))
8389

8490
```{code-cell} ipython3
8591
for col in columns:
86-
print(f'{f"{col.name}":30s} {col.unit} {col.description}')
92+
print(f'{f"{col.name}":30s} {col.unit} {col.description}')
8793
```
8894

8995
### Define the following ADQL query to find the first 10k stars in the MER catalog
@@ -127,7 +133,7 @@ mag_h_s_irsa=-2.5*np.log10(df_s_irsa["flux_h_templfit"]) + 23.9 # H
127133
x_s_irsa = mag_y_s_irsa - mag_h_s_irsa # Y - H
128134
y_s_irsa = mag_y_s_irsa
129135
130-
xerr_s_irsa= 2.5 / np.log(10) * np.sqrt((df_s_irsa["fluxerr_y_templfit"] / df_s_irsa["flux_y_templfit"])**2
136+
xerr_s_irsa= 2.5 / np.log(10) * np.sqrt((df_s_irsa["fluxerr_y_templfit"] / df_s_irsa["flux_y_templfit"])**2
131137
+ (df_s_irsa["fluxerr_h_templfit"] / df_s_irsa["flux_h_templfit"])**2)
132138
yerr_s_irsa= 2.5 / np.log(10) * (df_s_irsa["fluxerr_y_templfit"] / df_s_irsa["flux_y_templfit"])
133139
@@ -144,6 +150,6 @@ plt.title('10k Stars in MER catalog -- IRSA')
144150

145151
**Author**: Tiffany Meshkat (IPAC Scientist)
146152

147-
**Updated**: March 19, 2025
153+
**Updated**: 2025-03-19
148154

149155
**Contact:** [the IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or reporting problems.

tutorials/euclid_access/3_Euclid_intro_1D_spectra.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ kernelspec:
1919

2020
+++
2121

22-
By the end of this tutorial, you will:
22+
By the end of this tutorial, you will:
2323
- Understand the basic characteristics of Euclid Q1 SIR 1D spectra.
2424
- What columns are available in the MER catalog.
2525
- How to query with ADQL in the MER catalog.
@@ -29,17 +29,27 @@ By the end of this tutorial, you will:
2929

3030
## Introduction
3131

32-
+++
32+
++
3333

34-
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe. The Quick Data Release 1 (Q1) are the first data release from the Euclid mission after the Early Release Observations (ERO). On March 19, 2025 the data will be available on the ESA archive (https://easidr.esac.esa.int/sas/) and on the IRSA archive (https://irsa.ipac.caltech.edu).
34+
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe.
35+
The Quick Data Release 1 (Q1) are the first data release from the Euclid mission after the Early Release Observations (ERO).
36+
On March 19, 2025 the data will be available on the [ESA archive](https://easidr.esac.esa.int/sas/) and on the [IRSA archive](https://irsa.ipac.caltech.edu).
3537

36-
These notebooks focus on how to access, download, and process Euclid Q1 data from the IRSA archive. At the end of the notebook, we also include some information for how to access the Q1 data from the ESA archive. If you have any issues accessing data from the archives, please contact the helpdesk directly: IRSA ([email protected]) and ESA (https://support.cosmos.esa.int/euclid).
38+
These Q1 notebooks focus on how to access, download, and process Euclid Q1 data from the IRSA archive.
39+
If you have any issues accessing data from the archives, please contact the helpdesk directly: [IRSA helpdesk]([email protected]) and [ESA Euclid Helpdesk](https://support.cosmos.esa.int/euclid).
3740

38-
For the Euclid Wide Survey standard operating mode, the telescope undertakes a 4-point dither pattern. At each position VIS and NISP each take a 570s exposure, consisting of a direct visible image and a red grism exposure. This is followed by further NISP exposures in the Y, J, and H band filters (112 seconds each). The telescope is then dithered, and the sequence is repeated starting with a different grism position angle. There are actually two operational grisms oriented 180 degrees from each other. Each grism which will be used twice in this sequence, but with slight angular offsets (+/- 4 degrees), effectively creating the four different grism angles (Scaramella et al. 2022, A&A 662, A112).
41+
For the Euclid Wide Survey standard operating mode, the telescope undertakes a 4-point dither pattern.
42+
At each position VIS and NISP each take a 570s exposure, consisting of a direct visible image and a red grism exposure.
43+
This is followed by further NISP exposures in the Y, J, and H band filters (112 seconds each).
44+
The telescope is then dithered, and the sequence is repeated starting with a different grism position angle.
45+
There are actually two operational grisms oriented 180 degrees from each other. Each grism which will be used twice in this sequence, but with slight angular offsets (+/- 4 degrees), effectively creating the four different grism angles (Scaramella et al. 2022, A&A 662, A112).
3946

40-
Data which can be obtained for SIR include: SIR "images", which effectively show the full image of objects with the spectral traces overlapping, and SIR 1D spectra for individual objects. Below we will describe how to access and process the 1D spectra products. For most users, simply accessing th 1D spectra is probably the preferred option, unless they would like to extract the spectrum again, or inspect the images to see if there is any artifact which might add noise to the spectrum.
47+
Data which can be obtained for SIR include: SIR "images", which effectively show the full image of objects with the spectral traces overlapping, and SIR 1D spectra for individual objects.
48+
In this notebook we describe how to access and process the 1D spectra products.
49+
For most users, simply accessing th 1D spectra is probably the preferred option, unless they would like to extract the spectrum again, or inspect the images to see if there is any artifact which might add noise to the spectrum.
4150

42-
This notebook provides an introduction to the SIR 1D spectra released as part of Euclid Q1. Other Euclid notebooks show how to use other data products released as part of Euclid Q1.
51+
This notebook provides an introduction to the SIR 1D spectra released as part of Euclid Q1.
52+
Other Euclid notebooks show how to use other data products released as part of Euclid Q1.
4353

4454
+++
4555

@@ -68,7 +78,7 @@ import pyvo as vo
6878
Search for all tables in IRSA labeled as euclid
6979

7080
```{code-cell} ipython3
71-
service = vo.dal.TAPService("https://irsadev.ipac.caltech.edu/TAP")
81+
service = vo.dal.TAPService("https://irsa.ipac.caltech.edu/TAP")
7282
7383
tables = service.tables
7484
for tablename in tables.keys():
@@ -84,7 +94,7 @@ table_galaxy_candidates= 'euclid_q1_spectro_zcatalog_spe_galaxy_candidates'
8494
```
8595

8696
```{code-cell} ipython3
87-
## Change the settings so we can see all the columns in the dataframe and the full column width
97+
## Change the settings so we can see all the columns in the dataframe and the full column width
8898
## (to see the full long URL)
8999
pd.set_option('display.max_columns', None)
90100
pd.set_option('display.max_colwidth', None)
@@ -100,7 +110,7 @@ pd.set_option('display.max_colwidth', None)
100110
```{code-cell} ipython3
101111
obj_id=2739401293646823742
102112
103-
## Pull the data on these objects
113+
## Pull the data on these objects
104114
adql_object = f"SELECT * \
105115
FROM {table_1dspectra} \
106116
WHERE objectid = {obj_id} \
@@ -115,7 +125,7 @@ df2
115125
### Create the full filename/url
116126

117127
```{code-cell} ipython3
118-
irsa_url='https://irsadev.ipac.caltech.edu/'
128+
irsa_url='https://irsa.ipac.caltech.edu/'
119129
120130
file_url=irsa_url+df2['uri'].iloc[0]
121131
file_url
@@ -130,7 +140,7 @@ Currently IRSA has the spectra stored in very large files containing multiple (1
130140
#### Currently commented out
131141
132142
# ## Complete file url with the irsa url at the start
133-
# url = file_url
143+
# url = file_url
134144
# response = requests.get(url)
135145
136146
# hdul = fits.open(BytesIO(response.content)) # Open FITS file from memory
@@ -167,6 +177,6 @@ plt.title(obj_id)
167177

168178
**Author**: Tiffany Meshkat (IPAC Scientist)
169179

170-
**Updated**: March 19, 2025
180+
**Updated**: 2025-03-19
171181

172182
**Contact:** [the IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or reporting problems.

0 commit comments

Comments
 (0)