Questions tagged [r]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
133 views

Discrepancies in 2D cross correlation results using FFT

I'm trying to implement 2D cross-correlation to acquire the displacement of these two small images (interrogation windows). The issue is that the result from Cross-Correlation (CC) is different ...
ahmathelte's user avatar
0 votes
0 answers
21 views

construct R data frame from audio file of sounds recorded from game app

I have an audio file (u8, 128kbps) of the sounds produced while playing a game app and clips of its three distinct sounds.​ ​ The file consists of sequences of these, separated by silences, indicating ...
Steve Dutky's user avatar
0 votes
0 answers
39 views

Reducing or removing autocorrelation in spatially correlated data

I am trying to figure out how one can reduce or preferably remove autocorrelation in spatially correlated data. Using the R code below, one generates spatially correlated data that is normally ...
Show's user avatar
  • 1
-1 votes
1 answer
195 views

Inverting (spectrogram vertical flip) a signal of WAV file

What I need is to invert a signal (on spectrogram it would look like a vertical flip) of a WAV file. Actually, of a bandpass of a signal - from 500 to 800 Hz, for example. This image will perfectly ...
Ivan G's user avatar
  • 1
0 votes
2 answers
150 views

Downsample (aggregate) raster by a non-integer factor, using a Gaussian filter kernel

The task is to downsample (aggregate) a raster from 100m pixel size to 460m. The aggregation should be performed using a Gaussian filter. To better understand the task, I am following the paper ‘The ...
Nikos's user avatar
  • 111
0 votes
1 answer
171 views

Taking The Inverse FFT And Extrapolating For Future Predictions In R

This is what I am trying to achieve: See how the increasing number of harmonics are creating a good fit? I am trying to find the components of a given wave (discrete samples), and then to make brief ...
user2877551's user avatar
0 votes
0 answers
108 views

Using kalman filter in R for sine wave frequency estimation

I'm pretty new to Kalman filtering techniques, and have a problem that I'm trying to solve. Imagine in a lake I have a splash generator that sends out sine waves across the lake. At various places ...
Paul D's user avatar
  • 1
1 vote
1 answer
185 views

How to upscale an image using a Gaussian filter in R?

I want to resample a raster from 15m to 460m using a Gaussian filter. The goal I am having a coarse image which I want to downscale. I also have a fine resolution band to assist the downscaling. The ...
Nikos's user avatar
  • 111
1 vote
1 answer
98 views

Why does applying fir filter in R (gsignal package) increase the magnitude of all values?

I am new to signal processing and I am sure this is a very rudimentary question. However I have done various searches and I cannot find an explanation (possibly because my knowledge is insufficient to ...
Chris's user avatar
  • 13
-1 votes
1 answer
125 views

How to get rid of noise in audio files?

Is there any method to get rid of noise in wite circles of the spectrogram? I have done the high pass filter for a cut-off frequency of 1 kHz. And I'v also done a adptive noise reduction in adbobe ...
Elyn's user avatar
  • 1
-1 votes
1 answer
271 views

How to get coordinates(x(time),y(frequency),z(intensity(db))) from spectrogram?

I have created this spectrogram from a wav file. Please have a look: I want to get the x = time, y= frequency, z=intensity(db) of every pixel of the spectrogram. How can I get these coordinates? I am ...
Elyn's user avatar
  • 1
0 votes
1 answer
617 views

Creating a 4th order Butterworth filter R

I have sampled my data at 2000 Hz and want to generate a fourth order low-pass zero-lag filter with a cut-off frequency of 150 Hz. I have put the code below that I have created but I have the ...
Lucysmithh 's user avatar
1 vote
1 answer
208 views

Butterworth filter's gain formula does not agree with R's `signal` package

I'm trying to calculate the Butterworth filter gain. If I use the formula mentioned on Wikipedia: $$ G^2(\omega) = \frac{G_0^2} {1+\left(\frac{j\omega}{j\omega_c}\right)^{2n}} $$ I don't get a ...
Crataegus's user avatar
1 vote
1 answer
369 views

trying to reproduce the behavior of initial conditions for the filter delays of scipy lfilter with R

I'm trying to reproduce the behavior of lfilter and lfilter_zi (from scipy) in R (using signal package if possible). This is the example provided by ...
Bruno's user avatar
  • 13
0 votes
1 answer
342 views

Simulate butterworth filter with initial condition of state vector in R

I'm working in R with the packages signal and control (don't know wether these are even the best for my use case). I have a high ...
Chen Huang's user avatar
1 vote
2 answers
264 views

Coefficient weights of Simple Moving Average (SMA) on SMA

A simple moving average (SMA: arithmetic mean) is a low-pass FIR-filter. When you cascade 2 SMA's with a window of length $n$, so when you apply the second SMA on the output of the first SMA, and you ...
MisterH's user avatar
  • 317
0 votes
0 answers
29 views

Structural time series model with multiplicative error term

I have a noisy time series measurement of a biological signal which I need to smoothen. I believe that the error of the measurement is proportional to the signal strength. I am currently working in R ...
Paul's user avatar
  • 1
1 vote
0 answers
43 views

Time spans in coherence computation

Currently I'm writing my master thesis and I'm having troubles with coherence definition. My question is similar to https://stats.stackexchange.com/questions/92412/clear-steps-to-calculate-coherence-...
Jorge Mendoza Ruiz's user avatar
1 vote
1 answer
48 views

Problem getting DTW to work for speech recognition

