Skip to content

Commit 80ebd4f

Browse files
committed
Merge branch '_TMP_RELEASE_BRANCH_' into niak-cog
2 parents b06d15d + 8882310 commit 80ebd4f

File tree

13 files changed

+119
-76
lines changed

13 files changed

+119
-76
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@
22
BCT/
33
*.swp
44
*.pyc
5-
<<<<<<< HEAD
65
*.asv
7-
=======
8-
jsonlab*/
9-
>>>>>>> master
6+
psom_gb_vars_local.m

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM simexp/octave:4.2.1_ubuntu_16
1+
FROM simexp/octave:4.2.1_cross_u16
22
MAINTAINER Pierre-Olivier Quirion <[email protected]>
33

44
ENV PSOM_VERSION 2.3.1
@@ -55,8 +55,10 @@ ADD util/bin/niak_jupyter /usr/local/bin/niak_jupyter
5555
ADD util/lib/psom_gb_vars_local.jupyter /usr/local/lib/psom_gb_vars_local.jupyter
5656
ADD util/lib/jupyter_notebook_config.py /usr/local/lib/jupyter_notebook_config.py
5757
EXPOSE 8080
58+
59+
5860
# To run with jupyter
59-
# docker run -it --rm -v /niak_sandbox:$PWD --user $UID -p 8080:6666 simexp/niak:beta niak_jupyter
61+
# docker run -it --rm -v /niak_sandbox:$PWD --user $UID -p 8080:6666 simexp/niak-cog niak_jupyter
6062

6163

6264
# Command to run octave as GUI

circle.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@ machine:
99

1010
dependencies:
1111
cache_directories:
12-
- "data_test_niak_mnc1"
13-
- "~/docker"
12+
- "~/cache"
1413
override:
15-
- if [[ -e ~/docker/niak_u16_o4.tar ]]; then docker load -i ~/docker/niak_u16_o4.tar; fi
16-
- docker pull simexp/niak_dependency:u16_o4
17-
- mkdir -p ~/docker; docker save simexp/niak_dependency:u16_o4 > ~/docker/niak_u16_o4.tar
14+
- if [[ -e ~/cache/niak_o4_cross_u16.tar ]]; then docker load -i ~/cache/niak_o4_cross_u16.tar; fi
15+
- docker pull simexp/niak_dependency:o4_cross_u16
16+
- mkdir -p ~/cache
17+
- ls ~/cache
18+
- docker save -o ~/cache/niak_o4_cross_u16.tar simexp/niak_dependency:o4_cross_u16
19+
- if [[ -e ~/cache/data_test_niak_mnc1 ]]; then cp ~/cache/data_test_niak_mnc1 . ; fi
20+
- find ~/cache -type f -not -name "*data_test_niak_mnc1*" -not -name "*niak_o4_cross_u16*" -exec rm {} \; # delete old cache crap!
1821

1922
test:
2023
override:
21-
- docker run -it -v $PWD:$PWD simexp/niak_dependency:u16_o4 /bin/bash -lic "cd $PWD; octave --eval \"addpath(genpath(pwd));[pipe,opt,status] = niak_test_all(struct(),struct('psom',struct('mode_pipeline_manager','session','mode','background','max_queued',6,'flag_pause',false))); exit(status)\"":
24+
- docker run -it -v $PWD:$PWD simexp/niak_dependency:o4_cross_u16 /bin/bash -lic "cd $PWD; octave --eval \"addpath(genpath(pwd));[pipe,opt,status] = niak_test_all(struct(),struct('psom',struct('mode_pipeline_manager','session','mode','background','max_queued',6,'flag_pause',false))); exit(status)\"":
2225
timeout: 21600
2326

2427
#deployment:

commands/misc/niak_gb_vars.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@
133133
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
134134

135135
%% NIAK version
136-
GB_NIAK.version = 'v1.1.0';
136+
GB_NIAK.version = 'v1.1.3';
137137

138138
%% Target for tests
139-
GB_NIAK.target_test = 'ai';
139+
GB_NIAK.target_test = 'aj';
140140

141141
%% In which path is NIAK ?
142142
str_read_vol = which('niak_read_vol');

commands/misc/niak_version.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
%%%%%%%%%%%%%%%%%
5252
%% SVN %%
5353
%%%%%%%%%%%%%%%%%
54-
55-
versions.svn = psom_version_svn();
54+
% SVN not used anymore
55+
% versions.svn = psom_version_svn();
5656

5757
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5858
%% Release number %%

