|
[[_TOC_]]
|
|
[[_TOC_]]
|
|
|
|
|
|
## What is the panel?
|
|
## What is the panel?
|
|
The user panel is a novel tool incorporated in the new OTBR Toolbox. It allows you to monitor how your animal is behaving during your experiments from the comfort of your office. Compared to the webcam access that was available before, the panel now offers the possibility to see how the animal is performing, how far the session has progressed, what the pigeon is seeing and a lot more information.
|
|
|
|
|
|
The user panel is a novel tool incorporated in the new OTBR Toolbox. It allows you to monitor how your animal is behaving during your experiments from the comfort of your office. Compared to the webcam access that was available before, the panel now offers the possibility to see how the animal is performing, how far the session has progressed, what it is seeing and a lot more information.
|
|
|
|
|
|
The following chapters will guide you through what the panel can do, what you need to add to your Matlab paradigms, how to run it on your computer and how to interact with the panel.
|
|
The following chapters will guide you through what the panel can do, what you need to add to your Matlab paradigms, how to run it on your computer and how to interact with the panel.
|
|
|
|
|
|
## What does the panel look like?
|
|
|
|
|
|
## What does the panel look like?
|
|
|
|
|
|
The following is an example of what the panel can show you when a pigeon is performing a paradigm.
|
|
The following is an example of what the panel can show you when a pigeon is performing a paradigm.
|
|
|
|
|
|
![image](uploads/7ad623819172c94d7cfaaeca1cbb96c5/image.png)
|
|
![image](uploads/5d79e97bfe18697c7259922d453b3e33/image.jpeg)
|
|
|
|
|
|
The panel allows the incorporation of various subpanels that display different kinds of information. The following will be a short description of what each panel can do:
|
|
The panel allows the incorporation of various subpanels that display different kinds of information. The following will be a short description of what each subpanel can do:
|
|
|
|
|
|
|
|
#### Camera subpanel
|
|
|
|
|
|
|
|
The most obvious is the camera subpanel. This is the IP camera image, which has been available before.
|
|
|
|
|
|
|
|
#### Performance subpanel
|
|
|
|
|
|
**Camera subpanel**
|
|
|
|
The most obvious is the camera subpanel. This is the IP camera which has been available before.
|
|
|
|
|
|
|
|
**Performance subpanel**
|
|
|
|
For monitoring how the animal is performing, this is probably the most interesting panel. It lists different parameters that are of interest for the current session, including:
|
|
For monitoring how the animal is performing, this is probably the most interesting panel. It lists different parameters that are of interest for the current session, including:
|
|
~~~
|
|
```
|
|
maxTrls: How many trials the session encompasses
|
|
maxTrls: How many trials the session encompasses
|
|
dur: The current duration of the session
|
|
dur: The current/present duration of the session
|
|
trialNr: The current trial number
|
|
trialNr: The current trial number
|
|
%-corr: The percentage of correct trials during the session
|
|
%-corr: The percentage of correct trials during the session
|
|
%-incorr: The percentage of incorrect trials during the session
|
|
%-incorr: The percentage of incorrect trials during the session
|
|
%-noRsp: The percentage of responses/no responses in this session
|
|
%-noRsp: The percentage of no responses in this session
|
|
~~~
|
|
```
|
|
|
|
|
|
This information delivers a precise overview of how the pigeon is performing and how far in the session it is. This panel also has a graph displaying the performance over the trial.
|
|
This information delivers a precise overview of how the pigeon is performing and how far in the session it is. This subpanel also contains a [graph](uploads/3e684c760cb8488882883569f3b08920/image.png) displaying the percentages over the trial (with individual curves showing correct, incorrect and no response).
|
|
|
|
|
|
**Info subpanel**
|
|
#### Info subpanel
|
|
This panel allows the user to send three lines of custom text from the paradigm to the panel. This can be any information that you deem important. As an example, this could be info about which paradigm is running in line one (‘This is autoshaping’), what phase of the paradigm is currently running (‘Feeding’) in line two, and which animal is in the box (‘636’) in line three. This is however totally customizable.
|
|
|
|
|
|
|
|
The info panel also includes three buttons labeled ‘Start panel’ (starts the panel), ‘Remove panel’ (closes the panel), and ‘Reset panel’ (resets the panel).
|
|
This subpanel allows the user to send three lines of custom text from the paradigm to the panel. This can be any information that you consider important. As an example, this could be information about which paradigm is running in line one _(‘This is autoshaping’)_, what phase of the paradigm is currently running in line two _(‘Feeding’)_, and which animal is in the box in line three _(‘636’)_. This is, however, totally customizable.
|
|
|
|
|
|
|
|
The info subpanel also includes three buttons labeled ‘Start panel’ (starts the panel), ‘Remove panel’ (closes the panel), and ‘Reset panel’ (resets the panel).
|
|
|
|
|
|
|
|
#### Paradigm subpanel
|
|
|
|
|
|
|
|
In this subpanel you are able to see what is displayed on the box monitor, an animals view, so to speak.
|
|
|
|
|
|
**Paradigm panel**
|
|
|
|
In this panel you are able to see what is displayed on the box monitor, an animals view, so to speak.
|
|
|
|
|
|
|
|
## How to incorporate the panel feature into your paradigms?
|
|
## How to incorporate the panel feature into your paradigms?
|
|
It is fairly easy to install the panel feature, however there are certain requirements and some changes needed in the paradigms to take full advantage of the panel.
|
|
|
|
|
|
|
|
**Requirements**
|
|
It is fairly easy to install the panel feature, however, there are certain requirements and some changes needed in the paradigm code to take full advantage of the panel.
|
|
The client panel is only able to run on Windows 64-bit systems. This is due to the new OTBR Toolbox, which we will talk about in the next passages. Most of our computers are running on 64-bit systems already, however if your computer is still running a 32-bit version an update is necessary.
|
|
|
|
|
|
#### Requirements
|
|
|
|
|
|
|
|
The client panel is only able to run on Windows 64-bit systems. This is due to the new OTBR Toolbox, which we will talk about in the next passages. Most of our computers are running on 64-bit systems already, however, if your computer is still running a 32-bit version an update is necessary.
|
|
|
|
|
|
For MATLAB to be able to access the IP camera, it needs a camera support package. Type ipcam or webcam (depending on the camera type you wish to use) into the MATLAB command prompt and follow the steps on the screen to get the support package.
|
|
For MATLAB to be able to access the IP camera, it needs a camera support package. Type ipcam or webcam (depending on the camera type you wish to use) into the MATLAB command prompt and follow the steps on the screen to get the support package.
|
|
|
|
|
|
To be able to use the paradigm panel, you must have the relevant paradigm on the computer you are using the panel on. In the paradigm directory there must be a \Stimuli folder (i.e. paradigm is located in C:\experiment\example, the stimuli pictures must be in C:\experiment\example\Stimuli). This folder must contain all stimuli and only stimuli.
|
|
To be able to use the paradigm subpanel, you must have the relevant paradigm code on the computer you are using the panel on (the paradigm code should be identical to the one used in the setup). In the paradigm directory there must be a folder ‘\Stimuli’ containing all, and only stimuli (i.e. the paradigm code is located in C:\experiment\example, and the stimuli image files must be in C:\experiment\example\Stimuli).
|
|
|
|
|
|
|
|
#### Converting to the OTBR Toolbox
|
|
|
|
|
|
**Converting to the OTBR Toolbox**
|
|
The OTBR Toolbox is a newer version of the Biopsychology Toolbox, which allows for more advanced applications. Fortunately, most basic features are identical and therefore do not need changing. The most relevant changes affect start.m and mySetup.m.
|
|
The OTBR Toolbox is a newer version of the Biopsychology Toolbox, which allows for more advanced applications. Fortunately, most basic features are identical and therefore do not need changing. The most relevant changes affect _start.m_ and _mySetup.m_.
|
|
|
|
|
|
|
|
_start.m_ is replaced by [initOTBR.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m). As this a 1-to-1 replacement, you will simply need to replace start; with initOTBR; in your code. You will not need to make changes within [initOTBR.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m).
|
|
_start.m_ is replaced by [initOTBR.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m). As this is a 1-to-1 replacement, you will simply need to replace _start_; with _initOTBR_; in your code. You do not need to make any changes within [initOTBR.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m).
|
|
|
|
|
|
Instead of _mySetup.m_, in this new toolbox you will find [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m) and [myParadigmSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myParadigmSetup.m). In these two scripts, you will need to make changes specific to your box (such as IO-Box, inputs and outputs in [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m)) and paradigm (such as stimuli position and size in [myParadigmSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myParadigmSetup.m)). You should be able to simply copy the relevant parameters from _mySetup.m_. Any problems regarding the conversion should appear when running the program with the OTBR Toolbox for the first time and can then be fixed.
|
|
In this new toolbox, _mySetup.m_ will be replaced by [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m) and [myParadigmSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myParadigmSetup.m). In these two scripts, you will need to make changes specific to your box (such as update toolbox paths, choose an IO-device, specify input and output devices, adjust touchscreen parameter in [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m)) and paradigm (such as stimulus position and size in [myParadigmSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myParadigmSetup.m)). You should be able to simply copy the relevant parameters from _mySetup.m_. Any problems regarding the conversion should appear when running the program with the OTBR Toolbox for the first time and can then be fixed.
|
|
|
|
|
|
**What to add to your paradigm**
|
|
#### What to add to your paradigm
|
|
There are two main functions that you will need to add to your code. These are [connect2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/connect2ClientPanel.m) and [send2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/send2ClientPanel.m) (scripts: [connect2ClientPanel.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/connect2ClientPanel.m) and [send2ClientPanel.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/send2ClientPanel.m)).
|
|
|
|
|
|
There are two main functions that you will need to add to your paradigm code. These are **connect2ClientPanel** and **send2ClientPanel** (scripts: [connect2ClientPanel.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/connect2ClientPanel.m) and [send2ClientPanel.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/send2ClientPanel.m)).
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
**connect2ClientPanel**
|
|
**connect2ClientPanel**
|
|
[connect2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/connect2ClientPanel.m) is used to establish a connection between the local computer running the experiment and the remote computer which is used for monitoring via the network. This function requires two inputs
|
|
[connect2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/connect2ClientPanel.m) is used to establish a connection between the local computer running the experiment and the remote computer, which is used for monitoring via the network. This function requires two inputs arguments:
|
|
~~~matlab
|
|
```matlab
|
|
connect2ClientPanel(rmtIp, lclIp);
|
|
connect2ClientPanel(rmtIp, lclIp);
|
|
~~~
|
|
```
|
|
|
|
|
|
with _rmtIp_ being the IP address of the remote computer (often your office computer) and _lclIp_ being the IP address of the experimental computer. [connect2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/connect2ClientPanel.m) only needs to be called once in the beginning of the program and can be added at any point after [initOTBR](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m), but before any other panel commands. Both IPs need to entered as strings. To identify which is which, it is a good idea to define variables for the IPs as in the following example:
|
|
with rmtIp being the IP address of the remote computer (often your office computer) and lclIp being the IP address of the experimental computer. [connect2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/connect2ClientPanel.m) only needs to be called once in the beginning of the program and can be added at any point after [initOTBR](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m), but before any other panel commands. Both IPs need to entered as strings. To identify which is which, it is a good idea to define variables for the IPs as in the following example:
|
|
~~~matlab
|
|
```matlab
|
|
lclIP = '192.168.1.231';
|
|
lclIP = '192.168.1.231';
|
|
rmtIP = '192.168.1.188';
|
|
rmtIP = '192.168.1.188';
|
|
connect2ClientPanel(rmtIP,lclIP);
|
|
connect2ClientPanel(rmtIP,lclIP);
|
|
~~~
|
|
```
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
**send2ClientPanel**
|
|
**send2ClientPanel**
|
|
[send2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/send2ClientPanel.m) needs to be added at any point in the paradigm where information should be sent to the panel. This function accept various inputs which affect different parts of the panel. These include:
|
|
[send2ClientPanel](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Network/clientPanel/send2ClientPanel.m) needs to be added at any point in the paradigm where information should be sent to the panel. This function accepts various inputs, which affect different parts of the panel. These include:
|
|
~~~matlab
|
|
|
|
|
|
```matlab
|
|
send2ClientPanel('infotext1','Your text here');
|
|
send2ClientPanel('infotext1','Your text here');
|
|
send2ClientPanel('infotext2','Your text here');
|
|
send2ClientPanel('infotext2','Your text here');
|
|
send2ClientPanel('infotext3','Your text here');
|
|
send2ClientPanel('infotext3','Your text here');
|
|
~~~
|
|
```
|
|
|
|
These inputs allow for 'Your text here' to be displayed in the info subpanel in lines 1, 2 or 3. You can enter any information that you deem relevant in form of a string, or as a variable. Add this anywhere within the paradigm where you want your info to be send.
|
|
|
|
|
|
These inputs allow for 'Your text here' to be displayed in the info box in lines 1, 2 or 3. You can enter any information that you deem relevant in form of a string, or as a variable. Add this anywhere within the paradigm where you want your info.
|
|
```matlab
|
|
|
|
|
|
~~~matlab
|
|
|
|
send2ClientPanel('showStimuli', stimulus, stimulusPosition);
|
|
send2ClientPanel('showStimuli', stimulus, stimulusPosition);
|
|
~~~
|
|
```
|
|
|
|
This function shows stimuli in the paradigm window of the paradigm subpanel. As with the [showStimuli()](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/showStimuli.m) function in Matlab you need to enter the stimulus and the position for it to be displayed. Use this every time a stimulus is presented. To display multiple stimuli enter variables as vectors.
|
|
This function shows stimuli in the paradigm window of the panel. As with the [showStimuli()](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/showStimuli.m) function in Matlab you need to enter the stimulus and the position for it to be displayed. Use this every time a stimulus is presented. To display multiple stimuli enter variables as vectors.
|
|
```matlab
|
|
~~~matlab
|
|
|
|
send2ClientPanel('showStimuli', [stim1, stim2], [5, 6]);
|
|
send2ClientPanel('showStimuli', [stim1, stim2], [5, 6]);
|
|
~~~
|
|
```
|
|
|
|
Also, note that the client panel uses the same [myHardwareSetup](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/wikis/Initialization#myhardwaresetup) and [myParadigmSetup](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/wikis/Initialization#myparadigmsetup) as your paradigm code on the setup computer (so these files need to be copied and stored just as the paradigm code itself on your office PC).
|
|
|
|
|
|
To make a stimulus disappear use
|
|
To make a stimulus disappear use:
|
|
~~~matlab
|
|
```matlab
|
|
send2ClientPanel('showStimuli', [], []);
|
|
send2ClientPanel('showStimuli', [], []);
|
|
~~~
|
|
```
|
|
|
|
|
|
The following inputs will affect the performance panel:
|
|
|
|
~~~matlab
|
|
|
|
send2ClientPanel('maxTrls', totalTrialNumber);
|
|
|
|
~~~
|
|
|
|
|
|
|
|
To see the maximum number of trials enter your variable that specifies the total number of trials for _totalTrialNumber_. It is recommended to add this at the beginning of each trial.
|
|
|
|
|
|
|
|
~~~matlab
|
|
The following inputs will affect the performance subpanel:
|
|
send2ClientPanel('trlnr',currentTrialNumber);
|
|
```matlab
|
|
~~~
|
|
send2ClientPanel('maxTrls', totalTrialNumber);
|
|
|
|
```
|
|
|
|
To see the maximum number of trials enter your variable that specifies the total number of trials for _totalTrialNumber_. It is recommended to add this at the beginning of each trial (i.e. during the ITI).
|
|
|
|
|
|
To see the current trial number you can usually enter the variable that is specified for the loop (e.g. _for i=1:trial.num_, _i_ being the variable that gives you the trial number) instead of _currentTrialNumber_. If you are using a paradigm with more than one loop, you may need to define a separate variable for this. It is recommended to add this at the beginning of each trial.
|
|
```matlab
|
|
|
|
send2ClientPanel('trlnr',currentTrialNumber);
|
|
|
|
```
|
|
|
|
To see the current trial number you can usually enter the variable that is specified for the loop (e.g. _for i=1:trial.num_, _i_ being the variable that gives you the trial number) instead of _currentTrialNumber_. If you are using a paradigm with more than one loop, you may need to define a separate variable for this. It is recommended to add this at the beginning of each trial.
|
|
|
|
|
|
~~~matlab
|
|
```matlab
|
|
send2ClientPanel('duration', toc);
|
|
send2ClientPanel('duration', toc);
|
|
~~~
|
|
```
|
|
|
|
This gives you the time that has elapsed so far. For this to work you will need to add a _tic;_ command right before the experiment starts (before the main loop). Add this wherever you want in the paradigm (recommended to add during the ITI, just as for the trial number).
|
|
|
|
|
|
This gives you the time that has elapsed so far. For this to work you will need to add a tic; right before the experiment starts (before the loop). Add this wherever you want in the paradigm
|
|
```matlab
|
|
~~~matlab
|
|
send2ClientPanel('trlCorr', ResultvectorCorrect);
|
|
send2ClientPanel('trlCorr', ResultvectorCorrect);
|
|
send2ClientPanel('trlInCorr', ResultvectorIncorrect);
|
|
send2ClientPanel('trlInCorr', ResultvectorIncorrect);
|
|
send2ClientPanel('trlNoRsp', ResultvectorResponse);
|
|
send2ClientPanel('trlNoRsp', ResultvectorResponse);
|
|
```
|
|
~~~
|
|
|
|
|
|
|
|
To display the percentages of correct trials, a vector must be entered listing whether a trial was correct (1) or not (0). You can for example do this as follows
|
|
To display the percentages of correct trials, a logical vector must be entered listing whether a trial was correct (1 or true) or not (0 or false). You can, for example, do this as follows:
|
|
~~~matlab
|
|
```matlab
|
|
ResultvectorCorrect = logical([ResultvectorCorrect out(i).goodKey]);
|
|
if res.choice{trial,1}.badKey == par.numPeck % incorrect response
|
|
~~~
|
|
|
|
|
|
|
|
With out(i) being the [keybuffer](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/IO/keyBuffer.m) output. This line of code should be added at the end of your loop. For the example above to work ResultvectorCorrect would need to be defined at the beginning with
|
|
punishment(par.punDur);
|
|
~~~matlab
|
|
res.incorr(trial,1) = 1; % note trial as incorrect
|
|
ResultvectorCorrect = [];
|
|
|
|
~~~
|
|
|
|
|
|
|
|
This can be also be applied for incorrect and response values.
|
|
elseif res.choice{trial,1}.goodKey == par.numPeck % correct response
|
|
|
|
feeding(par.feeding,'lightDur',2);
|
|
|
|
res.corr(trial,1) = 1; % note trial as correct
|
|
|
|
end
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## What do you need to run on your computer?
|
|
## What do you need to run on your computer?
|
|
|
|
|
|
To be able to fully use the panel on your computer you need the OTBR toolbox and the relevant paradigms as stated above. To load the panel you need to run a short program, an example of which is shown below.
|
|
To be able to fully use the panel on your computer you need the OTBR toolbox, the relevant paradigm code, [myHardwareSetup](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/wikis/Initialization#myhardwaresetup) and [myParadigmSetup](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/wikis/Initialization#myparadigmsetup) as stated above. To initialize the panel you need to run a short program, an example of which is shown below.
|
|
|
|
|
|
~~~matlab
|
|
```matlab
|
|
initOTBR;
|
|
initOTBR;
|
|
clientList.client.name='test';
|
|
clientList.client.name = 'test';
|
|
clientList.client.remoteIP='192.168.1.231';
|
|
clientList.client.remoteIP = '192.168.1.231';
|
|
clientList.client.localIP='192.168.1.188';
|
|
clientList.client.localIP = '192.168.1.188';
|
|
clientList.camera.device='http://10.147.255.102/mjpg/video.mjpg';
|
|
clientList.camera.device ='http://10.147.255.102/mjpg/video.mjpg';
|
|
clientList.camera.userName='admin';
|
|
clientList.camera.userName = 'admin';
|
|
clientList.camera.password='1234';
|
|
clientList.camera.password = '1234';
|
|
subPanels= {'performance', 'paradigm','camera'};
|
|
subPanels = {'performance','paradigm','camera'};
|
|
[fig, cPnl] = openCPanelFig(clientList, subPanels);
|
|
[fig, cPnl] = openCPanelFig(clientList, subPanels);
|
|
~~~
|
|
```
|
|
|
|
|
|
We will now have a quick look at the different components.
|
|
We will now have a quick look at the different components.
|
|
~~~matlab
|
|
|
|
initOTBR;
|
|
|
|
~~~
|
|
|
|
|
|
|
|
We use this to initialize the OTBR toolbox. (see [Chapter 3.3](/Initialization#initotbr) for further information)
|
|
<br>
|
|
|
|
|
|
|
|
```matlab
|
|
|
|
initOTBR;
|
|
|
|
```
|
|
|
|
We use this to initialize the OTBR toolbox (see [Chapter 3.3](/ikn/OTBR/-/wikis/Initialization#initotbr) for further information).
|
|
|
|
|
|
~~~matlab
|
|
<br>
|
|
clientList.client.name='test';
|
|
|
|
clientList.client.remoteIP='192.168.1.231';
|
|
|
|
clientList.client.localIP='192.168.1.188';
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
```matlab
|
|
|
|
clientList.client.name = 'test';
|
|
|
|
clientList.client.remoteIP = '192.168.1.231';
|
|
|
|
clientList.client.localIP = '192.168.1.188';
|
|
|
|
```
|
|
These lines of code specify which box you want to connect to. With name you can give the panel a name so that you know which box you are looking at. For remoteIP you need to enter the IP address of the experimental computer and for localIP you need to enter the IP address of your computer. Be aware that this is the other way around compared to the IPs you specified in your paradigm.
|
|
These lines of code specify which box you want to connect to. With name you can give the panel a name so that you know which box you are looking at. For remoteIP you need to enter the IP address of the experimental computer and for localIP you need to enter the IP address of your computer. Be aware that this is the other way around compared to the IPs you specified in your paradigm.
|
|
|
|
|
|
~~~matlab
|
|
<br>
|
|
clientList.camera.device='http://10.147.255.102/mjpg/video.mjpg';
|
|
|
|
clientList.camera.userName='admin';
|
|
|
|
clientList.camera.password='1234';
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
```matlab
|
|
|
|
clientList.camera.device = 'http://10.147.255.102/mjpg/video.mjpg';
|
|
|
|
clientList.camera.userName = 'admin';
|
|
|
|
clientList.camera.password = '1234';
|
|
|
|
```
|
|
To access the camera you need to specify the IP address for the camera, the username and the password just as before. Name and password are often admin and 1234, but may vary for other cameras.
|
|
To access the camera you need to specify the IP address for the camera, the username and the password just as before. Name and password are often admin and 1234, but may vary for other cameras.
|
|
|
|
|
|
~~~matlab
|
|
<br>
|
|
subPanels= {'performance', 'paradigm','camera'};
|
|
|
|
~~~
|
|
|
|
|
|
|
|
With _subPanels_ you can specify which subpanels you want to see. You can enter 'performance', 'paradigm', 'camera', 'lancontrol', 'lclcontrol'. The Info panel is there by default and does not need to be specified separately.
|
|
```matlab
|
|
|
|
subPanels = {'performance','paradigm','camera'};
|
|
|
|
```
|
|
|
|
With subPanels you can specify which subpanels you want to see. You can enter 'performance', 'paradigm','camera','lancontrol','lclcontrol'. The Info panel is there by default and does not need to be specified separately.
|
|
|
|
|
|
~~~matlab
|
|
<br>
|
|
[fig, cPnl] = openCPanelFig(clientList, subPanels);
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
```matlab
|
|
|
|
[fig, cPnl] = openCPanelFig(clientList, subPanels);
|
|
|
|
```
|
|
This opens the figure for the panel and uses the information entered above to connect to stated box and to show the subpanels you have chosen. You will not need to change anything here.
|
|
This opens the figure for the panel and uses the information entered above to connect to stated box and to show the subpanels you have chosen. You will not need to change anything here.
|
|
|
|
|
|
After running this short script a Matlab figure will appear that looks similar to the example below. This is what the panel looks like in its ‘naïve’ state.
|
|
<br>
|
|
|
|
|
|
![image](uploads/286a354db3d62eee8dde331d35ed6d77/image.png)
|
|
|
|
|
|
|
|
In this state the panel will not show any information yet and you need to start the panel by clicking the ‘Start panel’ button in the Info box. Now the camera will show you the live feed and the performance panel will start updating. To be able to see the paradigm, you will need to click on the ‘Select paradigm’ button in the Paradigm box. This will open a window where you can choose the Matlab file for your paradigm.
|
|
After running this short script, a Matlab figure will appear that looks similar to the example below. This is what the panel looks like in its ‘naïve’ state.
|
|
|
|
|
|
![image](uploads/d843e926cb136186cc83defd71461a24/image.png)
|
|
![image](uploads/7507c97f7bad5d07346e58115eb7a495/image.png)
|
|
|
|
|
|
Once you have chosen a paradigm a dialog box will open where you can enter your subjects name.
|
|
In this state the panel will not show any information yet and you need to start the panel by clicking the ‘Start panel’ button in the Info subpanel. Now the camera will show you the live feed and the performance subpanel will start updating. To be able to see the paradigm, you will need to click on the ‘Select paradigm’ button in the Paradigm box. This will open a window where you can choose the Matlab file for your paradigm code.
|
|
|
|
|
|
![image](uploads/17db8f9f19b4ace0ace80231a555279e/image.png)
|
|
![image](uploads/0df148017c3c9101ea86254017505bf7/image.png)
|
|
|
|
|
|
|
|
Once you have chosen a paradigm, a dialog box will open where you can enter your subjects name.
|
|
|
|
|
|
|
|
![image](uploads/67ac70480a8af23f83bda5d9fa74dd3c/image.png)
|
|
|
|
|
|
|
|
When you have entered a name and pressed OK the display of the paradigm subpanel should turn black and is now ready to show stimuli.
|
|
|
|
|
|
When you have entered a name and pressed OK the Paradigm box of the panel should turn black and is now ready to show stimuli.
|
|
<br>
|
|
|
|
|
|
|
|
***Congratulations, your panel should now be fully functional!*** :tada:
|
|
|
|
|
|
**Congratulations, your panel should now be fully functional!**:tada: |
|
You can start the panel once the animal is in the experimental box or do it before. Also, you can stop, close and restart the panel anytime during the session (it will even then show all data from the entire session). |
|
\ No newline at end of file |
|
\ No newline at end of file |