Skip to content

Commit b0b7231

Browse files
committed
Fix #63 NameError in Euclid SPE notebook
1 parent e021d74 commit b0b7231

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tutorials/euclid_access/5_Euclid_intro_SPE_catalog.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ from io import BytesIO
6363
import re
6464
6565
import matplotlib.pyplot as plt
66+
import numpy as np
6667
import pandas as pd
6768
import requests
6869
@@ -277,17 +278,16 @@ with fits.open(BytesIO(response.content), memmap=True) as hdul:
277278
Divide by 10000 to convert from Angstrom to micron
278279

279280
```{code-cell} ipython3
280-
wavelengths = df_obj['spe_line_central_wl_gf']/10000.
281-
line_names = df_obj['spe_line_name']
282-
snr_gf=df_obj['spe_line_snr_gf']
281+
wavelengths = obj_2739401293646823742['spe_line_central_wl_gf']/10000.
282+
line_names = obj_2739401293646823742['spe_line_name']
283+
snr_gf = obj_2739401293646823742['spe_line_snr_gf']
283284
284285
plt.plot(df_obj_irsa['WAVELENGTH']/10000., df_obj_irsa['SIGNAL'])
285286
286-
for wl, name,snr in zip(wavelengths, line_names,snr_gf):
287+
for wl, name, snr in zip(np.atleast_1d(wavelengths), np.atleast_1d(line_names), np.atleast_1d(snr_gf)):
287288
plt.axvline(wl, color='b', linestyle='--', alpha=0.3)
288289
plt.text(wl+0.02, .1, name+' SNR='+str(round(snr)), rotation=90, ha='center', va='bottom', fontsize=10)
289290
290-
291291
plt.xlabel('Wavelength (microns)')
292292
plt.ylabel('Flux (erg / (Angstrom s cm2))')
293293
plt.title(obj_id)

0 commit comments

Comments
 (0)