Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
ee6a0c3
Update _Settings_Custom.conf (#4)
viktorpm Oct 29, 2024
bdd3e7f
reformating using Matlab smart indent
viktorpm Oct 30, 2024
e0b6473
Refine StimulusSection GUI layout
viktorpm Oct 30, 2024
2db74ff
Update README.md
viktorpm Oct 31, 2024
9a777c9
undo 04fac26329037c1e813fb3455d3fa4269e80f033: removing JavaFrame
viktorpm Nov 6, 2024
974418e
Update runrats module to use modern MATLAB UI methods
viktorpm Nov 6, 2024
69278e1
restructuring StimulusSection.m, no functional change
viktorpm Nov 8, 2024
c6a1e9b
Refactor StimulusSection.m:
viktorpm Nov 8, 2024
964e3e6
small update
viktorpm Nov 8, 2024
344e467
adding and updating protocol files from rig 31 (opto setup)
ledapent Nov 29, 2024
e2d0086
adding IP adresses to start_camera.m from rig31
viktorpm Nov 29, 2024
c4db5ee
Copy plots to new figure in StimulusSection.m (#9)
viktorpm Dec 5, 2024
6133e3a
Opto setup rig31 (#11)
viktorpm Dec 18, 2024
84ef217
updating sendsummary call in sound cat protocoll
viktorpm Feb 7, 2025
d76bbda
Update README.md
viktorpm Feb 20, 2025
059f5b8
Soundcalibration update (#13)
viktorpm Feb 26, 2025
2891917
djust sigma values in SoundCalibration.m (#14)
viktorpm Mar 3, 2025
a4dfb4d
ignoring mac specific files
Mar 18, 2025
b2b6463
adding new training protocol: 1 step for cenre poke
Mar 18, 2025
16eb6ab
adding new files to Arpit_CentrePokeTraining protocol: 1 step for cen…
Mar 18, 2025
10c60bf
changes made to Arpit_CentrePokeTraining protocol: 1 step for cenre poke
Mar 18, 2025
96a04ad
removed unused m files and updated the Arpit_CentrePokeTraining proto…
Mar 19, 2025
dbb2d7d
making the protocol Arpit_CentrePokeTraining protocol workable
Mar 19, 2025
495533f
still making the protocol Arpit_CentrePokeTraining protocol workable
Mar 19, 2025
ba92aca
still making the protocol Arpit_CentrePokeTraining protocol workable
Mar 19, 2025
c8c11f8
removed anti bias, added another protocol to compare,added the automa…
Mar 24, 2025
0ab7406
completed the automated training stage file, moved reward water calcu…
Mar 25, 2025
0d43e8e
changed ParamsSection to avoid error
viktorpm Mar 25, 2025
23b48e2
removed another error preventing running of State Machine in ParamsSe…
Mar 25, 2025
d0952c4
working around error during testing
Mar 25, 2025
8e9d606
working around error during testing
Mar 25, 2025
db0800e
corrected errors while testing
viktorpm Mar 25, 2025
4eb7991
added user controlled parameters for training stages as well as a new…
Mar 26, 2025
3aced50
changes to remove errors because of new addition during the previous …
viktorpm Mar 26, 2025
fae1f7a
error debug
viktorpm Mar 26, 2025
b66b400
corrected state machine for error and edited stage 1 to run without u…
Mar 28, 2025
117067e
changes made to create_helper_var function in sessionmodel2 because o…
viktorpm Mar 29, 2025
1c492d1
changes to automated training protocol
arpit99ag Mar 29, 2025
10e0095
added stimuli presentation in addition to fixed sound during CP. Crea…
arpit99ag Mar 31, 2025
ba4e871
error debug during trial run
viktorpm Mar 31, 2025
12beb29
Add pull request template
viktorpm Mar 31, 2025
88e08ab
minor fix with file name changes
arpit99ag Mar 31, 2025
8497d99
runtime error debugging on rig 31
viktorpm Mar 31, 2025
b131f0f
changed how stimuli distribution is generated
arpit99ag Apr 2, 2025
ae1f165
debug
viktorpm Apr 2, 2025
9732fe4
bug fix StimulusSection
arpit99ag Apr 2, 2025
e71b265
debug
viktorpm Apr 3, 2025
1fb03b0
state error fix in SMA for stage 4 and above.
arpit99ag Apr 3, 2025
072ce9b
bug fixes to get a working version of protocol
viktorpm Apr 3, 2025
453faff
paramSection updated to change the visibility of various parameters b…
arpit99ag Apr 3, 2025
5a25da5
stimulus plot
arpit99ag Apr 3, 2025
acd883c
debug stimuli figure
viktorpm Apr 3, 2025
6d4a444
chnages to plot the stim distribution, added USB based camera to Runrat
arpit99ag Apr 8, 2025
b08fe8b
increasing sound length
ledapent Apr 8, 2025
4f12e2c
Merge branch 'main' of https://github.com/LIMLabSWC/ratter
ledapent Apr 8, 2025
043a0b1
error debug
viktorpm Apr 8, 2025
1f48241
commented USB camera in runrats as its crashing MATLAB
arpit99ag Apr 8, 2025
3d27e04
added support for bonsai camera control
arpit99ag Apr 22, 2025
59998b8
camera debug
viktorpm Apr 22, 2025
7131b5c
camera debug
viktorpm Apr 23, 2025
b88e3f3
renamed protocol to remove underscore in name. Unable to rename one o…
viktorpm Apr 23, 2025
fec7bbf
changed the folder name in another machine
arpit99ag Apr 23, 2025
cc7dffc
error debug caused by filename change
viktorpm Apr 23, 2025
2c4c9ef
updated PR template
viktorpm Apr 24, 2025
bc9cbd2
changed bonsai folder name as it was part of gitignore
arpit99ag Apr 25, 2025
64a4a9a
test code
arpit99ag Apr 25, 2025
9fba683
debug
arpit99ag Apr 25, 2025
08c7f5e
test
arpit99ag Apr 25, 2025
1e8bb60
rigtest oneclick startup
viktorpm Apr 25, 2025
85a3684
pokesplot debug
arpit99ag Apr 26, 2025
59ccb40
save setting change
arpit99ag Apr 27, 2025
5963fc7
added ratname and exp name while loading protocol
viktorpm Apr 27, 2025
055d412
last commit again
arpit99ag Apr 27, 2025
89c8cb4
error debug session definition
arpit99ag May 2, 2025
6c2d0c0
added control button for camera
arpit99ag May 2, 2025
f08662f
debug
arpit99ag May 2, 2025
97da425
debug
arpit99ag May 2, 2025
96e77be
added control for reward sound in early training stages
arpit99ag May 2, 2025
415382c
error debug
arpit99ag May 4, 2025
375f44b
added new window to see training performance
arpit99ag May 5, 2025
f2956f3
working version of summary section
viktorpm May 6, 2025
c08eb20
updated the protocol to calculate the training performance
arpit99ag May 6, 2025
02bd09b
debug
viktorpm May 6, 2025
1939d8b
debug
arpit99ag May 6, 2025
eb88137
debug
arpit99ag May 6, 2025
a9afa0c
added camera as plugin and updating session performance by session d…
arpit99ag May 7, 2025
a73f293
error debug camera plugin
arpit99ag May 7, 2025
2a9ab96
debug
viktorpm May 7, 2025
d759665
added description for bonsaicamera plugin
arpit99ag May 7, 2025
cccb577
changed m files names to follow bcontrol convention for loading setting
arpit99ag May 8, 2025
224c676
debug
arpit99ag May 8, 2025
1b06da4
error debug
arpit99ag May 8, 2025
e3cac6e
debug session table entry
arpit99ag May 8, 2025
55836b6
debug
arpit99ag May 8, 2025
0191737
Merge main into 2_step_soundcat_arpit to integrate recent changes and…
viktorpm May 9, 2025
0f40deb
edited to remove database error
arpit99ag May 9, 2025
e112c2d
merge accepted
arpit99ag May 9, 2025
e7e24fa
added description to saving section
arpit99ag May 9, 2025
60591e2
added code to load setting file during intialization
arpit99ag May 9, 2025
5e35e0e
fixing email sending functionality in runrats
arpit99ag May 12, 2025
5979ea2
fixing scheduler to work and also adding the same to LoadSettingGUI
arpit99ag May 13, 2025
f545594
adding rerun after crash in runrats
arpit99ag May 13, 2025
bb3cda3
removed redundant code from runrat to update the codes from svn as we…
arpit99ag May 13, 2025
e5d5e2f
removed live loop in runrats as it was redundant and causing error in…
arpit99ag May 14, 2025
a43315d
error debug and adding video record start on user pressing run in runrat
arpit99ag May 15, 2025
abcd110
added detailed error report on crash, changed filename of trial avi f…
arpit99ag May 16, 2025
dd4db3c
automatically create setting file for new rat for ArpitCentrePokeTrai…
arpit99ag May 16, 2025
aa76a72
camera error
arpit99ag May 17, 2025
95c042b
camera filename error correction
arpit99ag May 17, 2025
f86f726
camera filename error correction
arpit99ag May 17, 2025
9fbbe2f
changed n_completed_trials to n_done_trials in all functions
arpit99ag May 20, 2025
b9d01f5
loading training stage during init in ArpitCentrePokeTraining
arpit99ag May 20, 2025
71a575b
added data to sqltable
arpit99ag May 20, 2025
3864c6c
continued data addition to sql table
arpit99ag May 20, 2025
ec7e849
same as last
arpit99ag May 20, 2025
67ecbc1
same as previous
arpit99ag May 21, 2025
c4e5d6f
updated automated training file
arpit99ag May 21, 2025
11eb87d
error debug
arpit99ag May 22, 2025
1d15d06
error debug
arpit99ag May 23, 2025
3143109
error debug
arpit99ag May 23, 2025
7790fa4
error debug and minor improvements
arpit99ag May 27, 2025
52c61ee
making ArpitPokeTraining more efficient
arpit99ag Jun 4, 2025
4d83f16
changed video save directory
arpit99ag Jun 4, 2025
471fbce
new protocol arpitsoundcatcomtinous
arpit99ag Jun 5, 2025
5bbf68b
error debug
arpit99ag Jun 5, 2025
57d13a9
changing the gif layout of ArpitSoundCatContinuous
arpit99ag Jun 5, 2025
39d2255
error debug
arpit99ag Jun 5, 2025
cc551eb
error debug
arpit99ag Jun 5, 2025
104e24a
error debug
arpit99ag Jun 5, 2025
7a5d19c
working version of ArpitSoundCatContinuous protocol
arpit99ag Jun 5, 2025
48b3a85
debug
arpit99ag Jun 5, 2025
d7a94cc
error debug for working copy
arpit99ag Jun 6, 2025
53b01c8
error debug
viktorpm Jun 6, 2025
d2d4040
changed directory of ratter videos
arpit99ag Jun 9, 2025
9344d00
error debug
arpit99ag Jun 18, 2025
0154f39
error debug
arpit99ag Jun 25, 2025
042da12
error debug
arpit99ag Jun 25, 2025
4131fc0
error debug for wrong fun name
arpit99ag Jun 25, 2025
96edb61
changes in ArpitSoundCatcontinuous to stimulator section
arpit99ag Jun 25, 2025
ba0db75
error debug
arpit99ag Jun 25, 2025
9f0273e
added trialnum indicator for ephys sychronization
arpit99ag Jun 26, 2025
2de2fe6
changes to GUI of ArpitSoundCat
arpit99ag Jun 26, 2025
b5e4361
error debug for previous changes
arpit99ag Jun 26, 2025
609593b
fixed Stim Distribution plot
arpit99ag Jun 26, 2025
0442970
added psychometric curve to ArpitSoundCatContinuous
arpit99ag Jul 5, 2025
197cbdd
added psychometric for ArpitSoundCat
arpit99ag Jul 5, 2025
037eb8b
added psychometric for ArpitSoundCat
arpit99ag Jul 5, 2025
4fc04b7
changes made to accomodate running without runrats
arpit99ag Jul 6, 2025
cea9925
error debug for changes to run without runrat
arpit99ag Jul 8, 2025
093aae4
added file to gitignore
arpit99ag Jul 8, 2025
923d407
changes to make protocol work without runrats
arpit99ag Jul 9, 2025
d17a7cd
new module OpenEphys_neuroblueprint for ephys
arpit99ag Jul 11, 2025
b7b36fe
new module for ephys with openephys
arpit99ag Jul 17, 2025
6fbc526
major refactoring of the scripts to change the stimulus selection and…
arpit99ag Jul 30, 2025
6d4195d
added more realtime plots like hit rate and stim distribution in Arpi…
arpit99ag Aug 1, 2025
bc9d19b
New module to do neuropixel recordings with ArpitSoundCatContinuous
arpit99ag Aug 8, 2025
04f50d9
added neuropixel helper module
arpit99ag Sep 28, 2025
a143bdc
error debug
arpit99ag Sep 29, 2025
2e1bb73
error debug
arpit99ag Oct 1, 2025
5ea7976
added functionality to neuropixel recording GUI
arpit99ag Oct 8, 2025
890cd35
added missing functionality to control invalid button press
arpit99ag Oct 12, 2025
a2914d6
error debug
arpit99ag Oct 21, 2025
0bb94ba
error debug
arpit99ag Oct 22, 2025
f10773b
change setting value for stim distribution in ArpitSoundCatContinuous
arpit99ag Nov 4, 2025
c5b11b6
changed the rewarded water amount for ArpitSoundCatContinuous
arpit99ag Nov 7, 2025
d5aad1e
changed the rewarded water amount for ArpitSoundCatContinuous error d…
arpit99ag Nov 7, 2025
abc98a7
error debug
arpit99ag Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### Description

Please include a summary of the changes made. Include any relevant context, screenshots, or details.

### Type of Change

- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Breaking change
- [ ] Other (please specify):

### Checklist

- [ ] I have tested the changes locally.
- [ ] I have updated the documentation accordingly.
- [ ] I have added necessary tests to cover the changes.
- [ ] I have followed the code style guidelines.
- [ ] I have verified that the code works in all target environments.
- [ ] I have made sure the technicians are comfortable using the new feature (if applicable).

### Related Issues

Closes # (issue number)

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
.svn/
SoloData/
Bonsai/
training_videos/
ExperPort/Settings/Settings_Custom_v0_789.conf
ExperPort/Settings/Settings_Custom_v2_0.conf
ExperPort/Settings/Settings_Custom.conf
ExperPort/sendsummary_error_log.txt
/ExperPort/settings_@*.mat
PASSWORD_CONFIG-DO_NOT_VERSIONCONTROL.mat
.gitattributes
.DS_Store
Screenshot 2025-01-22 at 11.22.30.png


1,514 changes: 1,514 additions & 0 deletions ExperPort/Modules/@NeuropixelNeuroblueprint/NeuropixelNeuroblueprint.asv

Large diffs are not rendered by default.

1,539 changes: 1,539 additions & 0 deletions ExperPort/Modules/@NeuropixelNeuroblueprint/NeuropixelNeuroblueprint.m

Large diffs are not rendered by default.

133 changes: 91 additions & 42 deletions ExperPort/Modules/@StateMachineAssembler/StateMachineAssembler.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
%

% Written by Carlos Brody October 2006; edited by Sebastien Awwad 2007,2008

% Additional Input lines added December 2012 CDB

function [sma] = StateMachineAssembler(varargin)

Expand All @@ -36,30 +36,13 @@
sma_struct = [];
end;


fnames = {'name', 'detectorFunctionName', 'inputNumber', 'happId'};
hs = {
'Cin', 'line_in', 1, 1 ; ...
'Cout', 'line_out', 1, 2 ; ...
'Lin', 'line_in', 2, 3 ; ...
'Lout', 'line_out', 2, 4 ; ...
'Rin', 'line_in', 3, 5 ; ...
'Rout', 'line_out', 3, 6 ; ...
'Chi', 'line_high', 1, 7 ; ...
'Clo', 'line_low', 1, 8 ; ...
'Lhi', 'line_high', 2, 9 ; ...
'Llo', 'line_low', 2, 10 ; ...
'Rhi', 'line_high', 3, 11 ; ...
'Rlo', 'line_low', 3, 12 ; ...
};

default_happSpec = cell2struct(hs, fnames, 2);



pairs = { ...
'default_DOut' 0 ; ...
'default_happSpec' default_happSpec ; ...
'default_happSpec' [] ; ...
'use_happenings' 0 ; ...
'n_input_lines' 3 ; ...
'line_names' 'CLRABDEFGHIJKL' ; ...
};
singles = { ...
'no_dead_time_technology', 'inputarg', 'no_dead_time_technology', '' ; ...
Expand All @@ -68,48 +51,115 @@
};
parseargs(varargin, pairs, singles);

if n_input_lines ~= 3 && ~use_happenings,
error('Can use n_input_lines different to 3 only if using happenings');
end;

if isempty(default_happSpec) %#ok<*NODEF>
fnames = {'name', 'detectorFunctionName', 'inputNumber', 'happId'};
happnames = {'line_in', 'line_out', 'line_high', 'line_low'};
happabbrev = {'in', 'out', 'hi', 'lo'};
hid = 0;
hs = {};

for li = 1:3,
for hni = 1:2,
hid = hid + 1;
hs = [hs ; ...
{[line_names(li) happabbrev{hni}], happnames{hni}, li, hid}];
end;
end;
for li = 1:3,
for hni = 1:2,
hid = hid + 1;
hs = [hs ; ...
{[line_names(li) happabbrev{hni+2}], happnames{hni+2}, li, hid}];
end;
end;

for li=4:n_input_lines,
for hni = 1:4,
hid = hid + 1;
hs = [hs ; ...
{[line_names(li) happabbrev{hni}], happnames{hni}, li, hid}];
end;
end;

%Chuck's code to try to remap inputs
inputs = bSettings('get','INPUTLINES','all');
for i = 1:size(hs,1)
inputnum = find(strcmp(inputs(:,1),hs{i,1}(1)) == 1,1,'first');
if isempty(inputnum)
error(['can''t find input channel ',hs{i,1}(1),' in INPUTLINES ']);
elseif numel(inputnum) > 1
error(['found more than one instance of input channel ',hs{i,1}(1),' in INPUTLINES ']);
end

hs{i,3} = inputs{inputnum,2};
end
%end Chuck's code

default_happSpec = cell2struct(hs, fnames, 2);
end;


if isempty(default_DOut),
error('you passed in an empty matrix as a default_DOut -- can''t do that');
end;
if numel(default_DOut) ~= 1 || default_DOut ~= 0,
% error('sorry, default_DOut different to zero not yet supported');
end;

default_input_map = { ...
'Cin' 1 ; ...
'Cout' 2 ; ...
'Lin' 3 ; ...in
'Lout' 4 ; ...
'Rin' 5 ; ...
'Rout' 6 ; ...
'Tup' 7 ; ...
};
ncols = 7; % Keeping track of total number of state matrix columns
input_line_names = line_names;
default_input_map = cell(0, 2);
for k=1:n_input_lines,
if k > numel(input_line_names),
error('Sorry, trying to have more input lines than I can handle!');
end;
default_input_map = [default_input_map ; ...
{[input_line_names(k) 'in'] k*2-1 ; ...
[input_line_names(k) 'out'] k*2 ; ...
}];
end;
ncols = n_input_lines*2+1;
default_input_map = [default_input_map ; {'Tup' ncols}];


% default_input_map = { ...
% 'Cin' 1 ; ...
% 'Cout' 2 ; ...
% 'Lin' 3 ; ...
% 'Lout' 4 ; ...
% 'Rin' 5 ; ...
% 'Rout' 6 ; ...
% 'Tup' ncols ; ...
% };

default_self_timer_map = { ...
'Timer' 8 ; ...
'Timer' ncols+1 ; ...
};

default_output_map = { ...
'DOut' 9 ; ...
'SoundOut' 10 ; ...
'DOut' ncols+2 ; ...
'SoundOut' ncols+3 ; ...
};

ncols = ncols+3;

sma = struct( ...
sma = struct( ...
'n_input_lines', n_input_lines, ...
'input_map', {default_input_map}, ...
'self_timer_map', {default_self_timer_map}, ...
'output_map', {default_output_map}, ...
'use_happenings', 1, ... % added by Viktor
'n_input_lines', 3, ... % added by Viktor
...%'use_happenings', use_happenings, ...
'use_happenings', use_happenings, ...
'happSpec', default_happSpec, ...
'happList', {cell(0, 1)}, ...
'state_name_list', {cell(0,3)}, ...
'current_state', 0, ...
'states', zeros(0, 10), ...
'states', zeros(0, ncols), ...
'default_actions', {cell(0, 1)}, ...
'current_iti_state', 0, ...
'iti_states', zeros(0, 10), ...
'iti_states', zeros(0, ncols), ...
'default_iti_actions', {cell(0, 1)}, ...
'dio_sched_wave_cols', 8, ...
'sched_waves', struct('name', {}, 'id', {}, 'in_column', {}, ...
Expand Down Expand Up @@ -150,7 +200,6 @@
sma = class(sma, 'StateMachineAssembler');
return;
end;
%clear classes %mod by Viktor


sma = class(sma, 'StateMachineAssembler');
Expand Down
4 changes: 4 additions & 0 deletions ExperPort/Modules/@dispatcher/RunningSection.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
SoloParamHandle(obj, 'stop_after_next_update', 'value', 0);
SoloParamHandle(obj, 'stopping_process_completed', 'value', 1);
SoloFunctionAddVars('runrats','func_owner','@runrats','ro_args','stopping_process_completed'); % This is a bit unpleasant. We give ro access to the flag denoting the stop process as complete to runrats so that runrats can wait on it using a timer. :P
SoloFunctionAddVars('NeuropixelNeuroblueprint','func_owner','@NeuropixelNeuroblueprint','ro_args','stopping_process_completed'); % This is a bit unpleasant. We give ro access to the flag denoting the stop process as complete so that NeuropixelNeuropblueprint can wait on it using a timer. :P
SoloFunctionAddVars('TowerWaterDelivery','func_owner','@TowerWaterDelivery','ro_args','stopping_process_completed'); % This is a bit unpleasant. We give ro access to the flag denoting the stop process as complete to runrats so that runrats can wait on it using a timer. :P

set(get_ghandle(RunButton), 'FontSize', 20); % (defined by GetSoloFunctionArgs)
Expand Down Expand Up @@ -283,6 +284,9 @@
if runrats('is_running');
runrats('crashed',me);
Running.value = 0;
elseif NeuropixelNeuroblueprint('is_running')
NeuropixelNeuroblueprint('crash_detected');
Running.value = 0;
else
rethrow(me);
end
Expand Down
Loading