Skip to content

Commit 51f0ef2

Browse files
authored
Merge pull request #740 from int-brain-lab/iblrigv8dev
8.25.0
2 parents 6671d7b + 5ad937d commit 51f0ef2

20 files changed

+1284
-420
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
8.25.0
5+
------
6+
* feature: fiber photometry loader
7+
* feature: dataframe converter for Bpod session data
8+
* removed: remaining tkinter dialogs
9+
410
8.24.7
511
------
612
* fix: debiasing not working in trainingCW
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<WorkflowBuilder Version="2.8.2"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:p1="clr-namespace:Neurophotometrics.V2;assembly=Neurophotometrics"
5+
xmlns:io="clr-namespace:Bonsai.IO;assembly=Bonsai.System"
6+
xmlns="https://bonsai-rx.org/2018/workflow">
7+
<Workflow>
8+
<Nodes>
9+
<Expression xsi:type="ExternalizedMapping">
10+
<Property Name="PortName" DisplayName="PortName" />
11+
</Expression>
12+
<Expression xsi:type="Combinator">
13+
<Combinator xsi:type="p1:FP3002">
14+
<p1:AcquisitionMode>StartPhotometry</p1:AcquisitionMode>
15+
<p1:PortName>COM4</p1:PortName>
16+
<p1:Regions>
17+
<p1:PhotometryRegion>
18+
<p1:Index>0</p1:Index>
19+
<p1:Channel>Green</p1:Channel>
20+
<p1:Rectangle>
21+
<p1:Location>
22+
<p1:X>824</p1:X>
23+
<p1:Y>492</p1:Y>
24+
</p1:Location>
25+
<p1:Size>
26+
<p1:Width>166</p1:Width>
27+
<p1:Height>180</p1:Height>
28+
</p1:Size>
29+
<p1:X>824</p1:X>
30+
<p1:Y>492</p1:Y>
31+
<p1:Width>166</p1:Width>
32+
<p1:Height>180</p1:Height>
33+
</p1:Rectangle>
34+
<p1:Name>G0</p1:Name>
35+
</p1:PhotometryRegion>
36+
<p1:PhotometryRegion>
37+
<p1:Index>1</p1:Index>
38+
<p1:Channel>Green</p1:Channel>
39+
<p1:Rectangle>
40+
<p1:Location>
41+
<p1:X>703</p1:X>
42+
<p1:Y>353</p1:Y>
43+
</p1:Location>
44+
<p1:Size>
45+
<p1:Width>154</p1:Width>
46+
<p1:Height>180</p1:Height>
47+
</p1:Size>
48+
<p1:X>703</p1:X>
49+
<p1:Y>353</p1:Y>
50+
<p1:Width>154</p1:Width>
51+
<p1:Height>180</p1:Height>
52+
</p1:Rectangle>
53+
<p1:Name>G1</p1:Name>
54+
</p1:PhotometryRegion>
55+
<p1:PhotometryRegion>
56+
<p1:Index>2</p1:Index>
57+
<p1:Channel>Green</p1:Channel>
58+
<p1:Rectangle>
59+
<p1:Location>
60+
<p1:X>943</p1:X>
61+
<p1:Y>134</p1:Y>
62+
</p1:Location>
63+
<p1:Size>
64+
<p1:Width>180</p1:Width>
65+
<p1:Height>176</p1:Height>
66+
</p1:Size>
67+
<p1:X>943</p1:X>
68+
<p1:Y>134</p1:Y>
69+
<p1:Width>180</p1:Width>
70+
<p1:Height>176</p1:Height>
71+
</p1:Rectangle>
72+
<p1:Name>G2</p1:Name>
73+
</p1:PhotometryRegion>
74+
<p1:PhotometryRegion>
75+
<p1:Index>3</p1:Index>
76+
<p1:Channel>Green</p1:Channel>
77+
<p1:Rectangle>
78+
<p1:Location>
79+
<p1:X>767</p1:X>
80+
<p1:Y>180</p1:Y>
81+
</p1:Location>
82+
<p1:Size>
83+
<p1:Width>176</p1:Width>
84+
<p1:Height>182</p1:Height>
85+
</p1:Size>
86+
<p1:X>767</p1:X>
87+
<p1:Y>180</p1:Y>
88+
<p1:Width>176</p1:Width>
89+
<p1:Height>182</p1:Height>
90+
</p1:Rectangle>
91+
<p1:Name>G3</p1:Name>
92+
</p1:PhotometryRegion>
93+
</p1:Regions>
94+
</Combinator>
95+
</Expression>
96+
<Expression xsi:type="Combinator">
97+
<Combinator xsi:type="p1:PhotometryData" />
98+
</Expression>
99+
<Expression xsi:type="ExternalizedMapping">
100+
<Property Name="FileName" DisplayName="FileNamePhotometry" />
101+
</Expression>
102+
<Expression xsi:type="Combinator">
103+
<Combinator xsi:type="p1:PhotometryWriter">
104+
<p1:IncludeRegions>false</p1:IncludeRegions>
105+
<p1:IncludePlots>false</p1:IncludePlots>
106+
<p1:IncludeVideo>false</p1:IncludeVideo>
107+
<p1:FileName>D:\iblrigv8_data\neurophotometrics\2024-10-10\T142948\raw_photometry.csv</p1:FileName>
108+
<p1:Suffix>None</p1:Suffix>
109+
</Combinator>
110+
</Expression>
111+
<Expression xsi:type="Combinator">
112+
<Combinator xsi:type="p1:DigitalIOs">
113+
<p1:Input0>true</p1:Input0>
114+
<p1:Input1>true</p1:Input1>
115+
<p1:Output0>false</p1:Output0>
116+
<p1:Output1>false</p1:Output1>
117+
</Combinator>
118+
</Expression>
119+
<Expression xsi:type="ExternalizedMapping">
120+
<Property Name="FileName" DisplayName="FileNameDigitalInput" />
121+
</Expression>
122+
<Expression xsi:type="io:CsvWriter">
123+
<io:FileName>D:\iblrigv8_data\neurophotometrics\2024-10-10\T142948\digital_inputs.csv</io:FileName>
124+
<io:Append>false</io:Append>
125+
<io:Overwrite>false</io:Overwrite>
126+
<io:Suffix>None</io:Suffix>
127+
<io:IncludeHeader>false</io:IncludeHeader>
128+
</Expression>
129+
</Nodes>
130+
<Edges>
131+
<Edge From="0" To="1" Label="Source1" />
132+
<Edge From="1" To="2" Label="Source1" />
133+
<Edge From="1" To="5" Label="Source1" />
134+
<Edge From="2" To="4" Label="Source1" />
135+
<Edge From="3" To="4" Label="Source2" />
136+
<Edge From="5" To="7" Label="Source1" />
137+
<Edge From="6" To="7" Label="Source2" />
138+
</Edges>
139+
</Workflow>
140+
</WorkflowBuilder>
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<VisualizerLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
>
5+
<DialogSettings>
6+
<Visible>false</Visible>
7+
<Location>
8+
<X>0</X>
9+
<Y>0</Y>
10+
</Location>
11+
<Size>
12+
<Width>0</Width>
13+
<Height>0</Height>
14+
</Size>
15+
<WindowState>Normal</WindowState>
16+
</DialogSettings>
17+
<DialogSettings>
18+
<Visible>false</Visible>
19+
<Location>
20+
<X>0</X>
21+
<Y>0</Y>
22+
</Location>
23+
<Size>
24+
<Width>0</Width>
25+
<Height>0</Height>
26+
</Size>
27+
<WindowState>Normal</WindowState>
28+
</DialogSettings>
29+
<DialogSettings>
30+
<Visible>false</Visible>
31+
<Location>
32+
<X>0</X>
33+
<Y>0</Y>
34+
</Location>
35+
<Size>
36+
<Width>0</Width>
37+
<Height>0</Height>
38+
</Size>
39+
<WindowState>Normal</WindowState>
40+
</DialogSettings>
41+
<DialogSettings>
42+
<Visible>false</Visible>
43+
<Location>
44+
<X>0</X>
45+
<Y>0</Y>
46+
</Location>
47+
<Size>
48+
<Width>0</Width>
49+
<Height>0</Height>
50+
</Size>
51+
<WindowState>Normal</WindowState>
52+
</DialogSettings>
53+
<DialogSettings>
54+
<Visible>false</Visible>
55+
<Location>
56+
<X>0</X>
57+
<Y>0</Y>
58+
</Location>
59+
<Size>
60+
<Width>0</Width>
61+
<Height>0</Height>
62+
</Size>
63+
<WindowState>Normal</WindowState>
64+
</DialogSettings>
65+
<DialogSettings>
66+
<Visible>false</Visible>
67+
<Location>
68+
<X>0</X>
69+
<Y>0</Y>
70+
</Location>
71+
<Size>
72+
<Width>0</Width>
73+
<Height>0</Height>
74+
</Size>
75+
<WindowState>Normal</WindowState>
76+
</DialogSettings>
77+
<DialogSettings>
78+
<Visible>false</Visible>
79+
<Location>
80+
<X>0</X>
81+
<Y>0</Y>
82+
</Location>
83+
<Size>
84+
<Width>0</Width>
85+
<Height>0</Height>
86+
</Size>
87+
<WindowState>Normal</WindowState>
88+
</DialogSettings>
89+
<DialogSettings>
90+
<Visible>false</Visible>
91+
<Location>
92+
<X>0</X>
93+
<Y>0</Y>
94+
</Location>
95+
<Size>
96+
<Width>0</Width>
97+
<Height>0</Height>
98+
</Size>
99+
<WindowState>Normal</WindowState>
100+
</DialogSettings>
101+
</VisualizerLayout>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Condition,No LED ON,L415,L470,L560
2+
No additional signal,0,1,2,4
3+
Output 1 signal HIGH,8,9,10,12
4+
Output 0 signal HIGH,16,17,18,20
5+
Stimulation ON,32,33,34,36
6+
GPIO Line 2 HIGH,64,65,66,68
7+
GPIO Line 3 HIGH,128,129,130,132
8+
Input 1 HIGH,256,257,258,260
9+
Input 0 HIGH,512,513,514,516
10+
Output 0 signal HIGH + Stimulation,48,49,50,52
11+
Output 0 signal HIGH + Input 0 signal HIGH,528,529,530,532
12+
Input 0 signal HIGH + Stimulation,544,545,546,548
13+
Output 0 HIGH + Input 0 HIGH + Stimulation,560,561,562,564
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Neurophotometrics recording with iblrigv8
2+
=========================================
3+
4+
This document describes how to use the iblrigv8 software to record Photometry using Neurophotometrics FP3002 system.
5+
6+
Setup
7+
-----
8+
9+
- iblrigv8 is installed according to the instructions
10+
- `settings/iblrig_settings.yaml` file is configured with the local folder and remote folder for the data transfer.
11+
- `settings/hardware_settings.yaml` file is configured with the neurophotometrics device
12+
13+
.. code:: yaml
14+
RIG_NAME: photometry
15+
MAIN_SYNC: False
16+
device_neurophotometrics:
17+
DEVICE_MODEL: NP3002
18+
BONSAI_EXECUTABLE: C:\Users\IBLuser\AppData\Local\Bonsai\Bonsai.exe
19+
BONSAI_WORKFLOW: devices\neurophotometrics\FP3002.bonsai
20+
COM_NEUROPHOTOMETRY: COM3
21+
22+
23+
Starting a photometry recording
24+
--------------------------------
25+
26+
- Start the Bonsai workflow by running the following command in powershell:
27+
.. code:: powershell
28+
29+
cd C:\iblrigv8\
30+
venv\scripts\Activate.ps1
31+
start_neurophotometrics
32+
- in Bonsai click on the FP3002 node and load the desired photometry settings file
33+
- start the task
34+
35+
The photometry recording will start and the photometry data will be saved in the data local folder with the following stucture:
36+
- {local_data_folder}\neurophotometrics\yyyy-mm-dd\THHMMSS
37+
Where yyyy-mm-dd is the date of the recording and HHMMSS is the time of the recording.
38+
39+
40+
41+
Starting a photometry session
42+
--------------------------------
43+
44+
- Start the Bonsai workflow by running the following command in powershell:
45+
.. code:: powershell
46+
47+
cd C:\iblrigv8\
48+
venv\scripts\Activate.ps1
49+
start_photometry_session --subject=Mickey --roi G0 G1 --location NBM SI
50+
51+
52+
53+
Copy command
54+
------------
55+
56+
Usage
57+
~~~~~
58+
59+
To initiate the data transfer from the local server to the remote server, open a terminal and type.
60+
61+
.. code:: powershell
62+
63+
C:\iblrigv8\venv\scripts\Activate.ps1
64+
transfer_data --tag photometry
65+
66+
The transfer local and remote directories are set in the
67+
``iblrig/settings/iblrig_settings.py`` file.
68+

iblrig/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# 5) git tag the release in accordance to the version number below (after merge!)
77
# >>> git tag 8.15.6
88
# >>> git push origin --tags
9-
__version__ = '8.24.7'
9+
__version__ = '8.25.0'
1010

1111

1212
from iblrig.version_management import get_detailed_version_string

iblrig/base_choice_world.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from pydantic import NonNegativeFloat, NonNegativeInt
1717

1818
import iblrig.base_tasks
19-
import iblrig.graphic
2019
from iblrig import choiceworld, misc
2120
from iblrig.hardware import SOFTCODE
2221
from iblrig.pydantic_definitions import TrialDataModel

0 commit comments

Comments
 (0)