Skip to content

auditory input

Paul Surrey requested to merge feat/sound into main

I added some means to listen to the recorded noise samples. This might help to debug setups, especially hunting for 50Hz noise, in the case of not being able to see and observe the plot. The play option should allow the scientist to also use another sense: their ears.

from tempfile import mkdtemp
from pathlib import Path
from python_spectrometer import Spectrometer
from python_spectrometer.daq import QoptColoredNoise
def spectrum(f, A=1e-4, exp=1.5, **_):
    return A/f**exp
daq = QoptColoredNoise(spectrum)
spect = Spectrometer(daq, savepath=mkdtemp(), play_sound=True)

#%%
spect.take('a comment', f_max=20000, A=2e-4)

Merge request reports

Loading