[Kst] Kst - data export

Barth Netterfield barth.netterfield at utoronto.ca
Mon Jan 4 14:18:43 UTC 2016


Hi Jorge,

Happy new years!

Sorry about the relatively high level of silence from my end.  It looks like I 
will be able to spend a lot more of my subway time on kst this spring 
however :-)

I can not see a way to implement this in kst currently. 
-We can't currently access fields in a data source as strings.
-We can't currently trigger a python script from within kst2.
-The scripting currently doesn't have any access to mouse coordinates.

But:

Are you imagining that the external file is constantly appended to as you 
move the mouse?  Or would the user do something (eg, hit a  key?) to 
trigger an event.

I think a semi-general approach would be to add a PyKst call that would 
return a structure with lots of useful state information (frame information, 
cursor position, list of key/mouse events since the last call).  Then a 
python script could poll kst2 waiting for whatever you want, then the 
python could go off and parse files to its heart's content.  Sound ok?

In a couple of commutes, I could add something to PyKst to make this 
possible if you think it would be useful.  I think it could be pretty cool.

Are you running windows?  If so, I might need some help in getting it all 
working there.  I /think/ python scripting works fine in windows, but... I don't 
run windows (the Win 10 upgrade has managed to bork my windows 
partition) myself.

cbn

On October 21, 2015 1:01:18 PM Huber, Jörg wrote:

> Hello Barth,
> 
> is there any possibility to export data of vectors from Kst to a specified
> file – e.g. csv-file?
 
> The aim would be to export different vectors at a given time depending
> cursor position of x-axis.
 
> In mode “Highlight Data Points” data point moves over vector vs x-axis
> (time).
 
> While moving over curve data of defined vector(s) should be exported 
for use
> in another application.
 
> 
> 
> See example below:
> 
> 
> 
> Data vectors in Kst (logged PLC data)
> 
> 1.       DateTime
> 
> 2.       speed
> 
> 3.       current
> 
> 4.       torque
> 
> 5.       faults 01-16*
> 
> 6.       faults 17-32*
> 
> 7.       faults 33-48*
> 
> .
> 
> .
> 
> .
> 
> 
> 
> *16 x Boolean, which can’t be displayed in a Kst plot
> 
> Boolean 16-1 => value e.g. =  0000000011111111, Bit 1-8 = “1”, Bit 
9-16 =
> “0”
 
> To reduce amount of column fault messages are summarized to 16 per 
column
> (data source input file)
 
> 
> 
> 
> 
> curves displayed in Kst:
> 
> 1.       speed vs time
> 
> 2.       current vs time
> 
> 3.       torque vs time
> 
> 
> 
> defined data vectors to export to csv while moving over curve in mode
> “Highlight Data Points”:
 
> DateTime
> 
> faults 01-16*
> 
> faults 17-32*
> 
> faults 33-48*
> 
> 
> 
> 
> 
> data to CSV file:
> 
> DateTime                                           faults 01-16             
>           faults 17-32                        faults 33-48
 
> 2015/04/27 07:37:02.620              0000000011111111         
> 1100100011111111          0000110010011111
 
> 
> 
> Data should be automatically updated depending on cursor position of
> “Highlight Data Points”.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kst/attachments/20160104/3649ede8/attachment-0001.html>


More information about the Kst mailing list