Analysing the hydrogen line
From signal to spectrum
The HI line at 1420.4058 MHz is observed by computing the average spectrum of the signal and subtracting the background.
import numpy as np
from scipy.signal import welch
f, p = welch(samples, fs=2.4e6, nperseg=4096)
p_db = 10 * np.log10(p / p.max())
Reading the result
- The peak is the emission of neutral hydrogen
- The frequency shift gives the radial velocity (Doppler effect)
- More peaks indicate more gas clouds along the line of sight