With the pulseEditor it is simple to make pulses consisting of one or more steps having a specific amplitude, duration, latency, and so on. It is also easy to generate a collection of pulses varying in one or more of these parameters. Step-type pulses can also be combined to produce slightly more complex types of pulses. However, any other type of pulse involving ramps, sinusoids, etc., need needs to be specified outside the pulseEditor. This is done using the signalObject class.
...
Here is an example of how to create a pulse consisting of a simple ramp stimulus. There are a number of ways to approach parameterizing a given type of pulse. Shown here is a somewhat elaborate example. Note, the sampleRate field is optionally specified , for any analytic pulse ('equation', 'distribution', 'trigonometric', etc) the sampleRate may be safely modified later, to conform to the settings in the hardware. For literally defined pulses, the sampleRate can be changed later, but it will be up/down-sampled accordingly.
No Format |
---|
deltaFPos = signalobject('Name', 'deltaFPos', 'sampleRate', 10000); deltaFNeg = signalobject('Name', 'deltaFPosdeltaFNeg', 'sampleRate', 10000); offset = signalobject('Name', 'offset', 'sampleRate', 10000); linSig = signalobject('Name', 'linear', 'sampleRate', 10000); product1 = signalobject('Name', 'linearSegment', 'sampleRate', 10000); product2 = signalobject('Name', 'offsetSegment', 'sampleRate', 10000); finalSignal = signalobject('Name', 'result', 'sampleRate', 10000); allPulses = [deltaFPos, deltaFNeg, offset, linSig, product1, product2, finalSignal]; squarePulseTrain(deltaFNeg, -1, 1, 0.100, 0.500, 1000, 1); squarePulseTrain(deltaFPos, 1, 0, 0.100, 0.500, 1000, 1); dc(offset, 0); equation(linSig, '3 * t - 0.3'); recursive(product1, 'multiply', [deltaFPos, linSig]); recursive(product2, 'multiply', [deltaFNeg, offset]); recursive(finalSignal, 'add', [product1, product2]); |
...
No Format |
---|
data = getdata literalPulse = signalobject('Name', 'literal', 'sampleRate', 10000); allPulses\{end + 1} = literalPulse; literal(literalPulse, getdata(finalSignal, 1)); %Here, we use the already created pulse to generate the data, but any array of data will suffice. |
- To save the data, for use as Ephus pulses:
...
- As is customary with signalobject instances, when you are finished, you should delete them.
No Format |
---|
delete(allPulses); |