Skip to content

Commit

Permalink
Fix notebook 01 (#235)
Browse files Browse the repository at this point in the history
Co-authored-by: Camilla Pacifici <[email protected]>
  • Loading branch information
camipacifici and Camilla Pacifici authored Jul 11, 2024
1 parent 6460009 commit c517e0d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"source": [
"import os\n",
"import numpy as np\n",
"from scipy.integrate import simps\n",
"from scipy.integrate import simpson\n",
"from urllib.request import urlretrieve\n",
"import tarfile\n",
"\n",
Expand Down Expand Up @@ -297,8 +297,8 @@
" filt_int = np.interp(lamS, lamF, filt) # Interpolate Filter to common(spectra) wavelength axis\n",
"\n",
" if len(lamS) > 0:\n",
" I1 = simps(spec / lamS**2 * c * filt_int * lamS, lamS) # Denominator for Fnu\n",
" I2 = simps(filt_int/lamS, lamS) # Numerator\n",
" I1 = simpson(spec / lamS**2 * c * filt_int * lamS, x=lamS) # Denominator for Fnu\n",
" I2 = simpson(filt_int/lamS, x=lamS) # Numerator\n",
" fnu = I1/I2/c # Average flux density\n",
" else:\n",
" I1 = 0\n",
Expand Down Expand Up @@ -582,7 +582,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit c517e0d

Please sign in to comment.