commands/read_write/niak_grab_bids.m

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
%
1818
% FUNC_HINT
1919
% (string) A hint to pick one out of many fmri input for exemple
20-
% if the fmri study includes "sub-XX_task-rest-somthing_bold.nii.gz"
21-
% and "sub-XX_task-rest-a_thing_bold.nii.gz" and the something flavor
22-
% needs to be selected, FUNC_HINT = 'something', would do the trick.
23-
% Note that FUNC_HINT needs to be a string somewhere between
24-
% "task-rest" and the extention (.nii or .mnc)
25-
%
20+
% if the fmri study includes "sub-XX_task-rest-a_hint_bold.nii.gz"
21+
% and "sub-XX_task-rest-a_thing_bold.nii.gz" and the "hint" flavor
22+
% needs to be selected, FUNC_HINT = 'hint', would do the trick.
23+
%
2624
% ANAT_HINT
2725
% (string) A hint to pick one out of many anat input. I only one file
2826
% is present it will be used by default. If no hint is give an on file
@@ -194,8 +192,7 @@
194192

195193
anat_path = strcat(session_path, filesep, 'anat');
196194
fmri_path = strcat(session_path, filesep, 'func');
197-
fmri_regex = [ "(", subject_dir ".*task-", task_type ,".*", func_hint, ".*(nii|mnc).*)"];
198-
% fmri_regex = [ "(", subject_dir ".*)"];
195+
fmri_regex = [ "(", subject_dir ".*", func_hint, ".*(nii|mnc).*)"];
199196
anat_regex = ['(', subject_dir, '.*', anat_hint, '.*(nii|mnc).*)'] ;
200197
list_anat_dir = dir(anat_path) ;
201198
list_fmri_dir = dir(fmri_path) ;

commands/read_write/niak_read_hdr_nifti.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,15 @@
7878
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7979

8080
%% Opening the file
81-
list_formats = {'native','ieee-le','ieee-be'};
81+
list_formats = {'ieee-le','ieee-be'};
8282
fid = -1;
8383
tag_OK = 0;
8484
num_f = 1;
8585

8686
while ((tag_OK == 0)||(fid < 0))&&(num_f <= length(list_formats))
87+
if fid > 0
88+
fclose(fid)
89+
end
8790
fid = fopen(file_name,'r',list_formats{num_f});
8891
if ~(fid<0)
8992
fseek(fid,0,'bof');

commands/read_write/niak_read_vol.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@
233233

234234
[succ,msg] = system(instr_unzip);
235235
if succ ~= 0
236+
fprintf(1,"can't run: %s\n", instr_unzip)
236237
error(cat(2,'niak:read: ',msg,'. There was a problem unzipping the file. Please check that the command ''',GB_NIAK.unzip,''' works, or change this command using the variable GB_NIAK_UNZIP in the file NIAK_GB_VARS'));
237238
end
238239

@@ -282,4 +283,4 @@
282283
end
283284
end
284285

285-
end
286+
end

commands/read_write/niak_write_nifti.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,23 @@
122122
switch hdr.info.precision
123123
case 'uint8'
124124
hdr.details.datatype = 2;
125-
hdr.details.bitpix = int16(8);
125+
hdr.details.bitpix = 8;
126126
vol = uint8(vol);
127127
case 'int16'
128128
hdr.details.datatype = 4;
129-
hdr.details.bitpix = int16(16);
129+
hdr.details.bitpix = 16;
130130
vol = int16(vol);
131131
case 'int32'
132132
hdr.details.datatype = 8;
133-
hdr.details.bitpix = int16(32);
133+
hdr.details.bitpix = 32;
134134
vol = int32(vol);
135135
case {'float32','float'}
136136
hdr.details.datatype = 16;
137-
hdr.details.bitpix = int16(32);
137+
hdr.details.bitpix = 32;
138138
vol = single(vol);
139139
case 'double'
140140
hdr.details.datatype = 64;
141-
hdr.details.bitpix = int16(64);
141+
hdr.details.bitpix = 64;
142142
vol = double(vol);
143143
end
144144

@@ -318,7 +318,7 @@
318318
fbytes = ftell(fid);
319319

320320
if ~isequal(fbytes,348),
321-
msg = sprintf('For some reason, the header size is not 348 bytes. That should not be the case...');
321+
msg = sprintf('For some reason, the header size is %i not 348 bytes. That should not be the case...', fbytes);
322322
warning(msg);
323323
end
324324

extensions/niak_test/niak_test_connectome_demoniak.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@
107107
out_c = [path_test.result 'report_test_regression_connectome_demoniak.csv'];
108108
opt_c.base_source = opt_demo.folder_out;
109109
opt_c.base_target = path_test.reference;
110-
opt_c.black_list_source = [opt_demo.folder_out 'logs' filesep];
111-
opt_c.black_list_target = [path_test.reference 'logs' filesep];
110+
opt_c.black_list_source{1} = [opt_demo.folder_out 'logs' filesep];
111+
opt_c.black_list_target{1} = [path_test.reference 'logs' filesep];
112+
opt_c.black_list_source{2} = [opt_demo.folder_out 'pipe_parameters.mat' ];
113+
opt_c.black_list_target{2} = [path_test.reference 'pipe_parameters.mat' ];
112114
pipeline = psom_add_job(pipeline,'test_connectome','niak_test_cmp_files',in_c,out_c,opt_c,false);
113115
pipeline.test_connectome.dep = list_jobs;
114116
end

0 commit comments

Comments
 (0)