BDNYC / sedkit

Spectral energy distribution construction and analysis tools
MIT License
16 stars 13 forks source link

Problem Adding Some Spectra #82

Closed SherelynA closed 1 year ago

SherelynA commented 1 year ago

Currently, I am getting this issue where I add a spectrum using s.add_spectrum(), but i get the following error

Screen Shot 2022-10-12 at 3 53 15 PM

I am adding the spectrum using the following code optical_spectra = 'https://s3.amazonaws.com/bdnyc/optical_spectra/U10929.fits' optical_data = fits.open(optical_spectra) my_wcs = fitswcs.WCS(header={'CDELT1': 2.0092258, 'CRVAL1': 5800, 'CUNIT1': 'Angstrom', 'CTYPE1': 'LINEAR', 'CRPIX1': 1}) optical_spec = Spectrum1D(flux=optical_data[0].data[0,0,:] * (u.erg / u.s / u.cm**2 / u.AA),wcs=my_wcs) and then using s.add_spectrum(spectrum=[optical_spec.spectral_axis,optical_spec.flux,optical_err_flux]) to add it to the initialized SED. Any thoughts on what it could be ? @hover2pi