Getting Igor version 4 to trigger trains
castillo
Sun, 08/01/2010 - 03:26 pm
Hi, I am running Igor version 4.01 and am using it to control a National Instruments data acquisition system (E-series board). I would like to get Igor to generate a pattern that can be either interval-based or event-based. Basically, the pattern is a train of pulses, with the inter-pulse intervals varying across time in a Poisson manner. Does anyone have a procedure file or whatever program that would enable me to specify in Igor 4 such kinds of stimulus patterns? I would also appreciate any suggestions or tips on how to modify code in Igor 4 to do that as well. Thanks.
That's a very old version of Igor :)
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
August 2, 2010 at 04:47 pm - Permalink
variable lambda, npts, dx // dx=wave deltax scaling
make/O/N=(npts) wave0
setscale/P x, 0, dx,"" wave0
wave0 = abs(enoise(1))<(lambda*dx) ? 1 : 0
return sum(wave0)/(npts*dx)
end
From this you should be able to generate the DAQ wave you need. If you need wider output pulses, be careful that your lambda is small enough so they have a small probability of overlapping. If Igor 4 does not have the conditional assignment syntax, you can make your own (if, else) equivalent.
August 4, 2010 at 09:22 am - Permalink