#pragma TextEncoding = "Windows-1252" #pragma rtGlobals=3 // Use modern global access method and strict wave access. Function GeneratePulse() Variable TimeSpan = 1 //seconds Variable SampleRate = 10000 // Hz Variable NrPoints = TimeSpan*SampleRate Make/O /N=(NrPoints) TimeWave = P/SampleRate Make/O /N=(NrPoints) DataWave KillDataFolder/Z root:ResampledData KilldataFolder/Z root:DifferentialData NewDataFolder root:ResampledData NewDataFolder root:DifferentialData // Compute pulse as a convolution of a gaussian and exponential functions // This "datawave" will be downsampled. Variable Point=1 For(Point=0; Point