Sorry for the delay… need to make the graphics etc available. New users can only provide 1 graphic…
Here are excerpts from the code and 3 plots…correction 1 plot
Excerpts
-
Get data
-
iq = numpy.fromfile(self.hfile, dtype=self.datatype, count=self.block_length)
-
reals = numpy.array([r.real for r in self.iq])
-
imags = numpy.array([i.imag for i in self.iq])
-
time = numpy.array([i*(1/self.sample_rate) for i in range(len(self.reals))])
Plots
self.sp_iq = self.fig.add_subplot(2,1,1, position=[0.075, 0.14, 0.85, 0.67])
self.sp_iq.set_title(("I&Q"), fontsize=self.label_font_size, fontweight="bold")
self.sp_iq.set_xlabel("Time (s)", fontsize=self.label_font_size, fontweight="bold")
self.sp_iq.set_ylabel("Amplitude (V)", fontsize=self.label_font_size, fontweight="bold")
self.plot_iq = plot(self.time, self.reals, 'bo-', self.time, self.imags, 'ro-')
self.sp_iq.set_ylim( -2.0, 2.0)
self.sp_iq.set_xlim(self.time.min(), self.time.max())
draw()
Update plots
self.plot_iq[0].set_data([self.time, self.reals])
self.plot_iq[1].set_data([self.time, self.imags])
draw()
Fig1a is the signal of interest coming into view
The program works as follows. You can call the python code with a filename. The IQ is plotted on the graph. You can use the < and > to move forward and reverse on the file to see the signal of interest.
I would like to utilize the series data to perform operations when the signal comes into view (fig1a).
I would like to look into the series data to find the start of the signal to process….much like an array.
I could use an FFT to perform this but it is expensive for the CPU. I am hoping to use matplotlib to be able to extract the signal for processing if possible.
Hope this helps.
···
From: Hannah via Matplotlib [mailto:nobody@discourse.matplotlib.org]
Sent: Friday, June 19, 2020 3:55 PM
To: jlabhart@tcsi-tx.com
Subject: [Matplotlib] [Community] Set_ylim usage/features
|
story645
June 19
|
Hi, can you please post a sample of your image and code? It’s hard to sort out exactly what you’re asking for…is this static or interactive?
Visit Topic or reply to this email to respond.
To unsubscribe from these emails, click here.