[Kst] reading in NetCDF matrix (2-dim vector)

Tom Downes tpdownes at caltech.edu
Mon Apr 19 20:46:04 CEST 2010


Hi:

I'm reasonably familiar with KST but am having a lot of trouble parsing a
NetCDF file in the fashion I intend.  I am working on an instrument that
will have have around 100 independent detectors measured at 100 samples per
second each (i.e., around 10,000 total measurements per second).  From the
perspective of data acquisition it is much easier to write to a NetCDF
variable with dimensions n_detectors x n_samples, where n_detectors would be
this number around 100 (126 in example below) and n_samples would equal 100
for 1 seconds worth of data.

But trying to get KST to read this data in the way I intend seems to be
difficult.  I want it to be able to split the matrix into 126 separate
vectors so that I can plot a timestream for each - realistically I would
take a representative sample.  The "sample" and "frame" terminology doesn't
seem to quite match up to what I am doing - frames seem to be more about
bookkeeping than actually combining many timestream vectors into a matrix.

Anyhow, I would like to solve this in a relatively simple way, with a
preference toward avoiding re-writing how the data is originally written to
disk as it is much simpler this way.  Can I do what I need to do within KST
or with a simple plug-in?  I am quite comfortable working in C/C++/Java and
shell scripting environments.  Suggestions?

This is what the file looks like:

netcdf test-udp {
dimensions:
time = UNLIMITED ; // (3960037 currently)
nkids = 126 ;
variables:
int kids(time, nkids) ;
kids:scale_factor = 1 ;
kids:add_offset = 0 ;
kids:units = "bits" ;
int timestamp(time) ;
timestamp:scale_factor = 1 ;
timestamp:add_offset = 0 ;
timestamp:units = "bits" ;
}

I am running KST 1.9.1 compiled manually after checking out the release
source.  I don't think it matters, but I am running the kde3 libraries
alongside the kde4 libraries while logged into a KDE 3.5 WM session in
OpenSUSE 11.2.

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kst/attachments/20100419/28f2a531/attachment.htm 


More information about the Kst mailing list