Ring Spectrum

Rotational Raman transition lines

[1]:
import skdoas
import sasktran as sk
import numpy as np
import matplotlib.pyplot as plt

%matplotlib inline
plt.rcParams['figure.figsize'] = [15, 9]
plt.rcParams['font.size'] = 15
[2]:
rrsn2 = skdoas.RotationalRamanLinesN2(440.0)
rrso2 = skdoas.RRSCrossSectionsO2(440.0)

wln2, csn2 = rrsn2.calculate_lines(25, 250.)
wlo2, cso2 = rrso2.calculate_lines(25, 250.)

plt.plot(wln2, csn2, label='N$_2$')
plt.plot(wlo2, cso2, label='O$_2$')
plt.title('Rotational Raman lines in air\nfor an incident photon of 440 nm')
plt.xlabel('Wavelength (nm)')
plt.ylabel('Rotational Raman cross section (cm$^{-2}$)')
plt.legend()
plt.show()
../_images/examples_ring_spectrum_2_0.png

Ring effect source spectrum and differential Ring spectrum

[3]:
# high resolution solar irradiance
wlh = np.arange(400., 470., 0.01)
irrh = sk.SolarSpectrum().irradiance(wlh)

# convolve the irradiance
fwhm = 0.3
sigma = fwhm / (2 * np.sqrt(2 * np.log(2)))
x = np.arange(-np.round(5 * sigma, 2), np.round(5 * sigma, 2), 0.01)
gaussian = np.exp(-x**2 / (2 * sigma**2)) / (sigma * np.sqrt(2 * np.pi))
irrh = np.convolve(irrh, gaussian, mode='same')

# calculate the source spectrum and the differential Ring spectrum
wl = np.arange(405., 465., 0.1)
rrs = skdoas.RingSpectrum(wlh, irrh)

# shortcut - only compute cross sections and convolve once
source = rrs.source_spectrum(wl)
ring = rrs.differential_ring_spectrum(wl, last_source=True)

# full calculation - compute cross sections and convolve at every wavelength
rrs.full = True
source_full = rrs.source_spectrum(wl)
ring_full = rrs.differential_ring_spectrum(wl, last_source=True)

plt.figure()
plt.title('Incident solar spectrum')
plt.xlabel('Wavelength (nm)')
plt.ylabel('Irradiance (photons/s.nm.cm$^2$)')
plt.plot(wlh, irrh)

plt.figure()
plt.title('Ring effect source spectrum')
plt.xlabel('Wavelength (nm)')
plt.ylabel('Source spectrum')
plt.plot(wl, source_full, label='true')
plt.plot(wl, source, label='shortcut')
plt.legend()

plt.figure()
plt.title('Differential Ring spectrum')
plt.xlabel('Wavelength')
plt.ylabel('Differential Ring spectrum')
plt.plot(wl, ring_full, label='true')
plt.plot(wl, ring, label='shortcut')
plt.legend()

plt.show()
../_images/examples_ring_spectrum_4_0.png
../_images/examples_ring_spectrum_4_1.png
../_images/examples_ring_spectrum_4_2.png
[ ]: