Open raacampbell opened 1 year ago
Another way would be for stopOptoStim
to send the scanners to 0/0 on the last buffer update. They can slowly go there during that in a ramp. Then we know we always start each trial from 0,0. I think I like this option.
The DAQ writeAnalogData
method logs the last written waveform to a property
% If this is a long waveform we cache it
if size(waveforms,1)>1
obj.lastWaveform = waveforms;
end
so we could take the last row from this and populate zapit.pointer.lastXgalvoVoltage
and lastYgalvoVoltage
from there. This way we don't need to do it specifically at the end of `stopOptoStim. It will work equally well if we have written a fixed duration waveform.
There is a pointer.slewScanners
method now. This is not tested and not being used by anything yet.
The only noise the scanners make during an experiment is a subtle click when the beam goes to the start of the next trial.
Is there a way to make this go away? We know where the scanners are at the end of a trial. So we could log this to
zapit.pointer.lastXgalvoVoltage
andlastYgalvoVoltage
at the end ofstopOptoStim
. Then we move to the next location whensendSamples
is next run. Especially if we are using the hardware trigger the latency involved in doing this is negligible.