Hints and Tips

Simulated mode

There is a simulated mode for working on the project with no camera or DAQ hardware. On a Windows PC start it with:

start_zapit('simulated',true)

On Mac or Linux you can omit the argument and start_zapit will open the GUI in simulated mode.

Simulated mode does just enough to make many development tasks possible but it does not simulate everything. For example, the scanner calibration is not simulated and is simply indicated as being calibrated. The sample calibration procedure works. You can also run hZP.applyUnityStereotaxicCalib if you wish to apply a 1:1 calibration without going through the operations in the GUI.

Running with a simulated DAQ

You can also run Zapit with a simulated NI DAQ but a real camera. To do this, create a suitable simulated DAQ in NI MAX such as a USB-6363. Then edit the settings YAML to use this as the device ID. Connect your camera and start Zapit. You should now define the "scanners" as being calibrated with hZP.scannersCalibrated=true; You may either run hZP.applyUnityStereotaxicCalib to do the stereotaxic calibration or run through the actualy procedure. You can now load stimulus sets and run experiments. Of course, nothing is actually generated but you can do more testing than with the regular simulated mode described above.

Waveform Debugging

With a calibrated system and loaded stim config you can plot the waveforms which will be sent to the DAQ using:

hZP.stimConfig.plotChanSamples %plot first stimulus
hZP.stimConfig.plotChanSamples(1) %plot first stimulus
hZP.stimConfig.plotChanSamples(4) %plot fourth stimulus

You can see what is being presented with hZP.stimConfig.print e.g.

>> hZP.stimConfig.print

1. ML = +3.56 / AP = -1.24  <-->  ML = -3.56 / AP = -1.24  1' somatosensory barrel field
2. ML = +3.95 / AP = -0.08  <-->  ML = -3.95 / AP = -0.08  1' somatosensory nose
3. ML = +0.71 / AP = +0.80  2' motor 
4. ML = +2.73 / AP = +1.66  <-->  ML = +1.88 / AP = +0.94  1' motor 
5. ML = -2.73 / AP = -2.98  <-->  ML = -2.73 / AP = -4.09  1' visual 

The full stimulus data are in the stimLocations property:

>> hZP.stimConfig.stimLocations

ans = 

  1×5 struct array with fields:

    ML
    AP
    Class
    Type
    Attributes

Last updated