Representations of the intrinsic value of information in mouse orbitofrontal cortex.
The 21 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
- [1] § Methods › Imaging data processing ↔ 03 ImagingCellExtractionPipeline/CNMFE_pipe.m, lines 37–148 · score 0.99 · gSig, gSiz, min_corr_res, min_pnr_res, min_pixel, minimum peak
- [2] § Methods › Imaging data processing ↔ 04 ImagingAnalysis/CellRegistrationMulti.m, lines 95–141 · score 0.92 · CaImAn, options.dist_maxthr, options.dist_thr, register_multisession, Cell registration, rois
- [3] § Methods › Imaging data processing ↔ 03 ImagingCellExtractionPipeline/CNMFE_pipe.m, lines 37–148 · score 0.89 · background fluctuation, spatially downsampled, motion corrected, Gaussians, smaller, filtered
- [4] § Methods › Analysis of neural activity ↔ 01 Bpod/InfoseekWaterVal/InfoseekWaterVal.m, lines 73–120 · score 0.81 · valve opening, odor onset, odor valves, Bpod system, side port odor, center port odor
- [5] § Methods › Analysis of neural activity ↔ 01 Bpod/InfoseekSyncSignal2/InfoseekSyncSignal2.m, lines 54–104 · score 0.81 · valve opening, odor onset, odor valves, Bpod system, side port odor, center port odor
- [6] § Methods › Behavior training and testing › Main task ↔ 01 Bpod/InfoseekWaterVal/InfoseekWaterVal.m, lines 2–59 · score 0.78 · mineral oil, Latch valves, Bpod system, olfactometers, modules, side port
- [7] § Methods › Imaging data processing ↔ 04 ImagingAnalysis/CellRegistrationMulti.m, lines 95–141 · score 0.78 · bin_width, max_shift, iter, NormCorre, template, CNMF
- [8] § Results › Mice value information ↔ 02 BehaviorAnalysis/InfoseekBehaviorModel_Finalized_CV.m, lines 373–425 · score 0.77 · delay discounted, lose shift, RLinfo, RLwater, win stay, exponential
- [9] § Methods › Behavior training and testing › Main task ↔ 01 Bpod/InfoseekSyncToneGo/InfoseekSyncToneGo.m, lines 1–50 · score 0.75 · alternative forced choice, reward outcome, amplifier, speaker, hardware, module
- [10] § Methods › Behavior training and testing › Main task ↔ 01 Bpod/InfoseekWaterVal/InfoseekWaterVal.m, lines 2–59 · score 0.72 · HiFi, forced choice, sound, hardware, water reward, module
- [11] § Methods › Behavior training and testing › Main task ↔ 01 Bpod/InfoseekSyncSignal2/InfoseekSyncSignal2.m, lines 970–1007 · score 0.71 · Lee Company, Latch valves, Bpod system, modules, ports, odors
- [12] § Methods › Behavior training and testing › Main task ↔ 01 Bpod/InfoseekWaterVal/InfoseekWaterVal.m, lines 73–120 · score 0.70 · grace period, go cue, side port odor, correct side port, poking, center odor
- [13] § Methods › Behavioral models ↔ Functions/fitPsyche.m, lines 1–42 · score 0.61 · psychometric curve, fitPsycheCurveWH, fitting, model
- [14] § Methods › Behavior analysis ↔ 02 BehaviorAnalysis/BehaviorAnalysisAll.m, lines 1075–1168 · score 0.61 · choice preference, glmfit, binomial, logit, binofit, signrank
- [15] § Methods › Behavioral models ↔ 02 BehaviorAnalysis/InfoseekBehaviorModel_Finalized_CV.m, lines 373–425 · score 0.61 · win stay lose, shift, model, weighted, Behavioral, reward
- [16] § Methods › Behavior training and testing › Water and delay titration experiments ↔ 02 BehaviorAnalysis/InfoseekBehaviorModel_Finalized_CV.m, lines 122–218 · score 0.57 · delay titration, reward amount, water reward, reverse, preference, modeling
- [17] § Methods › Analysis of neural activity ↔ Functions/absolute_rocarea.m, the whole file · a weak match · score 0.56 · vice versa, halves, split, odd
- [18] § Methods › CEBRA modeling ↔ 04 ImagingAnalysis/InfoseekNeuralAnalysisLearning.m, lines 33–109 · score 0.56 · long delay, JB433, JB424, JB434, JB425, JB426
- [19] § Methods › Behavioral models ↔ 02 BehaviorAnalysis/InfoseekBehaviorModel_Finalized_CV.m, lines 122–218 · score 0.54 · negative log likelihood, minimization, Behavioral, models
- [20] § Methods › Behavior training and testing › Behavioral training ↔ 01 Bpod/InfoseekSyncSignal2/InfoseekSyncSignal2.m, lines 54–104 · score 0.53 · center poke, center port odor, side port, duration, interval, Delivery
- [21] § Methods › Cells with significant conditional responses to task events (responding cells) ↔ 04 ImagingAnalysis/InfoseekNeuralAnalysis.m, lines 485–546 · score 0.52 · exponential decay, responding, baseline, post, event, pre
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 1,278 lines · 56 KB · no license · 4 matches
- %{
- ----------------------------------------------------------------------------
- InfoseekWaterVal — Protocol for task with 4 center ports odors to compare information and water value
- ----------------------------------------------------------------------------
- Runs four forced-choice trial types cued by odor at the center port: information, no information (random),
- high water value (big), low water value (small). Usually, the same side (left/right) is assigned to information
- and small.
- TASK STRUCTURE (per trial):
- 1. Mouse pokes center port → receives an odor cueing the forced side
- for this trial (info, rand, big, small)
- 2. Mouse pokes the cued side port
- 3. Side port delivers a second odor (only on information or random trials)
- 4. After a delay (with an auditory warning tone predicting reward size),
- water reward is delivered at the same port
- (mouse must be present in port only at outcome time to receive reward)
- TRIAL TYPES (set by S.GUI.TrialTypes):
- 1 = Small — center odor = SmallOdor
- 2 = Info Forced — center odor = InfoOdor
- 3 = Rand Forced — center odor = RandOdor
- 4 = Big — center odor = BigOdor
- SIDE ASSIGNMENT:
- S.GUI.InfoSide (0/1): 0 = Info odors (A/B) go LEFT, Rand odors (C/D) go RIGHT
- 1 = Info odors (A/B) go RIGHT, Rand odors (C/D) go LEFT
- S.GUI.BigSide (0/1): 0 = Big water trials go LEFT, Small water trials go RIGHT
- 1 = Big water trials go RIGHT, Small water trials go LEFT
- Info and small water normally set to the same side.
- HARDWARE:
- ValveModule1 — control mineral oil (center / left / right)
- ValveModule2/3 — odor valves (8 positions each)
- DIOmodule (Teensy) — buzzer, latch valves (flip side port odors from left to right)
- HiFi module (H) — go-cue tone and reward-predictive tones (sounds 1-3 loaded at start)
- BNC1/2 — sync signals to DAQ/miniscope/tracking camera via GlobalTimers 7/8
- REWARD DROPS:
- Drops are delivered via looping GlobalTimers (3 = left valve, 4 = right).
- Drop counts controlled by S.GUI.Info/Rand Big/SmallDrops and S.GUI.Big/SmallDrops.
- OUTCOME CODES (BpodSystem.Data.Outcomes):
- 1 = Small no-choice 5 = Info no-choice 11 = Rand no-choice 17 = Big no-choice
- 2 = Small correct 6 = Info big 12 = Rand big 18 = Big correct
- 3 = Small NP 7 = Info big NP 13 = Rand big NP 19 = Big NP
- 4 = Small incorrect 8 = Info small 14 = Rand small 20 = Big incorrect
- 9 = Info small NP 15 = Rand small NP
- 10 = Info incorrect 16 = Rand incorrect
- ----------------------------------------------------------------------------
- Three valve control modules control airflow in the custom dilution
- olfactometer.
- One Teensy 3.2 connected as a module with the Bpod Teensy Shield controls
- a buzzer (not used when Hifi tones in use) and latch valves via 2 H-bridges.
- %}
- function InfoseekWaterVal
- global BpodSystem
- %% Assert HiFi module is present + USB-paired (via USB button on console GUI)
- BpodSystem.assertModule('HiFi', 1); % The second argument (1) indicates that the HiFi module must be paired with its USB serial port
- % Create an instance of the HiFi module
- H = BpodHiFi(BpodSystem.ModuleUSB.HiFi1); % The argument is the name of the HiFi module's USB serial port (e.g. COM3)
- %% Create trial manager object
- TrialManager = TrialManagerObject;
- %% Define parameters
- S = BpodSystem.ProtocolSettings; % Load settings chosen in launch manager into current workspace as a struct called S
- if isempty(fieldnames(S)) % No saved settings — populate with defaults
- % Session structure
- S.GUI.SessionTrials = 1000;
- S.GUI.TrialTypes = 2; % 1=Small, 2=Info, 3=Rand, 4=Big, 5-8=mixes (see SetTrialTypes)
- S.GUI.InfoSide = 0; % 0=info→left/rand→right, 1=info→right/rand→left
- S.GUI.BigSide = 0; % 0=big→left/small→right, 1=big→right/small→left
- % Center-port odor valve indices (positions on ValveModule2/3)
- S.GUI.InfoOdor = 2;
- S.GUI.RandOdor = 0;
- S.GUI.BigOdor = 3;
- S.GUI.SmallOdor = 1;
- % Side-port odor valve indices
- S.GUI.OdorA = 3; % Info big
- S.GUI.OdorB = 2; % Info small
- S.GUI.OdorC = 0; % Rand big
- S.GUI.OdorD = 1; % Rand small
- % Timing (seconds)
- S.GUI.CenterDelay = 0; % delay after center poke before odor onset
- S.GUI.CenterOdorTime = 0.2; % duration of center-port odor (s)
- S.GUI.StartDelay = 0; % delay after center odor before go cue
- S.GUI.OdorDelay = 0; % delay after go cue before side odor onset
- S.GUI.OdorTime = 0; % duration of side-port odor (s)
- S.GUI.RewardDelay = 0.5; % delay from odor offset to reward delivery (s)
- S.GUI.Signal = 0.2; % fraction of RewardDelay spent as an audible/light warning before reward
- S.GUI.GracePeriod = 100000000; % additional time (s) to wait for response after go cue on top of OdorDelay; odor then delivered immediately upon correct side port entry
- S.GUI.Interval = 1; % inter-trial interval (s)
- % Reward drops (number of valve open/close cycles per reward)
- S.GUI.InfoBigDrops = 1;
- S.GUI.InfoSmallDrops = 1;
- S.GUI.RandBigDrops = 1;
- S.GUI.RandSmallDrops = 1;
- S.GUI.BigDrops = 8;
- S.GUI.SmallDrops = 2;
- % Reward probability (fraction of trials that give big reward; rest give small)
- S.GUI.InfoRewardProb = 1;
- S.GUI.RandRewardProb = 1;
- BpodSystem.ProtocolSettings = S;
- SaveProtocolSettings(BpodSystem.ProtocolSettings);
- end
- %% Set Latch Valves
- SetLatchValves(S);
- %% Set up trial types and rewards
- S.TrialTypes = [];
- S.RewardTypes = [];
- S.RandOdorTypes = [];
- S = SetTrialTypes(S,1); % Sets S.TrialTypes from trial 1 to maxTrials
- S = SetRewardTypes(S,1); % Sets S.RewardTypes, S.RandOdorTypes from trial 1 to maxTrials
- %% SET INITIAL TYPE COUNTS
- BpodSystem.Data.TrialCounts = [0,0,0,0];
- BpodSystem.Data.PlotOutcomes = [];
- %% SAVE EVENT NAMES AND NUMBER
- BpodSystem.Data.TrialTypes = []; % The trial type of each trial completed will be added here.
- BpodSystem.Data.Outcomes = [];
- BpodSystem.Data.OrigTrialTypes = S.TrialTypes; % take out if working?
- BpodSystem.Data.OrigRewardTypes = S.RewardTypes; % take out if working?
- BpodSystem.Data.EventNames = BpodSystem.StateMachineInfo.EventNames;
- SaveBpodSessionData;
- %% Initialize plots
- BpodSystem.ProtocolFigures.TrialTypePlotFig = figure('Position', [50 640 1000 250],'name','Trial Type','numbertitle','off', 'MenuBar', 'none');
- BpodSystem.GUIHandles.TrialTypePlot = axes('OuterPosition', [0 0 1 1]);
- TrialTypePlotInfoWater(BpodSystem.GUIHandles.TrialTypePlot,'init',S.TrialTypes,min([S.GUI.SessionTrials 40])); % trial choice types
- % EventsPlot('init', getStateColors(S.GUI.InfoSide)); % events within trial
- BpodSystem.ProtocolFigures.OutcomePlotFig = figure('Position', [50 100 600 400],'name','TrialOutcomes','numbertitle','off', 'MenuBar', 'none');
- BpodSystem.GUIHandles.OutcomePlot = axes('OuterPosition', [0 0 1 1]);
- InfoWaterOutcomesPlot(BpodSystem.GUIHandles.OutcomePlot,'init');
- BpodNotebook('init');
- InfoParameterGUI('init', S); % Initialize parameter GUI plugin
- TotalRewardDisplayInfo('init');
- %% INITIALIZE SERIAL MESSAGES / DIO
- ResetSerialMessages();
- buzzer1 = [254 1];
- buzzer2 = [253 1];
- modules = BpodSystem.Modules.Name;
- DIOmodule = [modules(strncmp('DIO',modules,3))];
- DIOmodule = DIOmodule{1};
- % Set serial messages for Teensy module to control box, communicate with
- % DAQ/miniscope
- LoadSerialMessages(DIOmodule, {buzzer1, buzzer2,...
- [22 1],[22 0],[23 1], [23 0]});
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % ODOR CONTROL SERIAL MESSAGES
- LoadSerialMessages('ValveModule1',{[1 2],[3 4],[5 6]}); % control by port
- %% Define sounds and send to sound module
- sf = 192000; % Use max supported sampling rate
- H.SamplingRate = sf;
- noRewardFreq=500;
- rewardFreq=2000;
- toneDuration=0.5;
- rewardSound = GenerateSineWave(sf, noRewardFreq, toneDuration)*.9;
- % Sampling freq (hz), Sine frequency (hz), duration (s)
- noRewardSound = GenerateSineWave(sf, rewardFreq, toneDuration)*.9;
- goSound = GenerateSineWave(sf, 1200, 0.05)*.9;
- % Setup HiFi module
- % H.HeadphoneAmpEnabled = true; H.HeadphoneAmpGain = 10; % Ignored if using HD version of the HiFi module
- H.DigitalAttenuation_dB = -50; % Set a negative value here if necessary for digital volume control.
- H.load(1, rewardSound);
- H.load(2, noRewardSound);
- H.load(3, goSound);
- % Define 1ms linear ramp envelope of amplitude coefficients, to apply at sound onset + in reverse at sound offset
- envelope = 1/(sf*0.001):1/(sf*0.001):1;
- H.AMenvelope = envelope;
- %% INITIALIZE STATE MACHINE
- [sma,S,nextRewardLeft,nextRewardRight] = PrepareStateMachine(S, 1, []); % Prepare state machine for trial 1 with empty "current events" variable
- TrialManager.startTrial(sma); % Sends & starts running first trial's state machine. A MATLAB timer object updates the
- % console UI, while code below proceeds in parallel.
- RewardLeft = nextRewardLeft; RewardRight = nextRewardRight;
- %% MAIN TRIAL LOOP
- for currentTrial = 1:S.GUI.SessionTrials
- currentS = S;
- currentTrialEvents = TrialManager.getCurrentEvents({'WaitForOdorLeft','WaitForOdorRight','NoChoice','Incorrect'}); % Hangs here until Bpod enters one of the listed trigger states, then returns current trial's states visited + events captured to this point
- if BpodSystem.Status.BeingUsed == 0
- TurnOffAllOdors();
- return; end % If user hit console "stop" button, end session
- [sma, S, nextRewardLeft,nextRewardRight] = PrepareStateMachine(S, currentTrial+1, currentTrialEvents); % Prepare next state machine.
- SendStateMachine(sma, 'RunASAP'); % send the next trial's state machine while the current trial is ongoing
- RawEvents = TrialManager.getTrialData; % Hangs here until trial is over, then retrieves full trial's raw data
- if BpodSystem.Status.BeingUsed == 0
- TurnOffAllOdors();
- return; end % If user hit console "stop" button, end session
- HandlePauseCondition; % Checks to see if the protocol is paused. If so, waits until user resumes.
- TrialManager.startTrial(); % Start processing the next trial's events
- if ~isempty(fieldnames(RawEvents)) % If trial data was returned from last trial, update plots and save data
- BpodSystem.Data = AddTrialEvents(BpodSystem.Data,RawEvents); % Computes trial events from raw data
- [rewardAmount,outcome] = UpdateOutcome(currentTrial,currentS,RewardLeft,RewardRight);
- BpodSystem.Data.TrialSettings(currentTrial) = currentS.GUI; % Adds the settings used for the current trial to the Data struct (to be saved after the trial ends)
- BpodSystem.Data.TrialTypes(currentTrial) = currentS.TrialTypes(currentTrial); % Adds the trial type of the current trial to data
- BpodSystem.Data.Outcomes(currentTrial) = outcome;
- BpodSystem.Data = BpodNotebook('sync', BpodSystem.Data); % Sync with Bpod notebook plugin
- TotalRewardDisplayInfo('add',rewardAmount);
- RewardLeft = nextRewardLeft; RewardRight = nextRewardRight;
- TrialTypePlotInfoWater(BpodSystem.GUIHandles.TrialTypePlot,'update',currentTrial,S.TrialTypes);
- InfoWaterOutcomesPlot(BpodSystem.GUIHandles.OutcomePlot,'update');
- tic
- SaveBpodSessionData;
- toc
- end
- end
- end % end of protocol main function
- %% PREPARE STATE MACHINE
- function [sma, S, RewardLeft, RewardRight] = PrepareStateMachine(S, nextTrial, currentTrialEvents)
- % Build state machine for nextTrial.
- % currentTrialEvents: events captured so far from the current (running) trial,
- % used to detect early port entry and extend trial type arrays if needed.
- % Returns updated S, and the reward valve timer counts for left/right.
- global BpodSystem;
- modules = BpodSystem.Modules.Name;
- DIOmodule = [modules(strncmp('DIO',modules,3))];
- DIOmodule = DIOmodule{1};
- lastS = S;
- S = InfoParameterGUI('sync', S); % Sync parameters with BpodParameterGUI plugin
- if S.GUI.TrialTypes ~= lastS.GUI.TrialTypes
- S = SetTrialTypes(S,nextTrial);
- end
- if (S.GUI.InfoRewardProb ~= lastS.GUI.InfoRewardProb || S.GUI.RandRewardProb ~= lastS.GUI.RandRewardProb)
- S = SetRewardTypes(S,nextTrial);
- end
- if (S.GUI.InfoSide ~= lastS.GUI.InfoSide)
- SetLatchValves(S);
- end
- % DETERMINE TRIAL TYPE
- if nextTrial>1
- previousStates = currentTrialEvents.StatesVisited;
- if sum(contains(previousStates,'NoChoice') | contains(previousStates,'Incorrect'))>0
- S = UpdateTrialTypes(nextTrial,S);
- end
- end
- nextTrialType = S.TrialTypes(nextTrial);
- infoSide = S.GUI.InfoSide;
- TrialCounts = BpodSystem.Data.TrialCounts;
- bigSide = S.GUI.BigSide;
- % Determine trial-specific state matrix fields
- % Set trialParams (reward and odor)
- switch nextTrialType
- case 1 % SMALL
- ThisCenterOdor = S.GUI.SmallOdor;
- LeftSideOdor = 0;
- RightSideOdor = 0;
- if bigSide == 0 % BIG LEFT
- ChooseLeft = 'Incorrect'; ChooseRight = 'WaitForOdorRight';
- RewardLeft = 0; RewardRight = 1;
- OutcomeStateLeft = 'TimeoutOutcome';
- LeftRewardDrops = 0;
- SideOdorStateLeft = 'TimeoutOdor';
- SideOdorStateRight = 'OdorWaterRight';
- SideOdorOffActionRight = [];
- SideOdorOffActionLeft = [];
- ToneCmd =[];
- OutcomeStateRight = 'RightSmallReward';
- RightRewardDrops = S.GUI.SmallDrops;
- else
- ChooseLeft = 'WaitForOdorLeft'; ChooseRight = 'Incorrect';
- RewardLeft = 1; RewardRight = 0;
- OutcomeStateRight = 'TimeoutOutcome';
- RightRewardDrops = 0;
- SideOdorStateRight = 'TimeoutOdor';
- SideOdorStateLeft = 'OdorWaterLeft';
- SideOdorOffActionRight = [];
- SideOdorOffActionLeft = [];
- ToneCmd =[];
- OutcomeStateLeft = 'LeftSmallReward';
- LeftRewardDrops = S.GUI.SmallDrops;
- end
- case 2 % INFO FORCED
- ThisCenterOdor = S.GUI.InfoOdor;
- if infoSide == 0
- % info on left
- RewardLeft = S.RewardTypes(TrialCounts(2)+1,1); RewardRight = 0;
- ChooseLeft = 'WaitForOdorLeft'; ChooseRight = 'Incorrect';
- RightSideOdor = 0;
- if RewardLeft == 1
- OutcomeStateLeft = 'LeftBigReward';
- LeftRewardDrops = S.GUI.InfoBigDrops;
- LeftSideOdor = S.GUI.OdorA;
- SideOdorStateLeft = 'OdorALeft';
- ToneCmd = {'HiFi1', ['P' 0]};
- else
- OutcomeStateLeft = 'LeftSmallReward';
- LeftRewardDrops = S.GUI.InfoSmallDrops;
- LeftSideOdor = S.GUI.OdorB;
- SideOdorStateLeft = 'OdorBLeft';
- ToneCmd = {'HiFi1', ['P' 1]};
- end
- SideOdorOffActionLeft = RunOdor(LeftSideOdor,1);
- SideOdorOffActionRight =[];
- OutcomeStateRight = 'TimeoutOutcome';
- RightRewardDrops = 0;
- SideOdorStateRight = 'TimeoutOdor';
- else
- RewardLeft = 0; RewardRight = S.RewardTypes(TrialCounts(2)+1,1);
- ChooseLeft = 'Incorrect'; ChooseRight = 'WaitForOdorRight';
- LeftSideOdor = 0;
- if RewardRight == 1
- OutcomeStateRight = 'RightBigReward';
- RightRewardDrops = S.GUI.InfoBigDrops;
- RightSideOdor = S.GUI.OdorA;
- SideOdorStateRight = 'OdorARight';
- ToneCmd = {'HiFi1', ['P' 0]};
- else
- OutcomeStateRight = 'RightSmallReward';
- RightRewardDrops = S.GUI.InfoSmallDrops;
- RightSideOdor = S.GUI.OdorB;
- SideOdorStateRight = 'OdorBRight';
- ToneCmd = {'HiFi1', ['P' 1]};
- end
- SideOdorOffActionRight = RunOdor(RightSideOdor,2);
- SideOdorOffActionLeft =[];
- OutcomeStateLeft = 'TimeoutOutcome';
- LeftRewardDrops = 0;
- SideOdorStateLeft = 'TimeoutOdor';
- end
- case 3 % RAND FORCED
- ThisCenterOdor = S.GUI.RandOdor;
- if infoSide == 0 % INFO ON LEFT
- RewardLeft = 0; RewardRight = S.RewardTypes(TrialCounts(3)+1,2);
- ChooseLeft = 'Incorrect'; ChooseRight = 'WaitForOdorRight';
- RightSideOdorFlag = S.RandOdorTypes(TrialCounts(3)+1,1);
- if RightSideOdorFlag == 0
- RightSideOdor = S.GUI.OdorC;
- SideOdorStateRight = 'OdorCRight';
- else
- RightSideOdor = S.GUI.OdorD;
- SideOdorStateRight = 'OdorDRight';
- end
- LeftSideOdor = 0;
- SideOdorOffActionRight = RunOdor(RightSideOdor,2);
- SideOdorOffActionLeft =[];
- if RewardRight == 1
- OutcomeStateRight = 'RightBigReward';
- RightRewardDrops = S.GUI.RandBigDrops;
- ToneCmd = {'HiFi1', ['P' 0]};
- else
- OutcomeStateRight = 'RightSmallReward';
- RightRewardDrops = S.GUI.RandSmallDrops;
- ToneCmd = {'HiFi1', ['P' 1]};
- end
- OutcomeStateLeft = 'TimeoutOutcome';
- LeftRewardDrops = 0;
- SideOdorStateLeft = 'TimeoutOdor';
- else
- RewardLeft = S.RewardTypes(TrialCounts(3)+1,2); RewardRight = 0;
- ChooseLeft = 'WaitForOdorLeft'; ChooseRight = 'Incorrect';
- LeftSideOdorFlag = S.RandOdorTypes(TrialCounts(3)+1,1);
- if LeftSideOdorFlag == 0
- LeftSideOdor = S.GUI.OdorC;
- SideOdorStateLeft = 'OdorCLeft';
- else
- LeftSideOdor = S.GUI.OdorD;
- SideOdorStateLeft = 'OdorDLeft';
- end
- RightSideOdor = 0;
- SideOdorOffActionLeft = RunOdor(LeftSideOdor,1);
- SideOdorOffActionRight =[];
- if RewardLeft == 1
- OutcomeStateLeft = 'LeftBigReward';
- LeftRewardDrops = S.GUI.RandBigDrops;
- ToneCmd = {'HiFi1', ['P' 0]};
- else
- OutcomeStateLeft = 'LeftSmallReward';
- LeftRewardDrops = S.GUI.RandSmallDrops;
- ToneCmd = {'HiFi1', ['P' 1]};
- end
- OutcomeStateRight = 'TimeoutOutcome';
- RightRewardDrops = 0;
- SideOdorStateRight = 'TimeoutOdor';
- end
- case 4 % BIG
- ThisCenterOdor = S.GUI.BigOdor;
- LeftSideOdor = 0;
- RightSideOdor = 0;
- if bigSide == 0 % BIG LEFT
- ChooseLeft = 'WaitForOdorLeft'; ChooseRight = 'Incorrect';
- RewardLeft = 1; RewardRight = 0;
- OutcomeStateRight = 'TimeoutOutcome';
- RightRewardDrops = 0;
- SideOdorStateRight = 'TimeoutOdor';
- SideOdorStateLeft = 'OdorWaterLeft';
- SideOdorOffActionLeft = [];
- SideOdorOffActionRight =[];
- ToneCmd =[];
- OutcomeStateLeft = 'LeftBigReward';
- LeftRewardDrops = S.GUI.BigDrops;
- else
- ChooseLeft = 'Incorrect'; ChooseRight = 'WaitForOdorRight';
- RewardLeft = 0; RewardRight = 1;
- OutcomeStateLeft = 'TimeoutOutcome';
- LeftRewardDrops = 0;
- SideOdorStateLeft = 'TimeoutOdor';
- SideOdorStateRight = 'OdorWaterRight';
- SideOdorOffActionRight = [];
- SideOdorOffActionLeft =[];
- ToneCmd =[];
- OutcomeStateRight = 'RightBigReward';
- RightRewardDrops = S.GUI.BigDrops;
- end
- end
- % Water parameters
- R = GetValveTimes(4, [1 3]);
- % R = [0.100 0.100];
- LeftValveTime = R(1); RightValveTime = R(2); % Update reward amounts
- MaxValveTime = max(R);
- maxDrops = max([S.GUI.InfoBigDrops,S.GUI.InfoSmallDrops,S.GUI.RandBigDrops,S.GUI.RandSmallDrops,S.GUI.SmallDrops,S.GUI.BigDrops]);
- RewardPauseTime = 0.05;
- % Time for reward lights
- WarningTime = ceil(S.GUI.Signal*S.GUI.RewardDelay);
- DelayTime = S.GUI.RewardDelay - WarningTime;
- sma = NewStateMatrix(); % Assemble state matrix
- sma = SetCondition(sma, 1, 'Port1', 1); % Condition 1: Port 1 high (is in) (left)
- sma = SetCondition(sma, 2, 'Port2', 1); % Condition 2: Port 2 high (is in) (center)
- sma = SetCondition(sma, 3, 'Port3', 1); % Condition 3: Port 3 high (is in) (right)
- sma = SetCondition(sma, 4, 'Port1', 0); % Condition 4: Port 1 low (is out) (left)
- sma = SetCondition(sma, 5, 'Port2', 0); % Condition 5: Port 2 low (is out) (center)
- sma = SetCondition(sma, 6, 'Port3', 0); % Condition 6: Port 3 low (is out) (right)
- % TIMERS
- sma = SetCondition(sma, 7, 'GlobalTimer1', 0);
- % sma = SetGlobalTimer(sma, 'TimerID', 1, 'Duration', S.GUI.OdorDelay+0.05); % ODOR DELAY + GO CUE
- sma = SetGlobalTimer(sma, 'TimerID', 1, 'Duration', S.GUI.OdorDelay+0.05,...
- 'OnsetDelay', 0, 'Channel', 'SoftCode', 'OnMessage', 0, 'OffMessage', 0,...
- 'Loop', 0, 'SendEvents', 1, 'LoopInterval', 0,'OnsetTrigger','010000'); %also turn on timer 5
- % TIMER 2 FOR MAX REWARD
- if maxDrops > 1
- sma = SetGlobalTimer(sma, 'TimerID', 2, 'Duration', MaxValveTime,...
- 'OnsetDelay', 0, 'Channel', 'SoftCode', 'OnMessage',0, 'OffMessage', 0,...
- 'Loop', maxDrops, 'SendEvents', 1, 'LoopInterval', RewardPauseTime); % timer to stay in reward state
- else
- sma = SetGlobalTimer(sma, 'TimerID', 2, 'Duration', MaxValveTime,...
- 'OnsetDelay', 0, 'Channel', 'SoftCode', 'OnMessage', 0, 'OffMessage', 0,...
- 'Loop', 0, 'SendEvents', 1, 'LoopInterval', 0); % timer to stay in reward state
- end
- sma = SetGlobalCounter(sma, 2, 'GlobalTimer2_End', maxDrops);
- % reward states all wait for timers to end
- % set multiple timers for each outcome--one for drops, one for blanks
- % get rid of reward states
- % Timers for delivering reward drops
- if LeftRewardDrops > 1
- sma = SetGlobalTimer(sma,'TimerID',3,'Duration',LeftValveTime,'OnsetDelay',0,...
- 'Channel', 'Valve1', 'OnMessage', 1, 'OffMessage', 0, 'Loop',...
- LeftRewardDrops, 'SendEvents', 1, 'LoopInterval', RewardPauseTime,'OnsetTrigger', '10');
- sma = SetGlobalCounter(sma, 3, 'GlobalTimer3_End', LeftRewardDrops);
- elseif LeftRewardDrops == 1
- sma = SetGlobalTimer(sma,'TimerID',3,'Duration',LeftValveTime,'OnsetDelay',0,...
- 'Channel','Valve1','OnMessage', 1, 'OffMessage', 0, 'Loop', 0, 'SendEvents', 1,'LoopInterval',0,'OnsetTrigger', '10');
- sma = SetGlobalCounter(sma, 3, 'GlobalTimer3_End', 1);
- else
- sma = SetGlobalTimer(sma,'TimerID',3,'Duration',0,'OnsetDelay',0,...
- 'Channel','Valve1','OnMessage', 0, 'OffMessage', 0, 'Loop', 0, 'SendEvents', 1,'LoopInterval',0,'OnsetTrigger', '10');
- sma = SetGlobalCounter(sma, 3, 'GlobalTimer3_End', 1);
- end
- if RightRewardDrops > 1
- sma = SetGlobalTimer(sma,'TimerID',4,'Duration', RightValveTime,'OnsetDelay',0,...
- 'Channel', 'Valve3', 'OnMessage', 1, 'OffMessage', 0, 'Loop',...
- RightRewardDrops, 'SendEvents', 1, 'LoopInterval', RewardPauseTime,'OnsetTrigger', '10');
- sma = SetGlobalCounter(sma, 4, 'GlobalTimer4_End', RightRewardDrops);
- elseif RightRewardDrops == 1
- sma = SetGlobalTimer(sma,'TimerID',4,'Duration',RightValveTime,'OnsetDelay',0,...
- 'Channel', 'Valve3', 'OnMessage', 1, 'OffMessage', 0, 'Loop', 0, 'SendEvents', 1,'LoopInterval',0,'OnsetTrigger', '10');
- sma = SetGlobalCounter(sma, 4, 'GlobalTimer4_End', 1);
- else
- sma = SetGlobalTimer(sma,'TimerID',4,'Duration',0,'OnsetDelay',0,...
- 'Channel', 'Valve3', 'OnMessage', 0, 'OffMessage', 0, 'Loop', 0, 'SendEvents', 1,'LoopInterval',0,'OnsetTrigger', '10');
- sma = SetGlobalCounter(sma, 4, 'GlobalTimer4_End', 1);
- end
- sma = SetGlobalTimer(sma, 'TimerID', 7,...
- 'Duration',0.01, 'OnsetDelay', 0,...
- 'Channel', 'BNC1', 'OnMessage', 1,...
- 'OffMessage', 0, 'Loop', 1,...
- 'SendEvents', 1, 'LoopInterval', 0.1);
- % sma = SetGlobalTimer(sma, 'TimerID', 8,...
- % 'Duration',0.1, 'OnsetDelay', 0,...
- % 'Channel', 'BNC2', 'OnMessage', 1,...
- % 'OffMessage', 0, 'Loop', 0,...
- % 'SendEvents', 1);
- sma = SetGlobalTimer(sma, 'TimerID', 8, 'Duration', 0.01, 'OnsetDelay', 0,...
- 'Channel', 'BNC2', 'OnLevel', 1, 'OffLevel', 0,...
- 'Loop', 1, 'SendGlobalTimerEvents', 1, 'LoopInterval', 0.04);
- % STATES
- sma = AddState(sma, 'Name', 'TimerStart', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup', 'InterTrialInterval'},...
- 'OutputActions', {'GlobalTimerTrig',7,'HiFi1','*'});
- sma = AddState(sma, 'Name', 'InterTrialInterval', ...
- 'Timer', S.GUI.Interval,...
- 'StateChangeConditions', {'Tup', 'StartTrial'},...
- 'OutputActions', {'GlobalTimerTrig',8});
- sma = AddState(sma, 'Name', 'StartTrial', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup', 'WaitForCenter'},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'WaitForCenter', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Port2In', 'CenterDelay','Condition2','CenterDelay'},... % test how these are different!
- 'OutputActions', {'PWM2',50}); % port light on
- sma = AddState(sma, 'Name', 'CenterDelay', ...
- 'Timer', S.GUI.CenterDelay,...
- 'StateChangeConditions', {'Tup', 'CenterOdor','Port2Out','WaitForCenter'},...
- 'OutputActions', {'PWM2',50});
- sma = AddState(sma, 'Name', 'CenterOdor', ...
- 'Timer', S.GUI.CenterOdorTime,...
- 'StateChangeConditions', {'Port2Out', 'CenterOdorOff', 'Tup', 'CenterPostOdorDelay'},...
- 'OutputActions',[{DIOmodule,3,'PWM2',50},RunOdor(ThisCenterOdor,0)]);
- sma = AddState(sma, 'Name', 'CenterOdorOff',...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','WaitForCenter'},...
- 'OutputActions', [{DIOmodule,4,'PWM2',50},RunOdor(ThisCenterOdor,0)]);
- sma = AddState(sma, 'Name', 'CenterPostOdorDelay', ...
- 'Timer', S.GUI.StartDelay,...
- 'StateChangeConditions', {'Port2Out','WaitForCenter','Tup','GoCue'},... % is that right?
- 'OutputActions', [{DIOmodule,4,'PWM2',50},RunOdor(ThisCenterOdor,0)]);
- sma = AddState(sma, 'Name', 'GoCue', ...
- 'Timer', 0.05,...
- 'StateChangeConditions', {'Tup','Response'},...
- 'OutputActions', {'GlobalTimerTrig',1,'HiFi1', ['P' 2]});
- % RESPONSE (CHOICE) --> MAKE SURE STAY IN SIDE FOR AT LEAST A SMALL TIME TO INDICATE CHOICE?
- sma = AddState(sma, 'Name', 'Response', ...
- 'Timer', S.GUI.OdorDelay,...
- 'StateChangeConditions', {'Tup','GracePeriod','Port1In',ChooseLeft,'Port3In',ChooseRight},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'GracePeriod',...
- 'Timer', S.GUI.GracePeriod,...
- 'StateChangeConditions', {'Tup','NoChoice','Port1In',ChooseLeft,'Port3In',ChooseRight},...
- 'OutputActions', {});
- % AFTER CHOICE
- % LEFT
- sma = AddState(sma, 'Name', 'WaitForOdorLeft', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'GlobalTimer1_End',SideOdorStateLeft,'Condition7',SideOdorStateLeft},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'OdorALeft', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayLeft'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(LeftSideOdor,1)]);
- sma = AddState(sma, 'Name', 'OdorBLeft', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayLeft'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(LeftSideOdor,1)]);
- sma = AddState(sma, 'Name', 'OdorCLeft', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayLeft'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(LeftSideOdor,1)]);
- sma = AddState(sma, 'Name', 'OdorDLeft', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayLeft'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(LeftSideOdor,1)]);
- sma = AddState(sma, 'Name', 'OdorWaterLeft', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayWaterLeft'},...
- 'OutputActions', {DIOmodule,5});
- sma = AddState(sma, 'Name', 'RewardDelayWaterLeft', ...
- 'Timer', DelayTime,...
- 'StateChangeConditions', {'Tup','LeftWarning'},...
- 'OutputActions', {DIOmodule,6});
- sma = AddState(sma, 'Name', 'RewardDelayLeft', ...
- 'Timer', DelayTime,...
- 'StateChangeConditions', {'Tup','LeftWarning'},...
- 'OutputActions', [{DIOmodule,6}, RunOdor(LeftSideOdor,1)]);
- % LEFT REWARD
- sma = AddState(sma, 'Name', 'LeftWarning', ...
- 'Timer', WarningTime,...
- 'StateChangeConditions', {'Tup','LeftPortCheck'},...
- 'OutputActions', [{'PWM1',50},ToneCmd]);
- sma = AddState(sma, 'Name', 'LeftPortCheck',...
- 'Timer',0,...
- 'StateChangeConditions',{'Condition4','LeftNotPresent','Condition1',OutcomeStateLeft},...
- 'OutputActions',{});
- sma = AddState(sma, 'Name', 'LeftBigReward', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','OutcomeDelivery','Condition4','LeftNotPresent'},...
- 'OutputActions', {'GlobalTimerTrig', 3}); %, 'GlobalTimerTrig', 3
- sma = AddState(sma, 'Name', 'LeftSmallReward', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','OutcomeDelivery','Condition4','LeftNotPresent'},...
- 'OutputActions', {'GlobalTimerTrig', 3}); %, 'GlobalTimerTrig', 3
- sma = AddState(sma, 'Name', 'LeftNotPresent', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','OutcomeDelivery'},...
- 'OutputActions', {'GlobalTimerTrig', 2});
- % CHOOSE RIGHT
- sma = AddState(sma, 'Name', 'WaitForOdorRight', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'GlobalTimer1_End',SideOdorStateRight,'Condition7',SideOdorStateRight},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'OdorARight', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayRight'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(RightSideOdor,2)]);
- sma = AddState(sma, 'Name', 'OdorBRight', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayRight'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(RightSideOdor,2)]);
- sma = AddState(sma, 'Name', 'OdorCRight', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayRight'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(RightSideOdor,2)]);
- sma = AddState(sma, 'Name', 'OdorDRight', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayRight'},...
- 'OutputActions', [{DIOmodule,5}, RunOdor(RightSideOdor,2)]);
- sma = AddState(sma, 'Name', 'OdorWaterRight', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','RewardDelayWaterRight'},...
- 'OutputActions', {DIOmodule,5});
- sma = AddState(sma, 'Name', 'RewardDelayWaterRight', ...
- 'Timer', DelayTime,...
- 'StateChangeConditions', {'Tup','RightWarning'},...
- 'OutputActions', {DIOmodule,6});
- sma = AddState(sma, 'Name', 'RewardDelayRight', ...
- 'Timer', DelayTime,...
- 'StateChangeConditions', {'Tup','RightWarning'},...
- 'OutputActions', [{DIOmodule,6}, RunOdor(RightSideOdor,2)]);
- % RIGHT REWARD
- sma = AddState(sma, 'Name', 'RightWarning', ...
- 'Timer', WarningTime,...
- 'StateChangeConditions', {'Tup','RightPortCheck'},...
- 'OutputActions', [{'PWM3',50},ToneCmd]);
- sma = AddState(sma, 'Name', 'RightPortCheck',...
- 'Timer',0,...
- 'StateChangeConditions',{'Condition6','RightNotPresent','Condition3',OutcomeStateRight},...
- 'OutputActions',{});
- sma = AddState(sma, 'Name', 'RightBigReward', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','OutcomeDelivery','Condition6','RightNotPresent'},...
- 'OutputActions', {'GlobalTimerTrig', 4}); %, 'GlobalTimerTrig', 4
- sma = AddState(sma, 'Name', 'RightSmallReward', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','OutcomeDelivery','Condition6','RightNotPresent'},...
- 'OutputActions', {'GlobalTimerTrig', 4}); %, 'GlobalTimerTrig', 4
- sma = AddState(sma, 'Name', 'RightNotPresent', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','OutcomeDelivery'},...
- 'OutputActions', {'GlobalTimerTrig', 2});
- % Waits for max drops time
- sma = AddState(sma, 'Name','OutcomeDelivery','Timer',0,...
- 'StateChangeConditions',{'GlobalCounter2_End','EndTrial'},...
- 'OutputActions',{});
- % if no choice during response
- sma = AddState(sma, 'Name', 'NoChoice', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'GlobalTimer1_End', 'TimeoutOdor', 'Condition7', 'TimeoutOdor'},...
- 'OutputActions', {});
- % For incorrect choices (left/right on forced trials)
- sma = AddState(sma, 'Name', 'Incorrect', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'GlobalTimer1_End','TimeoutOdor','Condition7', 'TimeoutOdor'},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'TimeoutOdor', ...
- 'Timer', S.GUI.OdorTime,...
- 'StateChangeConditions', {'Tup','TimeoutRewardDelay'},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'TimeoutRewardDelay', ...
- 'Timer', S.GUI.RewardDelay,...
- 'StateChangeConditions', {'Tup','TimeoutPortCheck'},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'TimeoutPortCheck', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'Tup','TimeoutOutcome'},...
- 'OutputActions', {});
- sma = AddState(sma, 'Name', 'TimeoutOutcome', ...
- 'Timer', 0,...
- 'StateChangeConditions', {'GlobalCounter2_End','EndTrial'},...
- 'OutputActions', {'GlobalTimerTrig', 2});
- sma = AddState(sma, 'Name', 'EndTrial', ...
- 'Timer', 1,...
- 'StateChangeConditions', {'Tup', '>exit'},...
- 'OutputActions', {'GlobalTimerCancel',2});
- end
- %% TRIAL TYPES
- function S = UpdateTrialTypes(i,S)
- % Insert a repeat of trial i-1 at position i, shifting everything else forward.
- % Called when a mouse enters a side port before odor delivery, to re-present
- % the current trial type before advancing.
- TrialTypes = S.TrialTypes;
- S.TrialTypes = [TrialTypes(1:i-1); TrialTypes(i-1); TrialTypes(i:end-1)];
- S.RewardTypes = [S.RewardTypes(1:i-1,:); S.RewardTypes(i-1,:); S.RewardTypes(i:end-1,:)];
- S.RandOdorTypes = [S.RandOdorTypes(1:i-1); S.RandOdorTypes(i-1); S.RandOdorTypes(i:end-1)];
- end
- function S = SetTrialTypes(S,currentTrial)
- % Build S.TrialTypes array from currentTrial to SessionTrials.
- % Trial types (1=Small, 2=Info, 3=Rand, 4=Big) are shuffled in blocks of blockSize
- % according to the percentages set by S.GUI.TrialTypes.
- global BpodSystem;
- %% Define trial choice types
- maxTrials = S.GUI.SessionTrials;
- typesAvailable = S.GUI.TrialTypes;
- blockSize = 12;
- blockToShuffle = zeros(blockSize,1);
- typeBlockSize = 8;
- bigPercent = 0; smallPercent = 0; infoPercent = 0; randPercent = 0;
- switch typesAvailable
- case 1
- smallPercent = 1; bigPercent = 0; infoPercent = 0; randPercent = 0;
- blockToShuffle = [1 1 1 1 1 1 1 1 1 1 1 1];
- case 2
- smallPercent = 0; bigPercent = 0; infoPercent = 1; randPercent = 0;
- blockToShuffle = [2 2 2 2 2 2 2 2 2 2 2 2];
- case 3
- smallPercent = 0; bigPercent = 0; infoPercent = 0; randPercent = 1;
- blockToShuffle = [3 3 3 3 3 3 3 3 3 3 3 3];
- case 4
- smallPercent = 0; bigPercent = 1; infoPercent = 0; randPercent = 0;
- blockToShuffle = [4 4 4 4 4 4 4 4 4 4 4 4];
- case 5
- smallPercent = 0.25; bigPercent = 0.25; infoPercent = 0.25; randPercent = 0.25;
- blockToShuffle = [1 1 1 2 2 2 3 3 3 4 4 4];
- case 6
- smallPercent = 0.5; bigPercent = 0.5; infoPercent = 0; randPercent = 0;
- blockToShuffle = [1 1 1 1 1 1 4 4 4 4 4 4];
- case 7
- smallPercent = 0.5; bigPercent = 0; infoPercent = 0.5; randPercent = 0;
- blockToShuffle = [1 1 1 1 1 1 2 2 2 2 2 2];
- case 8
- smallPercent = 0; bigPercent = 0.5; infoPercent = 0; randPercent = 0.5;
- blockToShuffle = [4 4 4 4 4 4 3 3 3 3 3 3];
- end
- blocks = ceil(maxTrials/blockSize);
- TrialTypes = zeros(blocks*blockSize,1);
- block=blockToShuffle;
- for n = 1:blocks
- for m = 1:blockSize
- i = randi(blockSize);
- temp = block(m);
- block(m) = block(i);
- block(i) = temp;
- end
- if n == 1
- TrialTypes(1:blockSize) = block;
- else
- TrialTypes((n-1)*blockSize+1:n*blockSize) = block;
- end
- end
- % TrialTypes = [2; 2; 3; 3; 2; 2; 3; 3; TrialTypes];
- TrialTypes=TrialTypes(1:maxTrials);
- if currentTrial==1
- S.TrialTypes = TrialTypes;
- else
- S.TrialTypes = [S.TrialTypes(1:currentTrial-1); TrialTypes(1:end-currentTrial+1)];
- TrialTypePlotInfoWater(BpodSystem.GUIHandles.TrialTypePlot,'update',currentTrial,S.TrialTypes);
- end
- end
- function S = SetRewardTypes(S,currentTrial)
- % Build S.RewardTypes (Nx2 matrix) and S.RandOdorTypes (Nx1) from currentTrial to SessionTrials.
- % Columns of RewardTypes: [InfoForced, RandForced] — each column holds a shuffled
- % list of 1s (big) and 0s (small) per block, giving the reward size for each
- % successive Info or Rand forced trial.
- maxTrials = S.GUI.SessionTrials;
- typeBlockSize = 8;
- %% SET REWARD BLOCKS
- infoBigCount = round(S.GUI.InfoRewardProb*typeBlockSize);
- randBigCount = round(S.GUI.RandRewardProb*typeBlockSize);
- infoBlockShuffle = zeros(typeBlockSize,1);
- randBlockShuffle = zeros(typeBlockSize,1);
- randOdorBlockShuffle = zeros(typeBlockSize,1);
- infoBlockShuffle(1:infoBigCount) = 1;
- randBlockShuffle(1:randBigCount) = 1;
- if S.GUI.RandRewardProb == 0 | S.GUI.RandRewardProb == 1
- randOdorBigCount = ceil(typeBlockSize/2);
- else
- randOdorBigCount = randBigCount;
- end
- randOdorBlockShuffle(1:randOdorBigCount) = 1;
- typeBlockCount = ceil(maxTrials/typeBlockSize);
- RewardTypes = zeros(typeBlockCount*typeBlockSize,2);
- RandOdorTypes = zeros(typeBlockCount*typeBlockSize,1);
- infoBlock = infoBlockShuffle;
- randBlock = randBlockShuffle;
- randOdorBlock = randOdorBlockShuffle;
- % info forced
- for n = 1:typeBlockCount
- for m = 1:typeBlockSize
- i = randi(typeBlockSize);
- temp = infoBlock(m);
- infoBlock(m) = infoBlock(i);
- infoBlock(i) = temp;
- end
- if n == 1
- RewardTypes(1:typeBlockSize,1) = infoBlock';
- else
- RewardTypes((n-1)*typeBlockSize+1:n*typeBlockSize,1) = infoBlock';
- end
- end
- % rand forced
- for n = 1:typeBlockCount
- for m = 1:typeBlockSize
- i = randi(typeBlockSize);
- temp = randBlock(m);
- randBlock(m) = randBlock(i);
- randBlock(i) = temp;
- end
- if n == 1
- RewardTypes(1:typeBlockSize,2) = randBlock';
- else
- RewardTypes((n-1)*typeBlockSize+1:n*typeBlockSize,2) = randBlock';
- end
- end
- % rand odors
- for n = 1:typeBlockCount
- for m = 1:typeBlockSize
- i = randi(typeBlockSize);
- temp = randOdorBlock(m);
- randOdorBlock(m) = randOdorBlock(i);
- randOdorBlock(i) = temp;
- end
- if n == 1
- RandOdorTypes(1:typeBlockSize) = randOdorBlock';
- else
- RandOdorTypes((n-1)*typeBlockSize+1:n*typeBlockSize) = randOdorBlock';
- end
- end
- % Trial types (rewards) to pull from
- RewardTypes = RewardTypes(1:maxTrials,:);
- % Rand Odors to pull from
- % RandOdorTypes = repmat(RandOdorTypes,1,4);
- RandOdorTypes = RandOdorTypes(1:maxTrials);
- if currentTrial == 1
- S.RandOdorTypes = RandOdorTypes;
- S.RewardTypes = RewardTypes;
- else
- S.RandOdorTypes = [S.RandOdorTypes(1:currentTrial); RandOdorTypes(1:end-currentTrial)];
- S.RewardTypes = [S.RewardTypes(1:currentTrial,:); RewardTypes(1:end-currentTrial,:)];
- end
- end
- %% ODOR CONTROL
- function OdorOutputActions = RunOdor(odorID,port)
- % Return the {module, valve} output action pairs needed to route odorID through port.
- % port: 0=center, 1=left, 2=right
- % odorID: 0-3 maps to physical valve positions on ValveModule2/3
- switch port
- case 0
- cmd1 = {'ValveModule1',1}; % center control
- switch odorID
- case 0
- cmd2 = {'ValveModule2',1};
- cmd3 = {'ValveModule3',1};
- case 1
- cmd2 = {'ValveModule2',2};
- cmd3 = {'ValveModule3',2};
- case 2
- cmd2 = {'ValveModule2',3};
- cmd3 = {'ValveModule3',3};
- case 3
- cmd2 = {'ValveModule2',4};
- cmd3 = {'ValveModule3',4};
- end
- case 1 % LEFT
- cmd1 = {'ValveModule1',2}; % left control
- switch odorID
- case 0
- cmd2 = {'ValveModule2',5};
- cmd3 = {'ValveModule3',5};
- case 1
- cmd2 = {'ValveModule2',6};
- cmd3 = {'ValveModule3',6};
- case 2
- cmd2 = {'ValveModule2',7};
- cmd3 = {'ValveModule3',7};
- case 3
- cmd2 = {'ValveModule2',8};
- cmd3 = {'ValveModule3',8};
- end
- case 2 % RIGHT
- cmd1 = {'ValveModule1',3}; % right control
- switch odorID
- case 0
- cmd2 = {'ValveModule2',5};
- cmd3 = {'ValveModule3',5};
- case 1
- cmd2 = {'ValveModule2',6};
- cmd3 = {'ValveModule3',6};
- case 2
- cmd2 = {'ValveModule2',7};
- cmd3 = {'ValveModule3',7};
- case 3
- cmd2 = {'ValveModule2',8};
- cmd3 = {'ValveModule3',8};
- end
- end
- OdorOutputActions = [cmd1,cmd2,cmd3];
- end
- function TurnOffAllOdors()
- % Close all 8 positions on all three valve modules. Called on session end or abort.
- for v = 1:8
- ModuleWrite('ValveModule1',['C' v]);
- ModuleWrite('ValveModule2',['C' v]);
- ModuleWrite('ValveModule3',['C' v]);
- end
- end
- %% SET ODOR SIDES (LATCH VALVES)
- function SetLatchValves(S)
- % Configure DIOmodule connections to H-bridge powering of Lee Company latch valves to route odors to the correct ports
- % based on S.GUI.InfoSide (0=info→left, 1=info→right).
- global BpodSystem
- infoSide = S.GUI.InfoSide;
- modules = BpodSystem.Modules.Name;
- % latchValves = [16 15 14 11 10 9 8 7]; % evens to left!
- latchModule = [modules(strncmp('DIO',modules,3))];
- latchModule = latchModule{1};
- % now, latch odds to the left. for 0, 1, 2, 3
- latchValves = [7 8 9 10 11 14 15 16]; % evens to left! odor 0 left, odor 0 right, odor 1 left,
- if infoSide == 0 % SEND INFO ODORS TO LEFT (A,B)
- odorApin = latchValves((S.GUI.OdorA+1)*2-1);
- odorBpin = latchValves((S.GUI.OdorB+1)*2-1);
- odorCpin = latchValves((S.GUI.OdorC+1)*2);
- odorDpin = latchValves((S.GUI.OdorD+1)*2);
- else
- odorApin = latchValves((S.GUI.OdorA+1)*2);
- odorBpin = latchValves((S.GUI.OdorB+1)*2);
- odorCpin = latchValves((S.GUI.OdorC+1)*2-1);
- odorDpin = latchValves((S.GUI.OdorD+1)*2-1);
- end
- pins = [odorApin odorBpin odorCpin odorDpin];
- for i = 1:4
- ModuleWrite(latchModule,[pins(i) 1]);
- pause(100/1000);
- ModuleWrite(latchModule,[pins(i) 0]);
- pause(100/1000);
- end
- % BpodSystem.GUIHandles.EventsPlot.StateColors = getStateColors(infoSide);
- % EventsPlot('init', getStateColors(infoSide));
- end
- %% OUTCOME
- function [rewardAmount, Outcome] = UpdateOutcome(currentTrial,S,RewardLeft,RewardRight)
- % Determine outcome code and reward amount from the completed trial's raw events.
- % RewardLeft/RewardRight: reward size (big=1, small=0) pre-computed for this trial
- % (only meaningful for Info/Rand forced trials; Small/Big trials have a fixed size).
- % Outcome codes are defined in the file header.
- % Updates BpodSystem.Data.TrialCounts and .PlotOutcomes in place.
- global BpodSystem
- % BpodSystem.Data.RawEvents(currentTrial)
- TrialData = BpodSystem.Data.RawEvents.Trial{currentTrial};
- TrialCounts = BpodSystem.Data.TrialCounts;
- PlotOutcomes = BpodSystem.Data.PlotOutcomes;
- trialType = S.TrialTypes(currentTrial);
- infoSide = S.GUI.InfoSide;
- bigSide = S.GUI.BigSide;
- infoBigReward = S.GUI.InfoBigDrops*4;
- infoSmallReward = S.GUI.InfoSmallDrops*4;
- randBigReward = S.GUI.RandBigDrops*4;
- randSmallReward = S.GUI.RandSmallDrops*4;
- bigReward = S.GUI.BigDrops*4;
- smallReward = S.GUI.SmallDrops*4;
- rewardAmount = 0;
- x = currentTrial;
- newTrialCounts = TrialCounts;
- newPlotOutcomes = PlotOutcomes;
- % Plot outcomes: 2 = no choice, incorrect, info correct, rand correct,
- % not present
- % change to no choice, incorrect, info correct big info correct small
- % rand correct big/ not present info big not present info small
- switch trialType
- case 1
- if bigSide == 0
- if ~isnan(TrialData.States.NoChoice(1))
- newPlotOutcomes(x) = 14;
- Outcome = 1; % small no choice
- elseif ~isnan(TrialData.States.WaitForOdorRight(1))
- newTrialCounts(1) = TrialCounts(1) + 1; % small
- if ~isnan(TrialData.States.RightSmallReward(1))
- Outcome = 2; % small correct
- rewardAmount = smallReward;
- newPlotOutcomes(x) = 10;
- else
- newPlotOutcomes(x) = 12;
- Outcome = 3; % small NP
- end
- else
- Outcome = 4; % small incorrect
- newPlotOutcomes(x) = 13;
- end
- else
- if ~isnan(TrialData.States.NoChoice(1))
- newPlotOutcomes(x) = 14;
- Outcome = 1; % small no choice
- elseif ~isnan(TrialData.States.WaitForOdorLeft(1))
- newTrialCounts(1) = TrialCounts(1) + 1; % small
- if ~isnan(TrialData.States.LeftSmallReward(1))
- Outcome = 2; % small correct
- rewardAmount = smallReward;
- newPlotOutcomes(x) = 10;
- else
- newPlotOutcomes(x) = 12;
- Outcome = 3; % small NP
- end
- else
- Outcome = 4; % small incorrect
- newPlotOutcomes(x) = 13;
- end
- end
- case 2 % INFO
- if ~isnan(TrialData.States.NoChoice(1))
- newPlotOutcomes(x) = 14;
- Outcome = 5; % info no choice
- elseif infoSide==0 & ~isnan(TrialData.States.WaitForOdorLeft(1))
- newTrialCounts(2) = TrialCounts(2) + 1; % infoforced
- if RewardLeft == 1
- if ~isnan(TrialData.States.LeftBigReward(1))
- Outcome = 6; % info big
- rewardAmount = infoBigReward;
- newPlotOutcomes(x) = 1;
- else
- newPlotOutcomes(x) = 5;
- Outcome = 7; % info big NP
- end
- else
- if ~isnan(TrialData.States.LeftSmallReward(1))
- Outcome = 8; % info small
- rewardAmount = infoSmallReward;
- newPlotOutcomes(x) = 2;
- else
- newPlotOutcomes(x) = 6;
- Outcome = 9; % info small NP
- end
- end
- elseif infoSide==1 & ~isnan(TrialData.States.WaitForOdorRight(1))
- newTrialCounts(2) = TrialCounts(2) + 1; % infoforced
- if RewardRight == 1
- if ~isnan(TrialData.States.RightBigReward(1))
- Outcome = 6; % info big
- rewardAmount = infoBigReward;
- newPlotOutcomes(x) = 1;
- else
- newPlotOutcomes(x) = 5;
- Outcome = 7; % info big NP
- end
- else
- if ~isnan(TrialData.States.RightSmallReward(1))
- Outcome = 8; % info small
- rewardAmount = infoSmallReward;
- newPlotOutcomes(x) = 2;
- else
- newPlotOutcomes(x) = 6;
- Outcome = 9; % info small NP
- end
- end
- else
- newTrialCounts(2) = TrialCounts(2) + 1; % infoforced
- newPlotOutcomes(x) = 13;
- Outcome = 10; % info incorrect
- end
- case 3 %NO INFO
- if ~isnan(TrialData.States.NoChoice(1))
- newPlotOutcomes(x) = 14;
- Outcome = 11; % rand no choice
- elseif infoSide==0 & ~isnan(TrialData.States.WaitForOdorRight(1))
- newTrialCounts(3) = TrialCounts(3) + 1; % randforced
- if RewardRight == 1
- if ~isnan(TrialData.States.RightBigReward(1))
- Outcome = 12; % rand big
- rewardAmount = randBigReward;
- newPlotOutcomes(x) = 3;
- else
- newPlotOutcomes(x) = 7;
- Outcome = 13; % rand big NP
- end
- else
- if ~isnan(TrialData.States.RightSmallReward(1))
- Outcome = 14; % rand small
- rewardAmount = randSmallReward;
- newPlotOutcomes(x) = 4;
- else
- newPlotOutcomes(x) = 8;
- Outcome = 15; % rand small NP
- end
- end
- elseif infoSide==1 & ~isnan(TrialData.States.WaitForOdorLeft(1))
- newTrialCounts(3) = TrialCounts(3) + 1; % randforced
- if RewardLeft == 1
- if ~isnan(TrialData.States.LeftBigReward(1))
- Outcome = 12; % rand big
- rewardAmount = randBigReward;
- newPlotOutcomes(x) = 3;
- else
- newPlotOutcomes(x) = 7;
- Outcome = 13; % rand big NP
- end
- else
- if ~isnan(TrialData.States.LeftSmallReward(1))
- Outcome = 14; % rand small
- rewardAmount = randSmallReward;
- newPlotOutcomes(x) = 4;
- else
- newPlotOutcomes(x) = 8;
- Outcome = 15; % rand small NP
- end
- end
- else
- newTrialCounts(3) = TrialCounts(3) + 1; % rand forced
- newPlotOutcomes(x) = 13;
- Outcome = 16; % rand incorrect
- end
- case 4 % BIG WATER
- if bigSide == 0
- if ~isnan(TrialData.States.NoChoice(1))
- newPlotOutcomes(x) = 14;
- Outcome = 17; % big no choice
- elseif ~isnan(TrialData.States.WaitForOdorLeft(1))
- newTrialCounts(4) = TrialCounts(4) + 1; % big
- if ~isnan(TrialData.States.LeftBigReward(1))
- Outcome = 18; % big correct
- rewardAmount = bigReward;
- newPlotOutcomes(x) = 9;
- else
- newPlotOutcomes(x) = 11;
- Outcome = 19; % big NP
- end
- else
- Outcome = 20; % big incorrect
- newPlotOutcomes(x) = 13;
- end
- else
- if ~isnan(TrialData.States.NoChoice(1))
- newPlotOutcomes(x) = 14;
- Outcome = 17; % big no choice
- elseif ~isnan(TrialData.States.WaitForOdorRight(1))
- newTrialCounts(4) = TrialCounts(4) + 1; % big
- if ~isnan(TrialData.States.RightBigReward(1))
- Outcome = 18; % big correct
- rewardAmount = bigReward;
- newPlotOutcomes(x) = 9;
- else
- newPlotOutcomes(x) = 11;
- Outcome = 19; % big NP
- end
- else
- Outcome = 20; % big incorrect
- newPlotOutcomes(x) = 13;
- end
- end
- end
- BpodSystem.Data.TrialCounts = newTrialCounts;
- BpodSystem.Data.PlotOutcomes = newPlotOutcomes;
- end
InfoseekWaterVal.m at commit 1f3cffd, no license · at the source
Overview
- Department of Neuroscience, Columbia University, New York, NY USA
- Zuckerman Mind Brain and Behavior Institute, Columbia University, New York, NY USA
- Department of Neurobiology, Harvard Medical School, Boston, MA USA
- Kempner Institute, Harvard University, Cambridge, MA USA
- Solomon H. Snyder Department of Neuroscience, Johns Hopkins University, Baltimore, MD USA
- Kavli Institute for Brain Science, Columbia University, New York, NY USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repositories
Its files are read in the Code ↔ Paper reader above, with 21 matches between paragraphs and lines of code.
Zenodo 20477351
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
Zenodo 20479276
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
Zenodo 20480778
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
jjbussell/Bussell2026InfoValue
1f3cffda257c23ff315d6a410072af60994392bd, 19 August 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
75 files
- 01 Bpod/
DAQOff.m , MATLAB, 6 lines - 01 Bpod/
DAQOn.m , MATLAB, 49 lines - 01 Bpod/
DIO/ , C++, 205 linesArCOM.cpp - 01 Bpod/
DIO/ , C/C++, 85 linesArCOM.h - 01 Bpod/
InfoOutcomesPlot.m , MATLAB, 77 lines - 01 Bpod/
InfoParameterGUI.m , MATLAB, 198 lines - 01 Bpod/
InfoWaterOutcomesPlot.m , MATLAB, 76 lines - 01 Bpod/
InfoseekSyncSignal2/ , MATLAB, 1,262 lines, 3 matchesInfoseekSyncSignal2.m - 01 Bpod/
InfoseekSyncToneGo/ , MATLAB, 1,296 lines, 1 matchInfoseekSyncToneGo.m - 01 Bpod/
InfoseekWaterVal/ , MATLAB, 1,278 lines, 4 matchesInfoseekWaterVal.m - 01 Bpod/
TotalRewardDisplayInfo.m , MATLAB, 49 lines - 01 Bpod/
TrialTypePlotInfo.m , MATLAB, 185 lines - 01 Bpod/
TrialTypePlotInfoWater.m , MATLAB, 201 lines - 02 BehaviorAnalysis/
BehaviorAnalysisAll.m , MATLAB, 1,263 lines, 1 match - 02 BehaviorAnalysis/
BehaviorAnalysisWaterVal , MATLAB, 579 lines.m - 02 BehaviorAnalysis/
BehaviorModelPsychophysi , MATLAB, 383 linescs.m - 02 BehaviorAnalysis/
BehaviorPlotsAllbyGroup. , MATLAB, 2,105 linesm - 02 BehaviorAnalysis/
BehaviorPlotsWaterVal.m , MATLAB, 810 lines - 02 BehaviorAnalysis/
BehaviordataBpod.m , MATLAB, 97 lines - 02 BehaviorAnalysis/
BehaviordataBpodWaterVal , MATLAB, 89 lines.m - 02 BehaviorAnalysis/
BpodProcessSession.m , MATLAB, 713 lines - 02 BehaviorAnalysis/
BpodProcessSessionWaterV , MATLAB, 659 linesal.m - 02 BehaviorAnalysis/
InfoseekBehaviorModel_Fi , MATLAB, 1,323 lines, 4 matchesnalized_CV.m - 03 ImagingCellExtractionPip
eline/ , MATLAB, 322 lines, 2 matchesCNMFE_pipe.m - 03 ImagingCellExtractionPip
eline/ , Python, 67 linesisxpp.py - 03 ImagingCellExtractionPip
eline/ , MATLAB, 125 linesmotioncorrect.m - 03 ImagingCellExtractionPip
eline/ , MATLAB, 120 linesmotioncorrect_tobase.m - 03 ImagingCellExtractionPip
eline/ , Shell, 22 linespipeline.sh - 04 ImagingAnalysis/
BpodNeuralDataSync.m , MATLAB, 835 lines - 04 ImagingAnalysis/
BpodNeuralDataSyncWaterV , MATLAB, 917 linesal.m - 04 ImagingAnalysis/
CellRegistrationMulti.m , MATLAB, 141 lines, 2 matches - 04 ImagingAnalysis/
CellRegistrationSCOUT.m , MATLAB, 40 lines - 04 ImagingAnalysis/
CodingStability.m , MATLAB, 205 lines - 04 ImagingAnalysis/
CodingStabilityWaterVal. , MATLAB, 443 linesm - 04 ImagingAnalysis/
InfoseekNeuralAnalysis.m , MATLAB, 930 lines, 1 match - 04 ImagingAnalysis/
InfoseekNeuralAnalysisLe , MATLAB, 1,389 lines, 1 matcharning.m - 04 ImagingAnalysis/
InfoseekNeuralAnalysisWa , MATLAB, 2,129 linesterVal.m - 04 ImagingAnalysis/
InfoseekNeuralPlots.m , MATLAB, 2,144 lines - 04 ImagingAnalysis/
InfoseekNeuralWaterValPl , MATLAB, 5,072 linesots.m - Functions/
Colormaps/ , MATLAB, 112 linesdemo1.m - Functions/
Colormaps/ , MATLAB, 54 linesdemo2.m - Functions/
Colormaps/ , MATLAB, 76 linesfake_parula.m - Functions/
Colormaps/ , MATLAB, 269 linesinferno.m - Functions/
Colormaps/ , MATLAB, 271 linesmagma.m - Functions/
Colormaps/ , MATLAB, 270 linesplasma.m - Functions/
Colormaps/ , MATLAB, 267 linesviridis.m - Functions/
Violinplot-Matlab-master , MATLAB, 346 lines/ Violin.m - Functions/
Violinplot-Matlab-master , MATLAB, 21 lines/ test_cases/ testviolinplot.m - Functions/
Violinplot-Matlab-master , MATLAB, 127 lines/ violinplot.m - Functions/
absolute_rocarea.m , MATLAB, 83 lines, 1 match - Functions/
binopvalue.m , MATLAB, 47 lines - Functions/
cbrewer/ , MATLAB, not shown here._cbrewer.m - Functions/
cbrewer/ , MATLAB, not shown here._interpolate_cbrewer.m - Functions/
cbrewer/ , MATLAB, not shown here._plot_brewer_cmap.m - Functions/
cbrewer/ , MATLAB, 128 linescbrewer.m - Functions/
cbrewer/ , MATLAB, 64 lineschange_jet.m - Functions/
cbrewer/ , MATLAB, 36 linesinterpolate_cbrewer.m - Functions/
cbrewer/ , MATLAB, 50 linesplot_brewer_cmap.m - Functions/
colorcet.m , MATLAB, 5,878 lines - Functions/
colormapify.m , MATLAB, 59 lines - Functions/
findInfoseekAverse.m , MATLAB, 17 lines - Functions/
findInfoseekData.m , MATLAB, 20 lines - Functions/
fitPsyche.m , MATLAB, 89 lines, 1 match - Functions/
fitPsycheCurveLogit.m , MATLAB, 44 lines - Functions/
fitPsycheCurveWH.m , MATLAB, 44 lines - Functions/
linspecer.m , MATLAB, 261 lines - Functions/
make_colormap.m , MATLAB, 32 lines - Functions/
nsubplot.m , MATLAB, 50 lines - Functions/
rocarea3.m , MATLAB, 187 lines - Functions/
venn.m , MATLAB, 1,006 lines - Functions/
vennEulerDiagram/ , MATLAB, not shown hereExample.mlx - Functions/
vennEulerDiagram/ , MATLAB, 64 lineshTestVennEulerDiagram.m - Functions/
vennEulerDiagram/ , MATLAB, 569 linestVennEulerDiagram.m - Functions/
vennEulerDiagram/ , MATLAB, 1,029 linesvennEulerDiagram.m - README.md, Text, 5 lines
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: jjbussell/
Bussell2026InfoValue
Read it in the paper: doi.org/10.1038/s41593-026-02377-y.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 74 scripts, each with its path and the digest of its content;
- 21 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- zenodo:20450672, at Zenodo; found in DataCite
- zenodo:20450673, at Zenodo; found in “Data availability”
- zenodo:20452040, at Zenodo; found in DataCite
- zenodo:20452041, at Zenodo; found in the references
- zenodo:20466859, at Zenodo; found in DataCite
- zenodo:20466860, at Zenodo; found in the references
- zenodo:20470579, at Zenodo; found in DataCite
- zenodo:20470580, at Zenodo; found in the references
- zenodo:20470621, at Zenodo; found in DataCite
- zenodo:20470622, at Zenodo; found in the references
- zenodo:20477350, at Zenodo; found in DataCite
- zenodo:20479275, at Zenodo; found in DataCite
- zenodo:20480777, at Zenodo; found in DataCite
Data availability statement
The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to a dataset: Zenodo 20450673
Read it in the paper: doi.org/10.1038/s41593-026-02377-y.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 2, 28 September 2026
- Publisher: n/a → Nature Portfolio
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 3 keywords, 8 MeSH terms, 9 funders, 80 references.
Cite
This paper
Bussell, J. J., Badman, R. P., Márton, D., Bromberg-Martin, E. S., Abbott, L. F., Rajan, K., & Axel, R. (2026). Representations of the intrinsic value of information in mouse orbitofrontal cortex. Nature neuroscience, 29(9), 2261-2272. https://
BibTeX
@article{bussell2026repr
author = {Bussell, Jennifer J and Badman, Ryan P and Márton, David and Bromberg-Martin, Ethan S and Abbott, L F and Rajan, Kanaka and Axel, Richard},
title = {{Representations of the intrinsic value of information in mouse orbitofrontal cortex}},
journal = {Nature neuroscience},
year = {2026},
month = jul,
volume = {29},
number = {9},
pages = {2261--2272},
publisher = {Nature Portfolio},
issn = {1097-6256},
doi = {10.1038/
url = {https://
pmid = {42533133},
pmcid = {PMC13533842}
}
RIS
TY - JOUR
AU - Bussell, Jennifer J
AU - Badman, Ryan P
AU - Márton, David
AU - Bromberg-Martin, Ethan S
AU - Abbott, L F
AU - Rajan, Kanaka
AU - Axel, Richard
TI - Representations of the intrinsic value of information in mouse orbitofrontal cortex
T2 - Nature neuroscience
J2 - Nat Neurosci
PY - 2026
DA - 2026/
VL - 29
IS - 9
SP - 2261
EP - 2272
SN - 1097-6256
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Representations of the intrinsic value of information in mouse orbitofrontal cortex",
"container-title": "Nature neuroscience",
"author": [
{
"family": "Bussell",
"given": "Jennifer J"
},
{
"family": "Badman",
"given": "Ryan P"
},
{
"family": "Márton",
"given": "David"
},
{
"family": "Bromberg-Martin",
"given": "Ethan S"
},
{
"family": "Abbott",
"given": "L F"
},
{
"family": "Rajan",
"given": "Kanaka"
},
{
"family": "Axel",
"given": "Richard"
}
],
"container-title-short":
"volume": "29",
"issue": "9",
"page": "2261-2272",
"DOI": "10.1038/
"PMID": "42533133",
"PMCID": "PMC13533842",
"ISSN": "1097-6256",
"publisher": "Nature Portfolio",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
30
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.21203/rs.3.rs-10419673/v1 [code]
- Rapid value learning reveals generalized and context-dependent codes in frontal cortexJournal: Research Square (preprint)In common: Image Processing Toolbox, Statistics and Machine Learning Toolbox, 5 references
- [2] doi:10.1038/s41593-026-02342-9 [code]
- Interpretable abstractions of artificial neural networks predict behavior and neural activity during human information gathering.Journal: Nature neuroscienceIn common: 5 references
- [3] doi:10.1016/j.isci.2026.115897 [code]
- Experience and behavior modulate piriform cortex odor representation in freely moving mice.Journal: iScienceIn common: Statistics and Machine Learning Toolbox, systems, mouse, 4 references
- [4] doi:10.1038/s41467-026-73263-1 [code]
- Distributed neural codes of the 3D position in the marmoset frontal cortex and hippocampus.Journal: Nature communicationsIn common: Violinplot-Matlab, Image Processing Toolbox, Statistics and Machine Learning Toolbox, systems, 1 reference
- [5] doi:10.1016/j.celrep.2026.117852 [code]
- Graph theory identifies altered prefrontal microcircuit organization in Shank3 mice, a mouse Model of autism.Journal: Cell reportsIn common: Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 3 references
- [6] doi:10.1038/s41592-026-03154-2 [code]
- Simultaneous single-cell calcium imaging of neuronal population activity and brain-wide BOLD fMRI.Journal: Nature methodsIn common: Violinplot-Matlab, Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 1 reference
- [7] doi:10.1371/journal.pbio.3003824 [code]
- Flexible goal learning involves coordinated population activity in dCA1 and medial orbitofrontal cortex.Journal: PLoS biologyIn common: systems, 4 references
- [8] doi:10.1038/s41593-026-02231-1 [code]
- The prefrontal cortex controls memory organization in the hippocampus.Journal: Nature neuroscienceIn common: Image Processing Toolbox, Statistics and Machine Learning Toolbox, systems, mouse, 2 references
- [9] doi:10.1038/s41467-026-76581-6 [code]
- Thalamocortical bursts encode reward contingencies and drive associative learning.Journal: Nature communicationsIn common: Violinplot-Matlab, Image Processing Toolbox, Statistics and Machine Learning Toolbox, systems, mouse
- [10] doi:10.7554/elife.104684 [code]
- Regime shift detection and neurocomputational substrates for under and overreactions to change.Journal: eLifeIn common: Statistics and Machine Learning Toolbox, 3 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 4 repositories of the authors' code, each at its verified commit and with its license, 74 scripts, and 21 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:dc3c6f75d91dacf4…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
