summaryrefslogtreecommitdiff
path: root/tutorials/module_4/spectroscopy problem/spectroscopy.py
blob: b3aeab53b9bc79a18056bd8684768193d724b96e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov  5 12:58:59 2025

@author: christian
"""

import pandas as pd
import matplotlib.pyplot as plt

Hg_data = 'Lampa_Calibrare_Mercur.xlsx'
Ar_data = 'Spectru Descarcare Argon.xlsx'

df_Hg = pd.read_excel(
    Hg_data,
    header=11,            # row number to use as header
    engine='openpyxl'
)

df_Ar = pd.read_excel(
    Ar_data,
    header=14,            # row number to use as header
    engine='openpyxl'
)

filtered = df_Hg[df_Hg['Pixels']>2000]

plt.figure(figsize=(8,5))
plt.plot(df_Hg['Pixels'], df_Hg['Intensity'], marker='o', linestyle='-')
plt.xlabel('Pixelse')
plt.ylabel('Intensity')
plt.title('Pixel-Intensity')
plt.grid(True)
plt.show()