Skip to content

Commit

Permalink
changes before testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Anne Mennen committed Jan 22, 2018
1 parent f06f1c3 commit 56c7469
Show file tree
Hide file tree
Showing 9 changed files with 637 additions and 533 deletions.
88 changes: 88 additions & 0 deletions ExptWrapper_Display.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
%exptDir = '~/code/rtAttenPenn/';
%cd(exptDir)
subjectNum = 500;
projectName = 'rtAttenPenn';
Screen('Preference', 'SkipSyncTests', 1);
subjectRun = 1;
% **** types of stimuli to train/show to subjects *******
NEUTRAL = 1;
SAD = 2;
HAPPY = 3;
% *******************************************************
typeNum = SAD;

subjectName = [datestr(now,5) datestr(now,7) datestr(now,11) num2str(subjectRun) '_' projectName];
matchNum = 0;
useButtonBox=1;
realtimeData = 0;
debug=1;
KbName('UnifyKeyNames')
addpath(genpath('/opt/psychtoolbox/'))

% well the git is set to ignore the data folder so it would just make sense
% to save here
%
%%
runNum=2;
fMRI = 0;
% today's scanning number
realtimeData = 0
debug = 0
useButtonBox = 0
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)
runNum=1;
fMRI = 6;
fMRI = 0;


%%
runNum=6;
fMRI = 16;
useButtonBox = 1
realtimeData = 1
debug = 1
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)


%%
runNum = 3;
fMRI = 14;
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)


%%
runNum = 4;
fMRI = 16;
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)


%%
runNum = 5;
fMRI = 18;
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)

%%
runNum = 6;
fMRI = 20;
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)


%%

runNum = 7;
fMRI = 20;
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)


%%

runNum = 8;
fMRI = 22;
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)


%%

runNum = 9;
fMRI = 24;
[blockData] = RealTimePunisherDisplay(subjectNum,subjectName,matchNum,runNum,useButtonBox,fMRI,realtimeData,debug)
85 changes: 0 additions & 85 deletions ExptWrapper_Display_Subject1.m

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

%%
%conf = loadjson('conf/example.json');
subjectNum = 200;
subjectNum = 500;
projectName = 'rtAttenPenn';
%imgDirHeader = conf.imgDirHeader;
subjectRun = 1;
Expand All @@ -29,7 +29,7 @@
KbName('UnifyKeyNames')

addpath(genpath('/opt/psychtoolbox/'))
imgDirHeader = '/Data1/subjects/'
imgDirHeader = '/Data1/subjects/';
%% Generate expt sequence

if matchNum ==0
Expand Down
14 changes: 7 additions & 7 deletions ProcessMask.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
end

setenv('FSLOUTPUTTYPE','NIFTI_GZ');

base_path = pwd;
if matchNum == 0
save_dir = ['./data/' num2str(subjectNum)];
save_dir = fullfile(pwd,['data/' num2str(subjectNum)]);
else
save_dir = ['./data/' num2str(matchNum) '_match'];
save_dir = fullfile(pwd,['data/' num2str(matchNum) '_match']);
end
subjectName = [datestr(now,5) datestr(now,7) datestr(now,11) num2str(runNum) '_' projectName];
dicom_dir = ['/mnt/rtexport/RTexport_Current/' datestr(subjDate,10) datestr(subjDate,5) datestr(subjDate,7) '.' subjectName '.' subjectName '/'];
process_dir = [save_dir 'reg' '/'];
process_dir = fullfile(save_dir,[ 'reg' '/']);
roi_name = 'wholebrain_mask';
roi_dir = pwd; % change this path name to wherever you put it on the penn computer!
code_dir = pwd;
Expand All @@ -54,7 +54,7 @@
highresfiles_genstr = sprintf('%s001_0000%s_0*',dicom_dir,num2str(highresScan,'%2.2i')); %general string for ALL mprage files**
unix(sprintf('%sdicom2bxh %s %s.bxh',bxhpath,highresfiles_genstr,highresFN));
unix(sprintf('%sbxhreorient --orientation=LAS %s.bxh %s.bxh',bxhpath,highresFN,highresFN_RE));
unix(sprintf('%sbxh2analyze --overwrite --analyzetypes --niigz --2niftihdr -s %s.bxh %s',bxhpath,highresFN_RE,highresFN_RE))
unix(sprintf('%sbxh2analyze --overwrite --analyzetypes --niigz --niftihdr -s %s.bxh %s',bxhpath,highresFN_RE,highresFN_RE))
unix(sprintf('%sbet %s.nii.gz %s_brain.nii.gz -R -m',fslpath,highresFN_RE,highresFN_RE))
%unix(sprintf('%sbet %s.nii.gz %s_brain.nii.gz -r 90 -R',fslpath,highresFN_RE,highresFN_RE))

Expand Down Expand Up @@ -173,9 +173,9 @@
mask=mask_brain;
%save anatomical mask
if matchNum == 0
save(['./data/' num2str(subjectNum) '/mask_' num2str(subjectNum)],'mask');
save(fullfile(save_dir, [ '/mask_' num2str(subjectNum)]),'mask');
else
save(['./data/' num2str(matchNum) '_match/mask_' num2str(subjectNum)],'mask');
save(fullfile(save_dir, [ '/mask_' num2str(subjectNum)]),'mask');
end

fprintf('Done with mask creation\n');
Expand Down
Loading

0 comments on commit 56c7469

Please sign in to comment.