Skip to content
Snippets Groups Projects

auditory input

Merged 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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading