Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: Extract a column of data from 2D Waveform Record
From: Peter Milne <peter.milne@d-tacq.com>
To: Mark Rivers <rivers@cars.uchicago.edu>
Cc: Tech-talk <tech-talk@aps.anl.gov>
Date: Wed, 28 Mar 2012 12:43:45 +0100
Hi Mark

So, all the embedded processor has to do is to transfer the raw 2D data to a host computer by whatever means necessary, and areaDetector takes care of the rest. Sounds good, thanks!

/Peter

On 03/28/2012 12:14 PM, Mark Rivers wrote:
Hi Peter,

The EPICS areaDetector module supports an object called an NDArray,
which is an N-dimensional array.  EPICS drivers generate these arrays
from the underlying hardware library, and pass them to plugins.
Plugins do things like save the arrays to disk, send the data to
EPICS waveform records, perform statistics calculations on them, and
extract regions-of-interest (ROIs).  The ROIs can be any dimensions,
so they can extract single rows, single columns, etc.  The ROI plugin
is itself a source of new NDArrays, and plugin chains can be
constructed at run-time.

In your case, if your driver generated NDArrays (N=2) you could do
the following:

Driver ->  ROI plugin (extract 1 row or column) ->  waveform record
plugin

This processing all happens below the level of EPICS records, so it
is very fast and efficient.  Data rates of hundred of megabytes per
second are not a problem.

Although the NDArrays were designed originally to be used in
imaging-type detectors, I have used them for a spectroscopy detector
somewhat similar to yours, where the data contain spectra, not
images.

Mark


________________________________________ From:
tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on
behalf of Peter Milne [peter.milne@d-tacq.com] Sent: Wednesday, March
28, 2012 4:47 AM To: Tech-talk Subject: Extract a column of data from
2D Waveform Record

The ACQ196 multi-channel digitizer includes an embedded
microprocessor and EPICS IOC, and in normal operation outputs a
Waveform Record per channel on a relaxed schedule, 1Hz typical.

The data from the hardware is a 2D array in [sample][channel] order,
and embedded software takes care of extracting ("channelizing") the
data so that each waveform record is a 1D array   eg CH01[sample].

Now we have a requirement to run this at higher pulse rates, up to
60Hz. The embedded software will not be able to channelize the raw
data at this rate, although it should be possible to present a single
Waveform Record per pulse containing the 2D data.

My question is how to handle this 2D record in a client and/or soft
IOC running on another host?.

The client software needs to be able to take a slice [:][ch].

Maybe it's quite easy to do this outside the IOC (eg with Python
Channel access), but ideally it would happen inside an IOC so that
it's completely transparent to a client. The Subarray record is an
obvious choice, but it appears to take a contiguous block of data,
there doesn't seem to be a concept of a stride value.

eg assuming the Waveform Record refers to data [samples][channels]
with dimension (typical) [1024][96], the extract routine needs to run
through the data set with a stride of 96.

It looks like subarray could be used to extract [sample-N][:] but
not the required [:][channel].

Any suggestions welcome.

Thanks


Peter.




-- Peter Milne                     Peter.Milne@d-tacq.com D-TACQ
Solutions Ltd            www.d-tacq.com



--
Peter Milne			Peter.Milne@d-tacq.com
D-TACQ Solutions Ltd		www.d-tacq.com

References:
Extract a column of data from 2D Waveform Record Peter Milne
RE: Extract a column of data from 2D Waveform Record Mark Rivers

Navigate by Date:
Prev: RE: Extract a column of data from 2D Waveform Record Mark Rivers
Next: Re: Proposed support for additional Modbus data types Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: Extract a column of data from 2D Waveform Record Mark Rivers
Next: Re: Extract a column of data from 2D Waveform Record Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·