People who code: we want your input. Take the Survey

# Tag Info

4

Frequency separations The easiest way to estimate the large separation (without fitting the individual frequencies) is to take the autocorrelation of the power spectrum and find the maximum. That's a start. To find the small separation, you'd be looking for a second peak. Anyway, have a look at the autocorrelation of the pwer spectrum and see if you can see ...

3

I asked this question on the Signal Processing exchange as well. Eventually I found the answer myself and posted it there. Here I copy/paste my answer as posted there. After many weeks I give the answer to my own question. There is a limit in which we can solve this problem in a reasonably simple way. Suppose we sum enough points in our DFT that the ...

2

You start at the wrong end. Your question is about how to do it with a vector of length $N$ in Matlab but your question states that you are not clear about what periodic noise actually means in this case. You can't ask how to do something you don't yet understand. You first need to understand what it is you want to do, and then actually doing it will become ...

2

The reason that Python code is slower than the equivalent Matlab code is usually that in Matlab, more computations are carried out by libraries that are written in a lower-level language, and heavily optimized. Luckily, you can do the same in Python. For example, Matlab is linked against (and bundles) Intel's hand-tuned MKL library, while Python (that is,...

2

You may start with median or Gaussian filters. There are many libraries that implement them and they are simple to use. That said, I think this approach may be not enough because from what I've seen this noise is not an image noise in the classical sense, i.e. it's not randomly distributed 'dots', but rather periodic 'waves' and their presence is connected ...

2

For an operator $R$ to be linear, it has to satisfy two conditions: $R(f+g) = Rf + Rg$ for any two operands $f,g$; $R(\alpha f) = \alpha Rf$ for any operand $f$ and (real or complex) number $\alpha$. This is true for the Radon transform, as one easily verifies. Whether compressed sensing can be applied to it is something beyond my realm of knowledge.

2

This is due to an implicit time shift, which corresponds to a phase shift, perceived here as a sign inversion. The signal you are Fourier transforming is symmetric around t=0 and this is why you should expect a positive power spectrum. However, the discrete Fourier transform (DFT) of a time-series $x_n$, which is what the FFT alorithm implements, is ...

2

Fitting the peaks of gamma spectra is a typical task in non-destructive analysis of spent fuel or neutron activation analysis. Since these applications are already "quite old", there is some standard software available, like Genie 2000. A paper Evaluation of Peak-Fitting Software for Gamma Spectrum Analysis from 2015 compares a number of these tools. However,...

2

It seems like your goal is to get an accurate numerical solution for you differential equation, which likely does not require you to code your own ODE solver. In that case, it is likely more efficient for you to reframe your problem for use in an ODE solver in your programming environment of choice. A standard first step is to rewrite your equation as a ...

1

Welcome to scicomp! If I remember correctly, then in order to Fourier transform a function it has to be a periodical so that you can use the sine and cosine functions as base for it. In your case the peak will have a discontinuity in the derivative at the ends at x=30 or x=-30. The Fourier base is not well suited for discontinuities. If my hunch is correct, ...

1

If I understand you correctly, you have a periodic reference signal with pulses, and a list of the local maxima. From every local max, search for the nearest reference signal pulse and measure the distance (shift). If the frequency of your reference signal and the measured one is the same, than this shift should always point in the same direction. If you ...

1

Since convolution can be written as a matrix-vector product $Ax=b$ of a circulant or Toeplitz matrix $A$ acting on a vector $x$, you can invert or pseudoinvert via SVD $A$ to obtain $x=A^{-1}b$. That said, FFT deconvolution will always be dramatically faster than this approach and should be preferred unless the kernel function ($h$ in your example above) has ...

1

If you want the amplitude at a single frequency $f_0$ then you can multiply your signal by $e^{-j 2\pi f_0}$ and then use a simple moving average filter to remove other frequency components. This is probably the most efficient way, computationaly. Especially if you store $\sin$ and $\cos$ values in a look up table.

1

This is not my field any more, but when I was a student, I remember people advocating the use of Markov Chain for this kind of things. Maybe something to search for, although I expect that things have moved on since. Indeed the paper you mention seems to be an evolution of it. I don't really understand why the "Texas method" is not working, not having read ...

1

How to make that process faster? Well, firstly if you feel like having the time you could check the implementation, which I'm doing just right now. (Warning: I need to truncate links as stackexchange does not let me have more than 2 links) Code is here: assembla . com /code/PySpectrum/subversion/nodes/37/trunk/src/spectrum Giving a look at the package it ...

Only top voted, non community-wiki answers of a minimum length are eligible