I used my ipad to record the words "This. Is. A. Test. This. Is. A. Test.", then downloaded it to my computer as a .MOV file and used ffmpeg to extract audio as WAV. I then used the tuneR package to ...
Alex H's user avatar
  • 13
0 votes
2 answers
2k views

Meaning of wavelet and scaling coefficients

What is the meaning of wavelet coefficients and scaling coefficients? E.g. for a sequence I obtained the following wavelet coeffients. How am I supposed to interpret them? I used ...
Mark's user avatar
  • 369
1 vote
0 answers
104 views

FFT freqency bin center in R

I'm trying to do a spectral analysis in R. I learned it in Python from Allen Downey's ThinkDSP book. What is the R equivalent of the Python numpy function, numpy.fft.fftfreq? If you provide a window ...
Jai Jeffryes's user avatar
1 vote
1 answer
844 views

fft function in R vs spec function from 'seewave' package? They don't give a similar frequency spectra

I understand that spec will give me the frequency and the corresponding amplitude of that component, whereas fft will compute the DFT of the signal and throw the complex numbers for each component ...
Rutuja Chhajed's user avatar
0 votes
1 answer
107 views

Unexpected frequency components found in Periodogram

I am trying to make sense of Digital Signal Processing with the help of R language. So, the issue came up when I tried to create a periodogram for a simple sine wave. The regular periodogram shows 2 ...
Argon's user avatar
  • 101
0 votes
0 answers
10 views

impact of lombard effect on language identification

I have collected samples for 2 different languages. Now i need to extract MFCC features and identify which language using wave files. I need to do classification using R studio and perform an ...
swarna's user avatar
  • 1
3 votes
4 answers
460 views

Estimate peak width from a vector that is a superposition of unknown number of identical Gaussian peaks with different heights?

If you have a vector that is a superposition of an unknown number of identical Gaussian shaped peaks/impulses of unknown width (but all the same width) and different amplitudes (with Poisson or ...
Tom Wenseleers's user avatar
4 votes
1 answer
4k views

How to make a Power Spectral Density Plot in R

I have a time series point process representing neuron spikes. I have computed and plotted autocovariance using acf but now I need to plot the Power Spectral ...
Matthew Ciaramitaro's user avatar
2 votes
0 answers
244 views

Octave filtfilt converted to R code

R has a function called filtfilt that performs zero-phase digital filtering by processing the input data in both the forward and reverse directions. But it suffers from having steep transition bands....
user3511894's user avatar
-1 votes
1 answer
196 views

Pitch Calculation Error via Autocorrelation Method

Aim : Pitch Calculation Issue : The calculated pitch does not match the expected one. For instance, the output is approx. 'D3', however the expected output is 'C5'. Source Sound : https://...
Argon's user avatar
  • 101
1 vote
1 answer
163 views

Reproducing paper results about a wavelet transformation using python [closed]

I have been reading this PhD theis about wavelets and I am trying to reproduce some of the results but I don't know the specific code to use to generate similar results. The original time series ...
Dnaiel's user avatar
  • 113
2 votes
1 answer
3k views

How to Calculate the Ambiguity Function

(Maybe this should be on Stackoverflow instead ...) What is the best way to calculate the ambiguity function? There are different implementations out there for Python (like PyTFTB or from ...
ronnyworm's user avatar
0 votes
1 answer
600 views

Implementing FIR/IIR "alike" filter in R

I am new to signal processing. I am trying to simulate something similar to IIR/FIR filter with $k$ delays to imitate acoustic echo reflection. The difference equations for FIR and IIR respectively ...
Waqas's user avatar
  • 101
2 votes
1 answer
600 views

Finding baseline (reference) of nosiy data and lag/lead between 2 signals

I have 2 datasets which vary with time as shown in the figure - Sa – Red , Sb – BLACK . I am doing the analysis in R. The entire dataset and a segment of data from 30 - 31 s are shown below - - As ...
ACE's user avatar
  • 121
1 vote
3 answers
619 views

Analysis of vibration signals

I have a vibration signal coming from a motor measured from accelerometer (Irregular Time series) and I need to use these signals for analysis purpose. I am in need to transform this signal to some ...
dhinar1991's user avatar
1 vote
0 answers
610 views

Filter image in Fourier space imaginary components after ifft (R)

I want to high-pass filter an image in Fourier space. It works but the retransformed image has an imaginary part, what shouldn't be the case http://math.stackexchange.com/questions/867337/how-to-...
Rizzi's user avatar
  • 11
1 vote
3 answers
890 views

Amplitude cutoff following FFT

suppose I have a noisy sine wave (as R code): ...
Pascal's user avatar
  • 111
0 votes
1 answer
830 views

Implementing a bandpass filter in R - this code's logic confuses me

I am reading this "how to" in R: http://www.inside-r.org/howto/time-series-analysis-and-order-prediction-r I am confused about the tutorial's implemented band pass filter. In particular, here's the ...
user avatar
2 votes
1 answer
1k views

Finding circle in binary image (R, not matlab)

How would I extract the circular area of a binary image which looks like: The two rods emerging from the side of the circle are noise. I know of the hough transform in Matlab. However, I am using R ...
Omar Wagih's user avatar
10 votes
4 answers
7k views

How to perform a Rubberband-Correction on spectroscopic data?

I basicaly understood how the Rubberband/Baseline-correction works. The given spectrum is divided into (N) ranges. The lowest points in every range are determined. The initial baseline is built out ...
チーズパン's user avatar