Re: IDL Strip Chart [message #40894] |
Fri, 10 September 2004 08:25 |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"R.G. Stockwell" <noemail@please.com> wrote in message news:2qdva1FujtelU1@uni-berlin.de...
> read and post) at news.indicidual.net
ARGH!
.... news.individual.net ...
sometimes i have a reel prolbem speeeling... a sin() of troo geenyus or conmplete idocy
|
|
|
Re: IDL Strip Chart [message #40895 is a reply to message #40894] |
Fri, 10 September 2004 08:23  |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"John Smith" <noemail@please.com> wrote in message news:2qdv4jFu77jfU1@uni-berlin.de...
^^^^^^^^^
Ah, oops. I just changed newservers, and didn't set the name up right.
news.qwest seems to expire messages after about 20 minutes, and
I seemed to be missing a lot of posts. So I went with the free (text groups
read and post) at news.indicidual.net
Cheers,
bob
|
|
|
Re: IDL Strip Chart [message #40896 is a reply to message #40895] |
Fri, 10 September 2004 08:20  |
John Smith
Messages: 4 Registered: March 1998
|
Junior Member |
|
|
Well I did only have a few minutes!
But I would definitely limit the size of array (as Haje says), perhaps a
single buffer (initally NANs) with a shift statement, and NAN the point that gets
shifted to the end.
Also, I would also to some pixmapping as Ben suggests.
Cheers,
bob
|
|
|
Re: IDL Strip Chart [message #40897 is a reply to message #40896] |
Fri, 10 September 2004 07:42  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
R.G. Stockwell wrote:
> <pestMay@gmail.com> wrote in message news:MIO%c.17702$iS.1208@newssvr29.news.prodigy.com...
>
>> For anyone involved in real-time data collection (e.g., atmospheric data,
>> heart-rate,
>> other physiological data) display this data as it arrives, say on a serial
>> port, is essential
>> in monitoring the data stream.
>>
>> There are many commercial hardware/software solutions (e.g., BIO-PAC) and an
>> IDL
>> competitor, MATLAB, has one. The X-axis is always time, and often there are
>> a number of
>> channels of data that might include an event marker (e.g., we just launched
>> the weather sound,
>> a subject in an experiment pressed a button, etc.).
>>
>> Ed May
>
>
>
> I had a few minutes to kill before a meeting, so here is a quicky strip chart
> in direct graphics. It is not the most efficient thing ever, but it will give you
> a starting point.
>
> Cheers,
> bob
>
Hi,
I echo Paul, Cool!
I have added a few tidbits to control flashing (at least on my machine.) (1)
plotting is done to a pixmap then copied to the display and (2) a keepStart
keyword keeps the starting data postion in time.
I'll bet you the Mark H will pipe in here to mention that it is possible to do
this very smoothly with object graphics.
Ben
*********START
PRO stripchart, $
keepStart = keepStart
xr = [0,100]
yr=[-4,4]
keep = Keyword_Set(KeepStart)
Window, /free
thisWin = !D.window
xSize = !D.x_size
ySize = !D.y_size
Window, /free, /pixmap
pixWin = !D.window
plot,fltarr(1),xr=xr,yr=yr
wset, thisWin
; [Xs, Ys, Nx, Ny, Xd, Yd, W]
Device, copy = [0,0,xsize, ysize,0,0, pixWin]
wset, pixWin
timeincrement = 1 ; the sample interval
datacounter = 0
datatime = !values.f_nan
data = !values.f_nan
for i = 0,1000 do begin
; make measurement
newdata = (randomn(seed,1))[0]
datatime = [datatime,i]
data = [data,newdata]
datacounter = datacounter+1
if datacounter gt 50 then begin
;shift the axis - keep start position if requested
if keep then $
xr[1] = (xr[1] + timeIncrement) else $
xr = (xr + timeincrement)
;redraw data
plot,datatime,data,xr=xr,yr=yr,psym=-4
endif else begin
if i gt 0 then begin
plots,datatime[datacounter],data[datacounter],psym=-4, /data, /continue
endif else begin
plots,datatime[datacounter],data[datacounter],psym=4, /data
endelse
endelse
wset, thisWin
; [Xs, Ys, Nx, Ny, Xd, Yd, W]
Device, copy = [0,0,xsize, ysize,0,0, pixWin]
wset, pixWin
wait,0.1
endfor
end
******END
|
|
|
|
Re: IDL Strip Chart [message #40903 is a reply to message #40899] |
Thu, 09 September 2004 12:37  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
I would define the maximum length of the arrays before hand. Appending can
take fairly long once arrays get large. That is at least the expereince I
had in the past.
Haje
"R.G. Stockwell" <noemail@please.com> wrote in message
news:EW00d.17$ts4.29302@news.uswest.net...
> <pestMay@gmail.com> wrote in message
news:MIO%c.17702$iS.1208@newssvr29.news.prodigy.com...
>> For anyone involved in real-time data collection (e.g., atmospheric
data,
>> heart-rate,
>> other physiological data) display this data as it arrives, say on a
serial
>> port, is essential
>> in monitoring the data stream.
>>
>> There are many commercial hardware/software solutions (e.g., BIO-PAC)
and an
>> IDL
>> competitor, MATLAB, has one. The X-axis is always time, and often there
are
>> a number of
>> channels of data that might include an event marker (e.g., we just
launched
>> the weather sound,
>> a subject in an experiment pressed a button, etc.).
>>
>> Ed May
>
>
> I had a few minutes to kill before a meeting, so here is a quicky strip
chart
> in direct graphics. It is not the most efficient thing ever, but it will
give you
> a starting point.
>
> Cheers,
> bob
>
>
>
>
> xr = [0,100]
> yr=[-4,4]
>
> plot,fltarr(1),xr=xr,yr=yr
>
> timeincrement = 1 ; the sample interval
> datacounter = 0
>
> datatime = !values.f_nan
> data = !values.f_nan
>
>
>
> for i = 0,1000 do begin
> ; make measurement
> newdata = (randomn(seed,1))[0]
> datatime = [datatime,i]
> data = [data,newdata]
> datacounter = datacounter+1
>
> if datacounter gt 50 then begin
> ;shift the axis
> xr = xr + timeincrement
>
> ;redraw data
> plot,datatime,data,xr=xr,yr=yr,psym=-4
>
> endif else begin
> if i gt 0 then begin
> plots,datatime[datacounter],data[datacounter],psym=-4,/data, /continue
> endif else begin
> plots,datatime[datacounter],data[datacounter],psym=4,/data
> endelse
> endelse
> wait,0.1
>
> endfor
>
>
> end
>
>
|
|
|
Re: IDL Strip Chart [message #40905 is a reply to message #40903] |
Thu, 09 September 2004 12:00  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
R.G. Stockwell wrote:
> <pestMay@gmail.com> wrote in message news:MIO%c.17702$iS.1208@newssvr29.news.prodigy.com...
>
>> For anyone involved in real-time data collection (e.g., atmospheric data,
>> heart-rate,
>> other physiological data) display this data as it arrives, say on a serial
>> port, is essential
>> in monitoring the data stream.
>>
>> There are many commercial hardware/software solutions (e.g., BIO-PAC) and an
>> IDL
>> competitor, MATLAB, has one. The X-axis is always time, and often there are
>> a number of
>> channels of data that might include an event marker (e.g., we just launched
>> the weather sound,
>> a subject in an experiment pressed a button, etc.).
>>
>> Ed May
>
>
>
> I had a few minutes to kill before a meeting, so here is a quicky strip chart
> in direct graphics. It is not the most efficient thing ever, but it will give you
> a starting point.
Wow. That's pretty darn cool.
|
|
|
Re: IDL Strip Chart [message #40906 is a reply to message #40905] |
Thu, 09 September 2004 11:02  |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
<pestMay@gmail.com> wrote in message news:MIO%c.17702$iS.1208@newssvr29.news.prodigy.com...
> For anyone involved in real-time data collection (e.g., atmospheric data,
> heart-rate,
> other physiological data) display this data as it arrives, say on a serial
> port, is essential
> in monitoring the data stream.
>
> There are many commercial hardware/software solutions (e.g., BIO-PAC) and an
> IDL
> competitor, MATLAB, has one. The X-axis is always time, and often there are
> a number of
> channels of data that might include an event marker (e.g., we just launched
> the weather sound,
> a subject in an experiment pressed a button, etc.).
>
> Ed May
I had a few minutes to kill before a meeting, so here is a quicky strip chart
in direct graphics. It is not the most efficient thing ever, but it will give you
a starting point.
Cheers,
bob
xr = [0,100]
yr=[-4,4]
plot,fltarr(1),xr=xr,yr=yr
timeincrement = 1 ; the sample interval
datacounter = 0
datatime = !values.f_nan
data = !values.f_nan
for i = 0,1000 do begin
; make measurement
newdata = (randomn(seed,1))[0]
datatime = [datatime,i]
data = [data,newdata]
datacounter = datacounter+1
if datacounter gt 50 then begin
;shift the axis
xr = xr + timeincrement
;redraw data
plot,datatime,data,xr=xr,yr=yr,psym=-4
endif else begin
if i gt 0 then begin
plots,datatime[datacounter],data[datacounter],psym=-4,/data, /continue
endif else begin
plots,datatime[datacounter],data[datacounter],psym=4,/data
endelse
endelse
wait,0.1
endfor
end
|
|
|
Re: IDL Strip Chart [message #40912 is a reply to message #40906] |
Wed, 08 September 2004 18:53  |
pestMay
Messages: 5 Registered: September 2004
|
Junior Member |
|
|
For anyone involved in real-time data collection (e.g., atmospheric data,
heart-rate,
other physiological data) display this data as it arrives, say on a serial
port, is essential
in monitoring the data stream.
There are many commercial hardware/software solutions (e.g., BIO-PAC) and an
IDL
competitor, MATLAB, has one. The X-axis is always time, and often there are
a number of
channels of data that might include an event marker (e.g., we just launched
the weather sound,
a subject in an experiment pressed a button, etc.).
Ed May
|
|
|
Re: IDL Strip Chart [message #40914 is a reply to message #40912] |
Wed, 08 September 2004 14:50  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Mark Hadfield wrote:
> pestMay@gmail.com wrote:
>
>> I ... need either a direct or object graphics strip chart routine.
>
> What's a strip chart?
Ye strip chart of olde were what you see on telly when someone's getting a polygraph test
- continuous output of paper with a pen recording all the bits and pieces. Nowadays you're
more likely to see an electronic version - like the fancy heart monitoring machines in
most hospitals... you know... the machines that go "ping" :o)
I'd say the OP wants an electronic/IDL version - dunno how you'd implement the paper/pen
version in IDL (can you imaging the issues with PS output? Lordy.) It would be neato thing
to write... I presume the ability to playback/scroll/stop/inquire the recorded data would
be a must.
paulv
|
|
|
|