@@ -63,6 +63,7 @@ from io import BytesIO
6363import re
6464
6565import matplotlib.pyplot as plt
66+ import numpy as np
6667import pandas as pd
6768import requests
6869
@@ -236,6 +237,8 @@ result_table = result.to_qtable()
236237### Choose an object of interest, lets look at an object with a strong Halpha line detected with high SNR.
237238
238239``` {code-cell} ipython3
240+ result_table['object_id'] = result['object_id'].astype('int64')
241+
239242obj_id = 2739401293646823742
240243
241244obj_2739401293646823742 = result_table[(result_table['object_id'] == obj_id)]
@@ -277,17 +280,16 @@ with fits.open(BytesIO(response.content), memmap=True) as hdul:
277280Divide by 10000 to convert from Angstrom to micron
278281
279282``` {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']
283+ wavelengths = obj_2739401293646823742 ['spe_line_central_wl_gf']/10000.
284+ line_names = obj_2739401293646823742 ['spe_line_name']
285+ snr_gf = obj_2739401293646823742 ['spe_line_snr_gf']
283286
284287plt.plot(df_obj_irsa['WAVELENGTH']/10000., df_obj_irsa['SIGNAL'])
285288
286- for wl, name,snr in zip(wavelengths, line_names, snr_gf):
289+ for wl, name, snr in zip(np.atleast_1d( wavelengths), np.atleast_1d( line_names), np.atleast_1d( snr_gf) ):
287290 plt.axvline(wl, color='b', linestyle='--', alpha=0.3)
288291 plt.text(wl+0.02, .1, name+' SNR='+str(round(snr)), rotation=90, ha='center', va='bottom', fontsize=10)
289292
290-
291293plt.xlabel('Wavelength (microns)')
292294plt.ylabel('Flux (erg / (Angstrom s cm2))')
293295plt.title(obj_id)
0 commit comments