Skip to content

Commit

Permalink
Using narps_open.data.task module inside 98BT
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Oct 5, 2023
1 parent eb2b118 commit 1f0a528
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions narps_open/pipelines/team_98BT.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from niflow.nipype1.workflows.fmri.spm import create_DARTEL_template

from narps_open.pipelines import Pipeline
from narps_open.data.task import Pipeline
from narps_open.data.task import TaskInformation

class PipelineTeam98BT(Pipeline):
""" A class that defines the pipeline of team 98BT. """
Expand Down Expand Up @@ -183,9 +183,9 @@ def get_preprocessing_sub_workflow(self):
'magnitude' : join('sub-{subject_id}', 'fmap', 'sub-{subject_id}_magnitude*.nii.gz'),
'phasediff' : join('sub-{subject_id}', 'fmap', 'sub-{subject_id}_phasediff.nii.gz'),
'info_fmap' : join('sub-{subject_id}', 'fmap', 'sub-{subject_id}_phasediff.json'),
'dartel_flow_field' : join(result_dir, output_dir, 'dartel_template',
'dartel_flow_field' : join(self.directories.output_dir, 'dartel_template',
'u_rc1subject_id_{subject_id}_struct_template.nii'),
'dartel_template' :join(result_dir, output_dir, 'dartel_template', 'template_6.nii')
'dartel_template' :join(self.directories.output_dir, 'dartel_template', 'template_6.nii')
}

# SelectFiles node - to select necessary files
Expand All @@ -207,7 +207,7 @@ def get_preprocessing_sub_workflow(self):

fieldmap = Node(FieldMap(blip_direction = -1),
name = 'fieldmap')
fieldmap.inputs.total_readout_time = self.total_readout_time
fieldmap.inputs.total_readout_time = TaskInformation()['TotalReadoutTime']

# Segmentation - SPM Segment function via custom scripts (defaults left in place)
tissue_list = [
Expand All @@ -226,9 +226,10 @@ def get_preprocessing_sub_workflow(self):

# Slice timing - SPM slice time correction with default parameters
slice_timing = Node(SliceTiming(
num_slices = self.number_of_slices, ref_slice = 2,
slice_order = self.slice_timing, time_acquisition = self.acquisition_time,
time_repetition = self.tr),
num_slices = TaskInformation()['NumberOfSlices'], ref_slice = 2,
slice_order = TaskInformation()['SliceTiming'],
time_acquisition = TaskInformation()['AcquisitionTime'],
time_repetition = TaskInformation()['RepetitionTime']),
name = 'slice_timing')

# Motion correction - SPM realign and unwarp
Expand Down Expand Up @@ -556,13 +557,13 @@ def get_subject_level_analysis(self):
# SpecifyModel - Generates SPM-specific Model
specify_model = Node(SpecifySPMModel(
concatenate_runs = False, input_units = 'secs', output_units = 'secs',
time_repetition = self.tr, high_pass_filter_cutoff = 128),
time_repetition = TaskInformation()['RepetitionTime'], high_pass_filter_cutoff = 128),
name='specify_model')

# Level1Design - Generates an SPM design matrix
l1_design = Node(Level1Design(
bases = {'hrf': {'derivs': [1, 1]}}, timing_units = 'secs',
interscan_interval = self.tr),
interscan_interval = TaskInformation()['RepetitionTime']),
name='l1_design')

# EstimateModel - estimate the parameters of the model
Expand Down

0 comments on commit 1f0a528

Please sign in to comment.