Fast spectrogram

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

Hendrik
Posts: 21
Joined: Wed Aug 05, 2015 2:27 pm

Fast spectrogram

Post by Hendrik » Thu Jan 26, 2017 1:55 pm

Hi,

can you give me a sample solution for the fastest spectrogram (line) being possible
when using LighningChart?

The demo app is too slow and maybe full of unnecessary code lines to achieve this.

Thanks,
BR,
Hendrik

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Fast spectrogram

Post by ArctionPasi » Thu Jan 26, 2017 2:22 pm

Hi Hendrik,

doesn't the approach shown in "High-resolution spectrogram" example suit your purposes? It's not a line spectrogram exactly, but uses IntensityGridSeries instead.

What kind of resolution are you planning to display? Frequency resolution x Time resolution? How many updates / sec?
LightningChart Support Team, PT

Hendrik
Posts: 21
Joined: Wed Aug 05, 2015 2:27 pm

Re: Fast spectrogram

Post by Hendrik » Fri Jan 27, 2017 11:58 am

Hi,

I want to have the highest updaterate being possible.
That means the spectrogram should be updated 5 - 10 ms per spectrum data (200 points).
Competitor sample browser shows that this is possible.
I think your framework can do this as well.

BR,
Hendrik

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Fast spectrogram

Post by ArctionPasi » Fri Jan 27, 2017 2:08 pm

Hello,

the spectrogram can be shown in so many different ways. Heatmap / bitmap based, points based, line based, 3D surface based, 3D waterfall based etc...

E.g. by using High-resolution spectrogram example, data resolution of 2000 x 1000, solid > 60 FPS refresh rate can be achieved.
Spectrogram 2000x1000
Spectrogram 2000x1000
spectrogram2000x1000.jpg (511.34 KiB) Viewed 16682 times
Using spectrum size of 200, and time resolution of 10000 points (10 seconds Y axis, it means 1000 rows per second, that is, 1 ms data resolution). The FPS is approx 50.

Intensity grid series based approach is the typical way our customers want to show their spectrograms. Would you please indicate if you want something different.

Spectrogram, based on Lines (or LineCollections) of LightningChart, is not an optimal way to plot spectrogram, at least in performance aspect.

If IntensityGridSeries based approach is not suitable, one possible way is to use FreeformPointLineSeries, which supports individual point coloring, and automatic destruction of data when the given point count limit is exceeded. Please say if you want us to build a demo of this, it'll take days though.
LightningChart Support Team, PT

Hendrik
Posts: 21
Joined: Wed Aug 05, 2015 2:27 pm

Re: Fast spectrogram

Post by Hendrik » Tue Jan 31, 2017 7:57 am

Thanks for the info.

yes could you provide a sample? That would be great.
I must not be a line graph but the performance should be as fast as possible.

BR,
Hendrik

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Fast spectrogram

Post by ArctionPasi » Tue Jan 31, 2017 4:18 pm

OK, I'll experiment with different approaches and get back to you with optimal approach.
LightningChart Support Team, PT

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Fast spectrogram

Post by ArctionPasi » Wed Feb 01, 2017 5:19 pm

We optimized spectrogram rendering quite a lot. We are hoping to finish it this week and send a new version for your tests.
LightningChart Support Team, PT

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Fast spectrogram

Post by ArctionPasi » Fri Feb 03, 2017 11:01 am

Hi Hendrik,

FreeformPointLineSeries's IndividualPointColoring approach I tested gave about 25% - 50 % of refresh rate of IntensityGridSeries, so that approach is not optimal. In the other hand it gives additional appearance options, such as other shapes than square as well.

Instead I sent you a new version for your tests by e-mail, including VS project. The code included there is not applicable to current version. Hopefully are satisfied with our optimizations :)
LightningChart Support Team, PT

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Fast spectrogram

Post by ArctionPasi » Tue Mar 28, 2017 7:45 am

Hello,

we made high-resolution spectrogram example in our demo application. It replaces the old High-resolution spectogram (which was renamed as Spectrogram).

E.g. with 4K Ultra-HD resolution (both screen and data resolution), scrolling FPS is > 50 with my Intel i7 and Nvidia GTX 960. No down-sampling anywhere.
Hi-resolution 4K spectrogram
Hi-resolution 4K spectrogram
High-resolution spectrogram.jpg (1.57 MiB) Viewed 16311 times
This is currently the optimal way plot spectrograms as fast as possible. :D
LightningChart Support Team, PT