Skip to content

Commit

Permalink
fix units
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbrn committed Aug 8, 2024
1 parent cf7ee62 commit 2782bbc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/tutorials/nested_spectra.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@
"index = np.array([])\n",
"# Loop over each spectrum, adding it's data to the arrays\n",
"for i, hdu in enumerate(sp):\n",
" wave = np.append(\n",
" wave, 10 ** hdu[\"COADD\"].data.loglam\n",
" ) # * u.angstrom # only one entry because we only search for one xid at a time. Could change that?\n",
" wave = np.append(wave, 10 ** hdu[\"COADD\"].data.loglam) # * u.angstrom\n",
" flux = np.append(flux, hdu[\"COADD\"].data.flux * 1e-17) # * u.erg/u.second/u.centimeter**2/u.angstrom\n",
" err = np.append(err, 1 / hdu[\"COADD\"].data.ivar * 1e-17) # * flux.unit\n",
"\n",
Expand Down Expand Up @@ -149,8 +147,8 @@
"spec = spec_ndf.iloc[1].coadd_spectrum\n",
"\n",
"plt.plot(spec[\"wave\"], spec[\"flux\"])\n",
"plt.xlabel(\"Wavelength (Angstroms)\")\n",
"plt.ylabel(\"Flux (ergs/s)\")"
"plt.xlabel(\"Wavelength (Å)\")\n",
"plt.ylabel(r\"Flux ($ergs/s/cm^2/Å$)\")"
]
},
{
Expand Down

0 comments on commit 2782bbc

Please sign in to comment.