Skip to content

A small program for converting atomic spectra to audible sound.

License

Notifications You must be signed in to change notification settings

hmvege/Elemental

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elemental

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.

Description

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

Installation

$ pip install .

Install in dev mode

$ pip install -e ".[dev]"

The quotes are included in case you are using zsh.

Downloading spectra

Download atomic spectra using

$ python spectra_retriever path/to/spectra/output/folder

Usage

Use elemental --help or rydeberg --help to view run commands.

Example using elementa

$ elemental U -lf spectra/U.dat -ln 20

Example using rydeberg

$ 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.

Testing

Run pytest to unit test code base.

About

A small program for converting atomic spectra to audible sound.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published