A small program for converting atomic spectra to the audible spectrum.
There are two options for creating sounds from atomic spectra. One is using experimental data, which takes in the observed wavelengths of different spectroscopies. The other is using the Rydeberg formula, but which is limited to just the Hydrogen spectrum.
The wavelengths are generated by taking the wavelengths of the spectra wl
, and converting them to the Hertz by
spectra = 1 / wl * convertion_factor
where typically convertion_factor=100
.
The spectra is then used to build the output sound, by summing over all sine waves for each of the spectra,
sound = sum(sin(2 * pi * frequency * spectra * time))
the sampling rate is included in the time resolution,
N_length = N_seconds * sampling_rate
$ pip install .
$ pip install -e ".[dev]"
The quotes are included in case you are using zsh
.
Download atomic spectra using
$ python spectra_retriever path/to/spectra/output/folder
Use elemental --help
or rydeberg --help
to view run commands.
$ elemental U -lf spectra/U.dat -ln 20
$ rydeberg 4
-lf spectra/H.dat
gets the Hydrogen spectrum from a local file. -p
enables parallel processing with a default of 4 cores. -ln 5
makes the recording 5 seconds long.
Run pytest
to unit test code base.