summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kolset <christian.kolset@gmail.com>2025-11-10 15:19:37 -0700
committerChristian Kolset <christian.kolset@gmail.com>2025-11-10 15:19:37 -0700
commit01b70c6416783dd24b1154fba8a39fd1b127faf8 (patch)
tree20393e414a680f2b927b5d82903b7f6605718412
parentc85402b74254a7321a419b482abfd603e3fb7499 (diff)
Updated module 4
-rw-r--r--tutorials/module_4/4.6 Data Filtering and Signal Processing.md1
-rw-r--r--tutorials/module_4/4.7 Data Visualization and Presentation.md1
-rw-r--r--tutorials/module_4/Schlieren example.md4
-rw-r--r--tutorials/module_4/Spectroscopy problem.md58
-rw-r--r--tutorials/module_4/spectroscopy_problem/spectroscopy.py16
5 files changed, 68 insertions, 12 deletions
diff --git a/tutorials/module_4/4.6 Data Filtering and Signal Processing.md b/tutorials/module_4/4.6 Data Filtering and Signal Processing.md
index 9ca3034..74b7cb0 100644
--- a/tutorials/module_4/4.6 Data Filtering and Signal Processing.md
+++ b/tutorials/module_4/4.6 Data Filtering and Signal Processing.md
@@ -27,7 +27,6 @@ Different filtering methods are used depending on the data set type, the nature
| Trend-based filters (time-series methods) | - Hodrick-Prescott filter<br>- Kalman filter<br>- Wavelet filter | Identify trends, remove seasonality, smooth fluctuations | Stock market analysis, climate data, sensor monitoring |
| Machine learning–based filters | - Anomaly detection algorithms<br>- Autoencoders<br>- Clustering-based filtering | Use AI and machine learning to detect and remove noisy or irrelevant data | Fraud detection, predictive maintenance, automated data cleaning |
-
## Frequency domain basics
So far, we’ve looked at data in the time domain, for example, Temperature(t), Pressure(t) or Displacement(t). The frequency domain is a different way of looking at the same information. Instead of asking _“how does this signal change over time?”_, we ask *“What frequencies make up this signal?”*. Every repeating vibration, oscillation, or wave can be described by the frequencies it contains. Transforming to the frequency domain helps us see the hidden structure of a signal, especially when it’s a mix of multiple oscillations.
diff --git a/tutorials/module_4/4.7 Data Visualization and Presentation.md b/tutorials/module_4/4.7 Data Visualization and Presentation.md
index f11f401..ea3fe1a 100644
--- a/tutorials/module_4/4.7 Data Visualization and Presentation.md
+++ b/tutorials/module_4/4.7 Data Visualization and Presentation.md
@@ -1,3 +1,4 @@
+#data #visualization #
# Data Visualization and Presentation
**Learning objectives:**
diff --git a/tutorials/module_4/Schlieren example.md b/tutorials/module_4/Schlieren example.md
index 718435a..f4eb6c2 100644
--- a/tutorials/module_4/Schlieren example.md
+++ b/tutorials/module_4/Schlieren example.md
@@ -7,9 +7,7 @@ Summary of things to ask students to do:
Read density data.
-
-Compute density gradient for each
-
+Compute density gradient for each image
Make Schlieren image for each
diff --git a/tutorials/module_4/Spectroscopy problem.md b/tutorials/module_4/Spectroscopy problem.md
index 57770bb..0e9af66 100644
--- a/tutorials/module_4/Spectroscopy problem.md
+++ b/tutorials/module_4/Spectroscopy problem.md
@@ -29,23 +29,23 @@ Requirements:
# Example problem on Data Processing - Optical Emission Spectroscopy
- Import xls data into Python
-- Plot the Intensity [a.u.]  vs pixels
+- Plot the Intensity [a.u.] vs pixels
- Interpolate and convert x-axis from pixels to nm (true wavelength) using Hg lamp data (using data in file: **Lampa_Calibrare_Mercur.xlsx**)
- Find response function of the spectrometer using the tungsten lamp data from file: "**Calibrare Intensitate Oxigen.xlsx**)": $R=\frac{I_{measured}}{I_{true}}$ (where True is computed by Planck's law of radiation (see notes in the pptx above)
- Convert y-axis from Intensity [a.u.] into Intensity in [W/(cm^2*sr*nm)] by dividing the measured Oxygen spectrum with the response function: $I_{oxygen, true}=\frac{I_{oxygen, measured}}{R}$
-- Once the spectra is in real units: compute the density of one of the oxygen lines by integrating underneath one of the peaks (see equation from Slide 39 - bottom). We will give all of the constants that are in this equation (see the "I**ntensity_Calibration_Oxygen_Discharge_Solution.xlsx**")
+- Once the spectra is in real units: compute the density of one of the oxygen lines by integrating underneath one of the peaks (see equation from Slide 39 - bottom). We will give all of the constants that are in this equation (see the "**Intensity_Calibration_Oxygen_Discharge_Solution.xlsx**")
---
# Spectroscopy
-A spectroscopy experiment is set up to collect the spectra discharges of Argon and Oxygen (figure 1). The data obtained from the spectrometer represent the light intensity measured across different pixel positions on the detector. Since this is unit-less we will need to calibrate the experiment with a know light source to be able to obtain useful results.
+A spectroscopy experiment is set up to collect the spectra discharges of Argon and Oxygen (figure 1). The data obtained from the spectrometer represent the light intensity measured across different pixel positions on the detector. Where both the light intensity and the pixel position don't have any units. To solve this problem we will need to calibrate the set-up by comparing light sources of know wavelengths and intensity. This will allow us to obtain useful results for other unknown light sources.
<img src="image_1762363220163.png" width="530">
*Fig 1: Spectroscopy experiment set-up for characterization for a plasma source in Argon and Oxygen.*
### Calibration of spectrometer
-Problem 1: Plot the intensity of the mercury lamp as a function of pixel count.
+Problem 1: Plot the intensity of the mercury lamp as a function of pixel count.
-Problem 2: Calibrate the wavelength readings (x-axis) by converting the pixel count to true wavelength ($nm$) by using linear regression. The following equation can be used:
+Problem 2: The goal want to convert our distance dimension units from pixel to wavelength. To calibrate the wavelength readings (x-axis) by matching the peaks of the spectra to literature data. To calibrate the wavelength readings (x-axis), use linear regression to convert the pixel count to true wavelength ($nm$). The following equation can be used:
$$
\lambda_p=I+C_1p+C_2p^2+C_3p^3
$$
@@ -85,3 +85,51 @@ $$
n_{1,2}=\frac{\int_{\lambda_0-\Delta\lambda}^{\lambda_0+\Delta\lambda} I(\lambda)d\lambda}{\frac{1}{4\pi}hv_{1,2}A_{1,2}l}\tag{1}
$$
+
+
+
+---
+
+Calibrate wavelength by converting the length dimension from pixels to nm.
+- Use polymonomial interpolation to find the coefficients to the function that converts pixels $[N]$ -> $\lambda$ $[nm]$
+$$
+\lambda_p=I+C_1p+C_2p^2+C_3p^3
+$$
+- Solve for C1 C2 and C3, use $I=195.54$
+
+Calibrate the y-axis
+- Find the response function of the spectrometer
+$$
+R(\lambda)=\frac{I_{measured}}{I_{true}}
+$$
+- $I_{measured}$ => Intensity array from Mercury (Hg)
+- $I_{true}$ => Data from tungsten lamp using planks law of radiation
+$$
+I_{\lambda,\Omega}(T)= \epsilon (\frac{2hc^2}{\lambda^5}\frac{1}{e^{hc/kT}-1})
+$$
+- T=1800K
+
+- Use $R(\lambda)$ to correct spectra for plasma
+$$
+I_{measure}^W = R(\lambda) * I_{true}^W(\lambda)
+$$
+$$
+I_{meas}^{plasma}(\lambda) = R(\lambda) * I_{true}^{plasma}(\lambda)
+$$
+$$
+I_{meas}^{plasma}(\lambda) = \frac{I_{meas}^{W}(\lambda)}{I_{true}^{W}(\lambda)} * I_{true}^{plasma}(\lambda)
+$$
+
+
+Measure the densities of an excited state of oxygen using $I(\lambda)$
+$$
+I(\lambda)=\frac{1}{4\pi}hvAnl\phi(\lambda-\lambda_0)
+$$
+- We can re-arrange to solve for $n$ in units of $[cm^{-3}]$
+$$
+n_{1,2}=\frac{\int_{\lambda_0-\Delta\lambda}^{\lambda_0+\Delta\lambda} I(\lambda)d\lambda}{\frac{1}{4\pi}hv_{1,2}A_{1,2}l}\tag{1}
+$$
+
+
+
+
diff --git a/tutorials/module_4/spectroscopy_problem/spectroscopy.py b/tutorials/module_4/spectroscopy_problem/spectroscopy.py
index e195fbd..f32ca52 100644
--- a/tutorials/module_4/spectroscopy_problem/spectroscopy.py
+++ b/tutorials/module_4/spectroscopy_problem/spectroscopy.py
@@ -9,7 +9,7 @@ Created on Wed Nov 5 12:58:59 2025
"""
Problem:
-
+
- Import xls data into Python
- Plot the Intensity [a.u.] vs pixels
- Interpolate and convert x-axis from pixels to nm (true wavelength) using Hg lamp data (using data in file: **Lampa_Calibrare_Mercur.xlsx**)
@@ -18,9 +18,11 @@ Problem:
- Once the spectra is in real units: compute the density of one of the oxygen lines by integrating underneath one of the peaks (see equation from Slide 39 - bottom). We will give all of the constants that are in this equation (see the "I**ntensity_Calibration_Oxygen_Discharge_Solution.xlsx**")
"""
+import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
+
Hg_data = 'Lampa_Calibrare_Mercur.xlsx'
#Ar_data = 'Spectru Descarcare Argon.xlsx'
Ox_data = 'Calibrare Intensitate Oxigen.xlsx'
@@ -33,6 +35,7 @@ df_Ox = pd.read_excel(Ox_data, header=3, engine='openpyxl')
# Trims mercury data to the first 2000 pixels
df_Hg = df_Hg[df_Hg['Pixels']<2000]
+
"Plot Intensity vs Pixels for mercury"
# Plot Hg intensity-pixel plot
@@ -45,7 +48,14 @@ plt.grid(True)
plt.show()
+"Calibrate length dimension"
+np.polyfit(df_Hg['Pixels'],df_Hg['Intensity'],3)
+"Calibrate intensity dimension"
+epsilon = # Surface emissivity
+lambd =
-
-
+I_W_true = epsilon*((2hc**2)/(lambd**5)*1/(e**(hc/kT)-1))
+I_W_meas= df_Ox['I_Tungsten [a.u.]']
+R=I_W_meas/I_W_true
+I_plasma_meas=R*I_plasma_true