Code organization 1. Load Subject Data from stored files (in data folder, make sure to clone the repository folders as they are) ``` subj1Data=getSubjectData(1); subj2Data=getSubjectData(2); ``` 2. Access behavioral and experimental variables ``` subj1bi=getBehavioralInfos(subj1Data); subj2bi=getBehavioralInfos(subj2Data); ``` 3. Access eye data between time epochs for given session ``` 'preoffer1','offer1','delay1','offer2','delay2', 'startfix','choicego','choicesacc','choicemade'. ``` e.g. Subject1, Session 1, 'offer1' to 'delay1' ``` subj1et=getEyeTracks(subj1Data,1,'offer1','delay1'); ``` 4. Access neural data between time epochs for given session e.g. Subject1, session1, ``` subj1ss=getSpikeSequences(subj1Data,1,'offer1','delay1'); ``` 5. Access behavioral data pooled in both subjects, all sessions ``` subjsData(1).sbdata=subj1Data; subjsData(2).sbdata=subj2Data; poolstackvars=getPoolStackVars(subjsData); ``` 6. Access eye data pooled in both subjects (sessions x task epochs) ``` subjsData(1).sbdata=subj1Data; subjsData(2).sbdata=subj2Data; poolstackepos=getPoolStackEyePos(subjsData); ``` 7. Access neural data pooled in both subjects (sessions x task epochs) ``` subjsData(1).sbdata=subj1Data subjsData(2).sbdata=subj2Data; poolstackspks=getPoolStackSpks(subjsData); ``` 8. Access eye and neural data pooled in both subjects, sessions (x task epochs) ``` pooltweyepos=getTimewinsPoolEyePos(); pooltwspksq=getTimewinsPoolSpikeSeqs(); ``` 9. Run analyses in Fig.1-2 through `behavioralAnalysis.m` 10. Run analyses in Fig.3 through `neuralAnalysis.m`, 11. Run analyses in Fig.4 through `neuralAnalysisDelayShiftAligned.m` (related, optional: run analyses in Fig. S15 through `neuralAnalysisOfferShiftAligned.m`) 11. Run analyses in Fig.5A-D through `neuralAnalysisChoice.m`, 12. Run analyses in in Fig.5E-F through `neuralAnalysisChoiceResiduals.m`. In case of further interest, please contact corresponding author Demetrio Ferro *Creative Commons BY-NC-SA 4.0 - May 2024*