Skip to main content

All Questions

8 votes
2 answers
528 views

Fourier Series of a given function

This is a very simple code that expresses a function in terms of Trigonometric Fourier Series and generates a animation based on the harmonics. I would like to know some ways to improve the ...
Lipe's user avatar
  • 83
4 votes
0 answers
993 views

Slow copying of memmap array to numpy array

I have multiple binary (structured) file, each of 2GB, which I am currently reading in pair, using memmap to cross-correlate the same. I want to minimise the time required by this IO process, in the ...
Pavan Uttarkar's user avatar
5 votes
1 answer
336 views

Implementing 3Blue1Brown's description of Fourier transform in Python+numpy

I have implemented the 3Blue1Brown's description of Fourier transform in Python+numpy for irregular and unsorted data, as described here. ...
Foad's user avatar
  • 369
9 votes
1 answer
4k views

Bilinear image interpolation

I have written a bilinear interpolant, which is working moderately well except that is painfuly slow. How can rewrite the code to make it faster? Using opencv directly isn't a valid answer. ...
Lin's user avatar
  • 295
3 votes
1 answer
1k views

Hurst Exponent calculator

I am aiming to compute the Hurst Exponent of a 1-D signal time series in Python. For now, I have one existing function hurst(sig) which returns the Hurst exponent ...
Matthew Anderson's user avatar
2 votes
0 answers
2k views

Gray-level co-occurrence matrix feature computation

I have many images and want to compute the GLCM properties for every image. Below my code that runs many hours to complete the task: ...
Gilfoyle's user avatar
  • 1,167
4 votes
2 answers
168 views

Poor performance for signal processing

I have a program doing a LOT of iteration (thousands to millions to hundreds of millions). It's starting to take quite a lot of time (few minutes, to a few days), and despite all my effort to optimize ...
Mathieu's user avatar
  • 251
4 votes
0 answers
5k views

Applying hysteresis to a signal

Using python 3.6. I have written this code (below) to apply hysteresis to a signal (a numpy array). My aim was to create a function that didn't require any loop to remember the previous state of the ...
James Schinner's user avatar
4 votes
2 answers
225 views

Temporal kernel filtering on video frames coming in a loop

I have a video which I read in a loop frame by frame. For every frame, I want to do temporal kernel filtering, the coefficients of which come from the input variable model (a dictionary). The temporal ...
GKS's user avatar
  • 159
2 votes
1 answer
1k views

Find signal's maximum peak in window

I have a 9-dimensional signal (as a csv from this Gist) that looks like this: A signal peaks every 30 steps. I want to get the maximum values of the peaks in that ...
Seanny123's user avatar
  • 1,585
2 votes
1 answer
2k views

Generate a random discrete signal

I currently have this code to generate a discrete signal with random amplitudes, but a fixed frequency: ...
Seanny123's user avatar
  • 1,585
9 votes
4 answers
17k views

Recursively Save Python Dictionaries to HDF5 Files Using h5py

I have a bunch of custom classes for which I've implemented a method of saving files in HDF5 format using the h5py module. A bit of background: I've accomplished ...
stefco's user avatar
  • 103
12 votes
1 answer
12k views

Simple Phase Locked Loop

Here is a simple Phase Locked Loop, which is a circuit used in radio communications for synchronisation between transmitter and receiver. The loop works by calculating the (phase) difference between ...
Tom Kealy's user avatar
  • 505
5 votes
1 answer
252 views

Comparing FFTs to deduplicate IVR recordings

I've got a Python script that traverses two file trees, checking all .wav files for duplication. I'm still an undergrad, and have never worked with audio before. I'm not entirely sure this is going ...
Will's user avatar
  • 153
6 votes
1 answer
2k views

Python implementation of multidimensional power spectral density with Welch method

I have done my best to write Welch method implementation for python for multidimensional time series and still in the case of one dimensional time series I am getting inconsistent response compared to ...
Naji's user avatar
  • 191

15 30 50 per page