Python is a high-level interpreted general programming language. Python has popular numerical and scientific libraries/packages, most notably numpy and scipy. The scipy.signal package is a powerful signal processing software collection. This tag covers the use of numpy, scipy, and other Python packages often used for SP computations.
Questions tagged [python]
1294 questions
18
votes
4 answers
Counting the number of groups of 1s in a boolean map of numpy.array
I am right now dealing with some image processing in Python via PIL (Python Image Library). My main aim is counting the number of colored cells in an immunohistochemistry image. I know that there are relevant programs, libraries, functions and…
Ibrahim C. Kurt
- 181
- 1
- 1
- 5
6
votes
1 answer
Implementing logarithmic AGC (automatic gain control)
I'd like to implement the Log(arithmic) AGC from
Understanding Digital Signal Processing
But with
import numpy as np
import matplotlib.pyplot as plt
def signal():
cycles = 15
resolution = cycles * 20
length = 2 * np.pi * cycles
x…
ge45mue
- 163
- 4
2
votes
1 answer
(python+opencv) haar cascade training using cloud computing
I will train my own cascade, using python and opencv. I want it to be as precise as possible, so as I read it is common that training takes one or two weeks to compile. I want to use cloud computing to not wait that long. I research but cannot find…
talha
- 21
- 2
1
vote
1 answer
converting an accelerometer oscillogram to a velocity oscillogram using python
I have some signals in csv taken from an accelerometer. These come from vibration data of gearboxes.
With scipy I can easily get its frequency (in terms of acceleration) by applying the RFFT to the oscillogram (I am also using a Hanning…
Eduardo
- 13
- 3
1
vote
0 answers
Virtual Audio Device Python
I'm looking to create a program where I take an audio input stream, whether it be microphone or an audio file etc. Perform some arbitrary processing to it and then output this signal to a virtual microphone.
The part I'm struggling with is the…
Will D
- 11
- 4
1
vote
1 answer
Is it a correct way to calculate the Mean Square Displacement as function of time?
I would like to know if I calculate the MSD correctly, here is a Jupyter snippet I am using:
import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
%matplotlib inline
x = np.random.randn(100)
df = pd.DataFrame(x,…
0x90
- 535
- 9
- 20
1
vote
0 answers
biphasic Pulse Characterization
I've been searching for a few days for a simple c/c++ or python library that will help me gather parameters from a pulse similar to the one in the image below. I will be getting the data from an NI PXI oscope or digitizer and am looking for a…
JeffCharter
- 111
- 1
1
vote
1 answer
How to find the inflection point in a noisy curve?
I have the the noisy curve defined by numpy 2D array:
As you can see, it has the first flat segment, then rise, peak and decay phases. I need to find the starting point of the rise phase, marked here by the red dot. What algorythm can I use for…
Axon
- 121
- 1
- 3
0
votes
0 answers
Looking for paper about applications of using phase screen to model space laser communication
A phase screen is a concept used in wave optics to model the statistical properties of wavefront aberrations caused by a medium. In the context of light propagation through atmospheric turbulence, for instance, the phase screen is used to simulate…
138 Aspen
- 188
- 4
0
votes
0 answers
Plot an eye diagram with a cmap 'hot'
I'd like to plot an eye diagram with a 'hot' colormap that becomes clearer not when the signal has high values, but when the signal is dense at an instant in time, see picture below.
Here is what I've already done:
def prbs_generation(size=15,…
user70072
- 23
- 3
0
votes
0 answers
I have a distorted signal and want to achieve a perfect wave in the output. What am I doing wrong?
I've been told to use a digital filter, but this solution achieves what I've been told to do.
It is so simple it is dumb, what am I missing here? I want to be more scientific about it.
from matplotlib import pyplot as plt
import numpy as np
# Set…
kovyakov
- 1
- 1
0
votes
0 answers
Loading several FITS files using the HARPS-N data set of CCF files via Python
I am attempting to load several FITS files using the HARPS-N data set of CCF files.
r.HARPN.2018-01-18T14:20:10.645_CCF_A.fits
This is not cubed data, it is in the following structure.
r.HARPN.2018-01-18T14:20:10.645_CCF_A.fits
No. Name Ver …
AlbPet
- 1
0
votes
2 answers
How can I generate a sine wave with time varying frequency that is continuous in PYTHON!
The question was asked before in C: How can I generate a sine wave with time varying frequency that is continuous? How can I resolve the following problem? I want a continuous graph.
But how do I do I do it in python???
my code is
import numpy as…
Cara
- 11
- 1
- 1
0
votes
1 answer
How to find the shape of the highs from a noisy signal with many dips
I try to find that looks something like the red curve below and I am pretty clueless what is the best way. I tried first the Savitzky-Golay Filter, then I tried a simple fit with a second degree polynomial, then I tried a Hilbert transform to get…
Maxim
- 105
- 4
0
votes
1 answer
How to find first local maxima in an unknown dataframe
I get a Dataframe in Python with multiple maxima and minima, I want to find always the first maxima/minima in the frame and ignore the other ones. The problem is that the data has a lot of noise and the datapoints come at different values, so I can…
Maxim
- 105
- 4