Advanced Usage

Handy API Commands

  • Once you have calibrated the sample, you can plot the waveforms sent to scanners for, say, the 3rd stimulus: hZP.stimConfig.plotChanSamples(3)

Stimulus Config

The stimulus config editor makes YAML files with tem following layout:

stimLocations01:
  ML: [3.56, -3.56]
  AP: [-1.24, -1.24]
  Class: stimulate
  Type: bilateral_points
  Attributes: {laserPowerInMW: 5.0, stimDutyCycleHz: 40.0, offRampDownDuration_ms: 250.0}
stimLocations02:
  ML: [3.95, -3.95]
  AP: [-0.08, -0.08]
  Class: stimulate
  Type: bilateral_points
  Attributes: {laserPowerInMW: 5.0, stimDutyCycleHz: 40.0, offRampDownDuration_ms: 250.0}
stimLocations03:
  ML: 0.71
  AP: 0.8
  Class: stimulate
  Type: unilateral_point 
  Attributes: {laserPowerInMW: 5.0, stimDutyCycleHz: 40.0, offRampDownDuration_ms: 250.0}

Each stimulusLocationsXX section corresponds to one stimulus. The coordinates under ML and AP define the position of the beam at the one or two stimulus locations that are allowed. The Class field always has the value stimulate. This is field may be used in future for different purposes. The field Type currently distinguishes beetween whether the beam will cycle between two locations or stay fixed at one location but me modulated at the user-defined duty cycle.

The Attributes field of each stimulus location defines how the stimuli will be presented. In the GUI it is currently possible to define only one laser power, duty cycle, and rampdown duration. The laser power and rampdown can, however, be defined on a per stimulus basis by editing the file. At present altering the duty cycle across stimulus locations is not supported.

Check fixed duration waveforms in simulated mode

>> start_zapit('simulated',true)
% * Calibrate and open a stim config *

>> hZP.sendSamples('cond',1,'stimDuration',0.25)
>> plot(hZP.DAQ.lastWaveform(:,3)) %plot the laser waveform

Hidden settings

There are some "hidden" settings that are not yet fully tested. They are not available via the GUI but can entered by editing the YML file. These are parameters that can be entered in the stimulus Attributes section. All are optional and can just be left out if not needed.

  • ephysWaveform If present and set to 1 the laser waveform is filtered such that onsets and offsets are more gradual and so less likely to cause artifacts with an electrode. This has not yet been tested in practice!

Last updated