signal-processing

Matplotlib slow with large data sets, how to enable decimation?

倖福魔咒の 提交于 2019-12-19 17:42:21
问题 I use matplotlib for a signal processing application and I noticed that it chokes on large data sets. This is something that I really need to improve to make it a usable application. What I'm looking for is a way to let matplotlib decimate my data. Is there a setting, property or other simple way to enable that? Any suggestion of how to implement this are welcome. Some code: import numpy as np import matplotlib.pyplot as plt n=100000 # more then 100000 points makes it unusable slow plt.plot

Remove jumps like peaks and steps in timeseries

有些话、适合烂在心里 提交于 2019-12-19 09:13:26
问题 I have quite a few sensors in the field that measure water pressure. In the past the height of these sensors have been changed quite a few times creating jumps in the timeseries. Since these timeseries are continuous and I have a manual measurement I should technically be able to remove the jumps (by hand this is easy, but there are too many measurements so I need to do it in python). I've tried removing the jumps using a median filter but this doesn't really work. My code: # filter out noise

Remove jumps like peaks and steps in timeseries

徘徊边缘 提交于 2019-12-19 09:12:48
问题 I have quite a few sensors in the field that measure water pressure. In the past the height of these sensors have been changed quite a few times creating jumps in the timeseries. Since these timeseries are continuous and I have a manual measurement I should technically be able to remove the jumps (by hand this is easy, but there are too many measurements so I need to do it in python). I've tried removing the jumps using a median filter but this doesn't really work. My code: # filter out noise

How do I plot the spectrum of a wav file using FFT?

*爱你&永不变心* 提交于 2019-12-19 06:55:50
问题 NOTE: This is not a duplicate, I have specific requirements other than related questions. To start with, I want to plot the spectrum of an audio file (.wav) just like what audacity does (similar: How to draw a frequency spectrum from a Fourier transform). So far I am able to read and write wav files. But my problem is I don't know exactly what values I need to pass to the FFT function. By the way I am using Exocortex for FFT in C#. The FFT function requires me to pass an array of complex

Change the playback rate of a track in real time on Android

我的梦境 提交于 2019-12-19 04:11:57
问题 I would like to know if somebody knows a library to changing the playback rate of a track in real time. My idea is to load a track and change its playback rate to half or double. Firstly, I tried with MusicPlayer but is was not possible at all and then I tried with SoundPool. The problem is that with SoundPool I can´t change the rate once the track is loaded. Here is the code I am using (proof of concept): float j = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate

Find period of a signal out of the FFT

一世执手 提交于 2019-12-19 04:10:33
问题 I have a periodic signal I would like to find the period. Since there is border effect, I first cut out the border and keep N periods by looking at the first and last minima. Then, I compute the FFT. Code: import numpy as np from matplotlib import pyplot as plt # The list of a periodic something L = [2.762, 2.762, 1.508, 2.758, 2.765, 2.765, 2.761, 1.507, 2.757, 2.757, 2.764, 2.764, 1.512, 2.76, 2.766, 2.766, 2.763, 1.51, 2.759, 2.759, 2.765, 2.765, 1.514, 2.761, 2.758, 2.758, 2.764, 1.513, 2

Find period of a signal out of the FFT

风格不统一 提交于 2019-12-19 04:10:12
问题 I have a periodic signal I would like to find the period. Since there is border effect, I first cut out the border and keep N periods by looking at the first and last minima. Then, I compute the FFT. Code: import numpy as np from matplotlib import pyplot as plt # The list of a periodic something L = [2.762, 2.762, 1.508, 2.758, 2.765, 2.765, 2.761, 1.507, 2.757, 2.757, 2.764, 2.764, 1.512, 2.76, 2.766, 2.766, 2.763, 1.51, 2.759, 2.759, 2.765, 2.765, 1.514, 2.761, 2.758, 2.758, 2.764, 1.513, 2

Extract audio frequency from instrument to find a musical note

China☆狼群 提交于 2019-12-18 18:24:08
问题 I'm trying to develop an Android app that extracts audio frequency from an instrument. I'm using Fast Fourier Transform method with Jtransforms. Here is what I have so far: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new readFrequencies().execute(); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the

C# library to do fft and ifft? [closed]

允我心安 提交于 2019-12-18 17:56:15
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . is there a free c# library to do the fast fourier transform and its inverse? 回答1: I believe this is what you're looking for. 回答2: Both Math.NET and Aforce are based on the Exocortex.DSP library. http://www.exocortex.org/dsp 来源: https://stackoverflow.com/questions/1676294/c-sharp-library-to-do-fft-and-ifft

Plotting FFT on octave

风格不统一 提交于 2019-12-18 15:00:27
问题 I know that FFT changes a function in the time domain to one showed in the frequency domain. However, when I try plotting said graph in the frequency domain, I can only get it to work properly by using the time as X-axis, when it was obviously supposed to be not that, but the frequency. Also, I can only get the amplitudes to match the ones in the original signal by dividing the y-axis by a certain integer. Why is that? Here's my code t=0:0.001:2 x=2*sin(20*pi*t) + sin(100*pi*t) subplot(2,1,1)