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: Andrew Johnson <anj@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Wed, 28 Mar 2012 09:30:25 -0600
Hi Peter,

On 2012-03-28 Peter Milne wrote:
> 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].

A possibly simpler alternative to using Mark Rivers' areaDetector module might 
be to use an aSub record and write your own C code that it runs to extract the 
samples for each channel. A single aSub record has 21 output value fields 
(which can be configured as arrays of any of the basic types) so it's easy to 
see how to extract up to 21 channels from the input waveform. However it is 
also possible to use some of the input fields as outputs, so it should be 
feasible to have one aSub record handle a nice round 32 channels and still 
leave enough input fields for some configuration values.

I'm not trying to steer you away from areaDetector which is great for doing 
complicated real-time processing on camera images and other 2-D data, but if 
you already have an EPICS driver that populates the waveform record, just 
writing an aSub subroutine would probably involve less software development 
effort. If you decide to go this route you would need to call db_post_events() 
on the input channels you set to trigger Channel Access monitors on those 
fields.

HTH,

- Andrew
-- 
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte

Replies:
Re: Extract a column of data from 2D Waveform Record Peter Milne
References:
Extract a column of data from 2D Waveform Record Peter Milne

Navigate by Date:
Prev: another build problem with db dependencies Yves Lussignol
Next: Re: Extract a column of data from 2D Waveform Record Peter Milne
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 Peter Milne
Next: Re: Extract a column of data from 2D Waveform Record Peter Milne
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 ·