diff --git a/Lab 5/Lab 5.ipynb b/Lab 5/Lab 5.ipynb index ee3d2b0..de4bfeb 100644 --- a/Lab 5/Lab 5.ipynb +++ b/Lab 5/Lab 5.ipynb @@ -78,7 +78,7 @@ "source": [ "Make a plot of each star's spectrum as a function of wavelength. Please label the figures nicely using appropriate labels. For example: \n", "```\n", - "plt.xlabel(r'Wavelength ( \\$ \\textbackslash AA \\$ )'\n", + "plt.xlabel(r'Wavelength ( $ \\AA $ )'\n", "```\n", "\n", "The ```r``` before the string tells matplotlib that it should use Latex to render this. Please get the units right for the vertical axis. Hint: if you are unsure of how to write a symbol in Latex, try [http://detexify.kirelabs.org](http://detexify.kirelabs.org). " @@ -263,11 +263,11 @@ "source": [ "From this point, ```python``` actually makes our lives pretty easy. First, let's read in one of the spectral files (first column is wavelength, second column is flux density $F_\\lambda$):\n", "```\n", - "spec\\_data = np.loadtxt('f05.dat')\n", + "spec_data = np.loadtxt('f05.dat')\n", "```\n", "and then\n", "```\n", - "Flam = interpolate.interp1d(spec\\_data[:, 0], spec\\_data[:, 1], kind='cubic')\n", + "Flam = interpolate.interp1d(spec_data[:, 0], spec_data[:, 1], kind='cubic')\n", "```\n" ] }, @@ -275,7 +275,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now ```Flam``` is a function that you can call just like ```np.sin```. Calling this function will return an error if you ask it for the value outside the range of $x$-values you supplied to ```interpolate.interp1d```. **For the transfer function, we may assume that it is zero outside of the wavelength range given. Read the documentation page (check the keywords ```bounds_error``` and ```fill\\_value```) to make the function behave in this way.**" + "Now ```Flam``` is a function that you can call just like ```np.sin```. Calling this function will return an error if you ask it for the value outside the range of $x$-values you supplied to ```interpolate.interp1d```. **For the transfer function, we may assume that it is zero outside of the wavelength range given. Read the documentation page (check the keywords ```bounds_error``` and ```fill_value```) to make the function behave in this way.**" ] }, {