Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

<!-- **Full Changelog**: https://github.com/cpp-lln-lab/CPP_SPM/compare/v3.0.0...v3.1.0 -->
<!-- **Full Changelog**: https://github.com/cpp-lln-lab/bidspm/compare/v3.0.0...v3.1.0 -->

### Added

Expand Down Expand Up @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

* [FIX] remove dummies from preproc dataset and not raw dataset when using CLI (#1057) @Remi-Gau
* [FIX] skip smoothing when running bidspm prepoc in dryRun (#1054) @Remi-Gau
* [FIX] handle phase entity in filename (#1034) @Remi-Gau
* [FIX] fix group level results after contrasts smoothing (#1021) @Remi-Gau
Expand All @@ -75,7 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [3.0.0] - 2022-12-14

**Full Changelog**: https://github.com/cpp-lln-lab/CPP_SPM/compare/v2.3.0...v3.0.0
**Full Changelog**: https://github.com/cpp-lln-lab/bidspm/compare/v2.3.0...v3.0.0

### Changed

Expand Down Expand Up @@ -106,7 +107,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.3.0] - 2022-11-22

**Full Changelog**: https://github.com/cpp-lln-lab/CPP_SPM/compare/v2.2.0...v2.3.0
**Full Changelog**: https://github.com/cpp-lln-lab/bidspm/compare/v2.2.0...v2.3.0

- `bidspm` main function:
- saving options are saved to help with bug report
Expand Down Expand Up @@ -141,7 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.2.0] - 2022-10-29

**Full Changelog**: https://github.com/cpp-lln-lab/CPP_SPM/compare/v2.1.0...v2.2.0
**Full Changelog**: https://github.com/cpp-lln-lab/bidspm/compare/v2.1.0...v2.2.0

### Added

Expand All @@ -164,7 +165,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.1.0] - 2022-07-21

**Full Changelog**: https://github.com/cpp-lln-lab/CPP_SPM/compare/v2.0.0...v2.0.1
**Full Changelog**: https://github.com/cpp-lln-lab/bidspm/compare/v2.0.0...v2.0.1

### Added

Expand Down Expand Up @@ -213,7 +214,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.0.0] - 2022-07-10

**Full Changelog**: https://github.com/cpp-lln-lab/CPP_SPM/compare/v1.1.5...v2.0.0
**Full Changelog**: https://github.com/cpp-lln-lab/bidspm/compare/v1.1.5...v2.0.0

### Added

Expand Down
6 changes: 4 additions & 2 deletions bidspm.m
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ function preprocess(args)
end
bidsCopyInputFolder(opt);
if opt.dummy_scans > 0
bidsRemoveDummies(opt, ...
'dummyScans', opt.dummy_scans, ...
tmpOpt = opt;
tmpOpt.dir.input = tmpOpt.dir.preproc;
bidsRemoveDummies(tmpOpt, ...
'dummyScans', tmpOpt.dummy_scans, ...
'force', false);
end
bidsCheckVoxelSize(opt);
Expand Down
6 changes: 3 additions & 3 deletions src/workflows/preproc/bidsRemoveDummies.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ function bidsRemoveDummies(varargin)
%
% bidsRemoveDummies(opt, 'dummyScans', someInteger, 'force', false)
%
% :type opt: structure
% :param opt: Options chosen for the analysis.
% See also: checkOptions
% ``checkOptions()`` and ``loadAndCheckOptions()``.
% :type opt: structure
%
% :param dummyScans: number of volumes to remove
% :type dummyScans: integer >= 0
% :type dummyScans: integer >= 0
%
% :param force: use ``'force', true`` to remove dummy scans even if metadata say
% they have already been removed
% :type force: boolean
% :type force: boolean
%
% EXAMPLE::
%
Expand Down Expand Up @@ -69,6 +68,7 @@ function bidsRemoveDummies(varargin)

filter = opt.bidsFilterFile.bold;
filter.ext = '\.nii.*$';
filter.prefix = '';
filter.task = opt.taskName;
filter.desc = '';
filter.space = '';
Expand Down
15 changes: 14 additions & 1 deletion tests/tests_workflows/preproc/test_bidsRemoveDummies.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@

function test_bidsRemoveDummies_basic()

if bids.internal.is_octave()
tmpDir = fullfile(tempname);
else
tmpDir = fullfile(tempname, 'raw');
end
spm_mkdir(tmpDir);
opt = setOptions('MoAE');
bidsRemoveDummies(opt, 'dummyScans', 12, 'force', false);
copyfile(opt.dir.raw, tmpDir);

if bids.internal.is_octave()
tmpDir = fullfile(tmpDir, 'raw');
end
opt.dir.raw = tmpDir;
opt.dir.input = tmpDir;
bidsRemoveDummies(opt, 'dummyScans', 20, 'force', false);

end