Displaying Spectrogram's Past Data

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
jeonhui
Posts: 4
Joined: Mon Sep 16, 2019 4:02 am

Displaying Spectrogram's Past Data

Post by jeonhui » Mon Sep 16, 2019 4:54 am

Hello?
First, I am sorry for my poor English.
I'm developing software for Spectrogram.
Implementation is in progress by referring to the High-resolution Spectrogram of the demo application.
The example code in this demo application indicates that you are drawing a spectrum using IntensityGridSeries .
What I want to develop is to allow users to see past data by doing something (e.g., using a mouse wheel, etc.).
The picture below shows the chart that I'm currently implementing. I only added the ability to suspend the display of data. There is little difference in how the demo application is implemented.
After suspending the display of the data, the function of viewing past data using a specific action is desired.
I am attaching more pictures to help you understand my question.
2.JPG
2.JPG (142.85 KiB) Viewed 4970 times
3.JPG
3.JPG (183.04 KiB) Viewed 4970 times
I hope my intentions will be well communicated.
I know you're busy, but thank you for your time.

Arction_LasseP
Posts: 141
Joined: Wed Mar 27, 2019 1:05 pm

Re: Displaying Spectrogram's Past Data

Post by Arction_LasseP » Mon Sep 16, 2019 12:02 pm

Hello,

This should be possible to do, but might be a bit tricky. The problem is that due to technical reasons you cannot have a huge continuous IntensityGridSeries that you can just scroll back. Standard PCs nowadays use DirectX 11 with maximum texture dimension limited to 16384 which can prevent this. Furthermore, dotNET has a limit for array sizes - 2GB per array (though can often be increased by setting LargeAddressAware flag). Because of these you might not be able to just have all the current and past data points stored in a single array. Also the performance might be significantly decreased.

One way to do this is to have a separate data array for the past points. For instance, you could store the data you want to see later in that array, and then show it by assigning that as the data for the spectrogram.

_spectrogram.SetColorsData(_colorsDataPastPoints, IntensityGridValuesDataOrder.RowsColumns);
_spectrogram.InvalidateColorsOnly();

You can also switch back to the main (current) data the same way.
Of course, each new array you create for the past points will increase the memory used by your application. Therefore you should carefully consider how many separate arrays for past data points you need, as it most likely is not wise to store all the past data in arrays if your application should be running for hours for example. If you only need to show the first seconds, this approach should work perfectly fine.

Hope this helps.
Best regards,
Lasse

jeonhui
Posts: 4
Joined: Mon Sep 16, 2019 4:02 am

Re: Displaying Spectrogram's Past Data

Post by jeonhui » Mon Sep 23, 2019 10:40 am

The answer was very helpful to me in programming. Thank you very much. :)

Post Reply