<jupyter_start><jupyter_text>For Friday: Assignment 2 – upload a notebook to canvas that:1. Defines a function that takes as its input a wavelength in meters and a temperature in Kelvin and outputs the emitted blackbody flux E∗λ in units of Wm−2m−1 as defined in Eq. 2.13 in Stull Chapter 2 p. 362. Uses that function to reproduce Stull figure 2.93. Defines a second function that outputs the blackbody radiance L∗λ in Wm−2m−1sr−1 using the equation at the bottom of the Finding the flux given the radiance notes4. Makes another version of figure 2.9 that shows radiance instead of flux.<jupyter_code>def emittance(wavelength,temp):
    c1 = 3.74*10E7 
    c2= 1.44*10E3
    numer = c1/((wavelength)**5)
    ex = c2/(wavelength*temp)
    denom = math.exp(ex)- 1
    return numer/denom
x_axis = np.linspace(0.1, 40,10000)
y_axis = [emittance(x,255) for x in x_axis]
fig,ax = plt.subplots()
ax.plot(x_axis,y_axis)
ax.set(xlabel='Wavelength(μm)', ylabel='Eλ* (W m-2 μm-1)',
       title='Planck radiant emittance at 255K')

plt.show()
y = x_axis/np.pi
fig,ax = plt.subplots()
ax.plot(x_axis,y)
ax.set(xlabel='Wavelength(μm)', ylabel='Lλ* (W m-2 μm-1 sr-1)',
       title='Surface emitted radiance at 255K')

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1140562248995984, 'fraction_numerical': 0.04899598393574297, 'mean_word_length': 4.302127659574468, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '153017', 'license': 'MIT', 'n_tokens_mistral': 496, 'n_tokens_neox': 449, 'n_words': 151, 'path': 'assignments/Assignment 2 - PA.ipynb', 'repo_name': 'Pearl-Ayem/ATSC_Course_Work', 'size': '1245'}