addpath /project/3013067.03/Data_scripts/brainampconverter_v17/brainampconverter/;
% addpath M:\Documents\data_scripts\brainampconverter_v17\brainampconverter;


subj=[21]; %Indicate which subjects you want to convert the data of 4 15
session =[3]; %Indicate which sessions you want to convert the data of

for subNo = [subj]
    for ses = [session]
        if ses == 1
            if subNo <10
                fullfilename1 = fullfile(['/project/3013067.03/Remote_Fear_Memory/behavioral_logs/sub0', num2str(subNo), '/sub0', num2str(subNo),'_session1_learning/sub_0', num2str(subNo),'01.eeg']); 
            elseif subNo >= 10
                fullfilename1 = fullfile(['/project/3013067.03/Remote_Fear_Memory/behavioral_logs/sub', num2str(subNo), '/sub', num2str(subNo),'_session1_learning/sub_', num2str(subNo),'01.eeg']);
            end
            brainampconverter(fullfilename1);
        elseif ses == 2
            if subNo <10
                fullfilename1 = fullfile(['/project/3013067.03/Remote_Fear_Memory/behavioral_logs/sub0', num2str(subNo), '/sub0', num2str(subNo),'_session2_extinction/sub_0', num2str(subNo),'02.eeg']); 
            elseif subNo >= 10
                fullfilename1 = fullfile(['/project/3013067.03/Remote_Fear_Memory/behavioral_logs/sub', num2str(subNo), '/sub', num2str(subNo),'_session2_extinction/sub_', num2str(subNo),'02.eeg']);
            end
            brainampconverter(fullfilename1);
        elseif ses == 3
            if subNo <10
                fullfilename1 = fullfile(['/project/3013067.03/Remote_Fear_Memory/behavioral_logs/sub0', num2str(subNo), '/sub0', num2str(subNo),'_session3_reinstatement/sub_0', num2str(subNo),'03.eeg']); 
            elseif subNo >= 10
                fullfilename1 = fullfile(['/project/3013067.03/Remote_Fear_Memory/behavioral_logs/sub', num2str(subNo), '/sub', num2str(subNo),'_session3_reinstatement/sub_', num2str(subNo),'03.eeg']);
            end
            brainampconverter_session3(fullfilename1);
        end
    end
end



