abfload icon indicating copy to clipboard operation
abfload copied to clipboard

accessing the stimulus waveform (holding command)

Open sayakaminegishi opened this issue 1 year ago • 1 comments

Hello, I am just wondering whether there is a way to access the stimulus waveform (the holding command in current clamp) when using abfload. Thank you so much.

sayakaminegishi avatar Jul 25 '23 12:07 sayakaminegishi

In pClamp, from the Edit menu, select "Create Stimulus Waveform Signal ..." and create the stimulus waveform for the channel you care about. Now save the ABF file ("myFile.abf").

If you do that, then d = abfload("myFile.abf") will return a K x M x L matrix, where K is the number of sample points, M the number of channels (in this case, recording channel and stimulus channel), and L the number of sweeps. So, your recording will be recording = squeeze(d(:,1,:)) and your stimulus will be stimulus = squeeze(d(:,2,:)).

It should be possible to generate the stimulus outside of pClamp, but I don't know how to do that. But this way works.

nsdesai avatar Jul 26 '23 18:07 nsdesai