コード例 #1
0
 class input_spec(TraitedSpec):
     experiment = traits.Str()
     model = traits.Str()
     data_dir = traits.Directory(exists=True)
     proc_dir = traits.Directory(exists=True)
     subject = traits.Str()
     run_tuple = traits.Tuple(traits.Str(), traits.Str())
コード例 #2
0
class prepareDockerPathsInputSpec(BaseInterfaceInputSpec):
    local_T2ws_paths = InputMultiPath(
        File(desc='input T2ws paths', mandatory=True, exists=True))
    local_masks_paths = InputMultiPath(
        File(desc='input masks paths', mandatory=True, exists=True))
    local_dir = traits.Directory(mandatory=True)
    docker_dir = traits.Directory('/fetaldata', mandatory=True)
コード例 #3
0
ファイル: preproc.py プロジェクト: kiani/lyman
 class input_spec(TraitedSpec):
     run = traits.Tuple()
     data_dir = traits.Directory(exists=True)
     proc_dir = traits.Directory(exists=True)
     experiment = traits.Str()
     sb_template = traits.Str()
     ts_template = traits.Str()
     crop_frames = traits.Int(0, usedefault=True)
コード例 #4
0
ファイル: preproc.py プロジェクト: kastman/lyman
    class input_spec(TraitedSpec):
        run = traits.Tuple()
        data_dir = traits.Directory(exists=True)
        proc_dir = traits.Directory(exists=True)
        experiment = traits.Str()
        sb_template = traits.Str()
        ts_template = traits.Str()

        # TODO this default should be defined at the project/experiment level
        crop_frames = traits.Int(0, usedefault=True)
コード例 #5
0
class _DerivativesDataSinkInputSpec(DynamicTraitedSpec,
                                    BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc="Path to the base directory for storing data.")
    check_hdr = traits.Bool(True,
                            usedefault=True,
                            desc="fix headers of NIfTI outputs")
    compress = InputMultiObject(
        traits.Either(None, traits.Bool),
        usedefault=True,
        desc=
        "whether ``in_file`` should be compressed (True), uncompressed (False) "
        "or left unmodified (None, default).",
    )
    data_dtype = Str(
        desc="NumPy datatype to coerce NIfTI data to, or `source` to"
        "match the input file dtype")
    dismiss_entities = InputMultiObject(
        traits.Either(None, Str),
        usedefault=True,
        desc="a list entities that will not be propagated from the source file",
    )
    in_file = InputMultiObject(File(exists=True),
                               mandatory=True,
                               desc="the object to be saved")
    meta_dict = traits.DictStrAny(
        desc="an input dictionary containing metadata")
    source_file = InputMultiObject(
        File(exists=False),
        mandatory=True,
        desc="the source file(s) to extract entities from")
コード例 #6
0
ファイル: bids.py プロジェクト: dPys/niworkflows
class _DerivativesDataSinkInputSpec(DynamicTraitedSpec,
                                    BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc='Path to the base directory for storing data.')
    check_hdr = traits.Bool(True,
                            usedefault=True,
                            desc='fix headers of NIfTI outputs')
    compress = traits.Bool(
        desc="force compression (True) or uncompression (False)"
        " of the output file (default: same as input)")
    desc = Str('', usedefault=True, desc='Label for description field')
    extra_values = traits.List(Str)
    in_file = InputMultiObject(File(exists=True),
                               mandatory=True,
                               desc='the object to be saved')
    keep_dtype = traits.Bool(False,
                             usedefault=True,
                             desc='keep datatype suffix')
    meta_dict = traits.DictStrAny(
        desc='an input dictionary containing metadata')
    source_file = File(exists=False,
                       mandatory=True,
                       desc='the input func file')
    space = Str('', usedefault=True, desc='Label for space field')
    suffix = Str('', usedefault=True, desc='suffix appended to source_file')
コード例 #7
0
class DerivativesDataSinkInputSpec(BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc='Path to the base directory for storing data.')
    in_file = File(exists=True, mandatory=True)
    source_file = File(exists=False,
                       mandatory=True,
                       desc='the input func file')
コード例 #8
0
ファイル: interfaces.py プロジェクト: voytekresearch/ndspflow
class BycycleNodeInputSpec(BaseInterfaceInputSpec):
    """Input interface for bycycle."""

    # Input/Output
    input_dir = traits.Directory(
        argstr='%s',
        exists=True,
        resolve=True,
        desc=
        'Input directory containing timeseries and/or spectra .npy files to read.',
        mandatory=True,
        position=0)
    output_dir = traits.Directory(
        argstr='%s',
        exists=False,
        resolve=True,
        desc='Output directory to write results and BIDS derivatives to write.',
        mandatory=True,
        position=1)

    # Required arguments
    sig = traits.File(mandatory=True, usedefault=False)
    fs = traits.Float(mandatory=True, usedefault=False)
    f_range_bycycle = traits.Tuple(mandatory=True, usedefault=False)

    # Optional arguments
    center_extrema = traits.Str('peak', mandatory=False, usedefault=True)
    burst_method = traits.Str('cycles', mandatory=False, usedefault=True)
    amp_fraction_threshold = traits.Float(0.0,
                                          mandatory=False,
                                          usedefault=True)
    amp_consistency_threshold = traits.Float(0.5,
                                             mandatory=False,
                                             usedefault=True)
    period_consistency_threshold = traits.Float(0.5,
                                                mandatory=False,
                                                usedefault=True)
    monotonicity_threshold = traits.Float(0.8,
                                          mandatory=False,
                                          usedefault=True)
    min_n_cycles = traits.Int(3, mandatory=False, usedefault=True)
    burst_fraction_threshold = traits.Float(1.0,
                                            mandatory=False,
                                            usedefault=True)
    axis = traits.Str('None', mandatory=False, usedefault=True)
    n_jobs = traits.Int(1, mandatory=False, usedefault=True)
コード例 #9
0
 class output_spec(TraitedSpec):
     subject = traits.Str()
     session = traits.Str()
     run = traits.Str()
     anat_file = traits.File(exists=True)
     mask_file = traits.File(exists=True)
     beta_file = traits.File(exists=True)
     ols_file = traits.File(exists=True)
     error_file = traits.File(exists=True)
     output_path = traits.Directory()
コード例 #10
0
class CombineStatsInputSpec(BaseInterfaceInputSpec):
    bids_dir = traits.Directory(exists=True, mandatory=True)
    validate = traits.Bool(default=True, usedefault=True)
    row_keys = traits.ListStr(mandatory=True)
    invariants = traits.DictStrAny()
    strict = traits.Bool(default=True, usedefault=True)
    index = traits.Str()
    ignore = traits.Either(traits.ListStr,
                           traits.Set(trait=traits.Str),
                           traits.Tuple(trait=traits.Str))
コード例 #11
0
ファイル: model.py プロジェクト: duyong6380/lyman
 class output_spec(TraitedSpec):
     subject = traits.Str()
     session = traits.Str()
     run = traits.Str()
     seg_file = traits.File(exists=True)
     surf_file = traits.File(exists=True)
     mask_file = traits.File(exists=True)
     ts_file = traits.File(exists=True)
     noise_file = traits.File(Exists=True)
     mc_file = traits.File(exists=True)
     output_path = traits.Directory()
コード例 #12
0
class DerivativesDataSinkInputSpec(BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc='Path to the base directory for storing data.')
    in_file = InputMultiPath(File(),
                             exists=True,
                             mandatory=True,
                             desc='the object to be saved')
    source_file = File(exists=True, mandatory=True, desc='the input func file')
    suffix = traits.Str('',
                        mandatory=True,
                        desc='suffix appended to source_file')
コード例 #13
0
ファイル: model.py プロジェクト: duyong6380/lyman
 class input_spec(TraitedSpec):
     subject = traits.Str()
     session = traits.Str()
     run = traits.Str()
     data_dir = traits.Directory(exists=True)
     info = traits.Dict()
     seg_file = traits.File(exists=True)
     surf_file = traits.File(exists=True)
     ts_file = traits.File(exists=True)
     mask_file = traits.File(exists=True)
     noise_file = traits.File(exists=True)
     mc_file = traits.File(exists=True)
コード例 #14
0
ファイル: preproc.py プロジェクト: kiani/lyman
 class output_spec(TraitedSpec):
     out_file = traits.File(exists=True)
     out_plot = traits.File(exists=True)
     mask_file = traits.File(exists=True)
     mask_plot = traits.File(exists=True)
     noise_file = traits.File(exists=True)
     noise_plot = traits.File(exists=True)
     mean_file = traits.File(exists=True)
     mean_plot = traits.File(exists=True)
     tsnr_file = traits.File(exists=True)
     tsnr_plot = traits.File(exists=True)
     output_path = traits.Directory()
コード例 #15
0
ファイル: bids.py プロジェクト: snastase/NiBetaSeries
class DerivativesDataSinkInputSpec(BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc='Path to the base directory for storing data.')
    betaseries_file = File(exists=True,
                           mandatory=True,
                           desc='the betaseries file')
    in_file = File(exists=True, mandatory=True)
    source_file = File(exists=False,
                       mandatory=True,
                       desc='the input func file')
    suffix = traits.Str('',
                        mandatory=True,
                        desc='suffix appended to source_file')
    extra_values = traits.List(traits.Str)
コード例 #16
0
ファイル: interfaces.py プロジェクト: voytekresearch/ndspflow
class ReportNodeInputSpec(BaseInterfaceInputSpec):
    """Input interface for reporting."""

    output_dir = traits.Directory(
        argstr='%s',
        exists=False,
        resolve=True,
        desc='Output directory to write results and BIDS derivatives to write.',
        mandatory=True,
        position=1)

    fms = traits.Any()
    df_features = traits.Any()
    _fit_args = traits.Any()
コード例 #17
0
ファイル: preproc.py プロジェクト: kiani/lyman
 class output_spec(TraitedSpec):
     run_tuple = traits.Tuple()
     subject = traits.Str()
     session = traits.Str()
     run = traits.Str()
     sb_file = traits.File(exists=True)
     ts_file = traits.File(exists=True)
     ts_frames = traits.List(traits.File(exists=True))
     ts_plot = traits.File(exists=True)
     reg_file = traits.File(exists=True)
     seg_file = traits.File(exists=True)
     anat_file = traits.File(exists=True)
     mask_file = traits.File(exists=True)
     output_path = traits.Directory()
コード例 #18
0
ファイル: bids.py プロジェクト: adpines/qsiprep
class DerivativesDataSinkInputSpec(BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc='Path to the base directory for storing data.')
    in_file = InputMultiPath(File(exists=True), mandatory=True,
                             desc='the object to be saved')
    source_file = File(exists=False, mandatory=True, desc='the original file')
    prefix = traits.Str(mandatory=False, desc='prefix for output files')
    space = traits.Str('', usedefault=True, desc='Label for space field')
    desc = traits.Str('', usedefault=True, desc='Label for description field')
    suffix = traits.Str('', usedefault=True, desc='suffix appended to source_file')
    keep_dtype = traits.Bool(False, usedefault=True, desc='keep datatype suffix')
    extra_values = traits.List(traits.Str)
    compress = traits.Bool(desc="force compression (True) or uncompression (False)"
                                " of the output file (default: same as input)")
    extension = traits.Str()
コード例 #19
0
ファイル: model.py プロジェクト: fagan2888/lyman
 class input_spec(TraitedSpec):
     subject = traits.Str()
     session = traits.Str()
     run = traits.Str()
     data_dir = traits.Directory(exists=True)
     info = traits.Dict()
     seg_file = traits.File(exists=True)
     surf_file = traits.File(exists=True)
     ts_file = traits.File(exists=True)
     mask_file = traits.File(exists=True)
     edge_file = traits.File(exists=True)
     noise_file = traits.File(exists=True)
     mc_file = traits.File(exists=True)
     wm_erode = traits.Int(default=2)
     csf_erode = traits.Int(default=1)
コード例 #20
0
 class input_spec(TraitedSpec):
     subject = traits.Str()
     session = traits.Str()
     run = traits.Str()
     data_dir = traits.Directory(exists=True)
     exp_info = traits.Dict()
     model_info = traits.Dict()
     seg_file = traits.File(exists=True)
     surf_file = traits.File(exists=True)
     ts_file = traits.File(exists=True)
     mask_file = traits.File(exists=True)
     noise_file = traits.File(exists=True)
     mc_file = traits.File(exists=True)
     mesh_files = traits.Tuple(traits.File(exists=True),
                               traits.File(exists=True))
コード例 #21
0
ファイル: interfaces.py プロジェクト: voytekresearch/ndspflow
class FOOOFNodeInputSpec(BaseInterfaceInputSpec):
    """Input interface for FOOOF."""

    # Input/Output
    input_dir = traits.Directory(
        argstr='%s',
        exists=True,
        resolve=True,
        desc=
        'Input directory containing timeseries and/or spectra .npy files to read.',
        mandatory=True,
        position=0)
    output_dir = traits.Directory(
        argstr='%s',
        exists=False,
        resolve=True,
        desc='Output directory to write results and BIDS derivatives to write.',
        mandatory=True,
        position=1)

    # Init params
    peak_width_limits = traits.Tuple((0.5, 12.0),
                                     mandatory=False,
                                     usedefault=True)
    max_n_peaks = traits.Int(100, mandatory=False, usedefault=True)
    min_peak_height = traits.Float(0.0, mandatory=False, usedefault=True)
    peak_threshold = traits.Float(2.0, mandatory=False, usedefault=True)
    aperiodic_mode = traits.Str('fixed', mandatory=False, usedefault=True)

    # Fit params
    freqs = traits.File(mandatory=True, usedefault=False)
    power_spectrum = traits.File(mandatory=True, usedefault=False)
    f_range_fooof = traits.Tuple((-np.inf, np.inf),
                                 mandatory=False,
                                 usedefault=True)
    n_jobs = traits.Int(1, mandatory=False, usedefault=True)
コード例 #22
0
ファイル: bids.py プロジェクト: InspectorDidi/RABIES
class DerivativesDataSinkInputSpec(BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc='Path to the base directory for storing data.')
    in_file = InputMultiPath(File(exists=True),
                             mandatory=True,
                             desc='the object to be saved')
    source_file = File(exists=False,
                       mandatory=True,
                       desc='the input func file')
    suffix = traits.Str('',
                        mandatory=True,
                        desc='suffix appended to source_file')
    extra_values = traits.List(traits.Str)
    compress = traits.Bool(
        desc="force compression (True) or uncompression (False)"
        " of the output file (default: same as input)")
コード例 #23
0
class TrainInputSpec(BaseInterfaceInputSpec):

    images = traits.Array(mandatory=True,
                          desc='Images for the training as NumPy array')

    masks = traits.Array(mandatory=True,
                         desc='Masks for training as NumPy array')

    model_path = traits.Directory(mandatory=True,
                                  desc='directory where to save the models')

    ensemble_parameter = traits.Int(3,
                                    usedefault=True,
                                    desc='ensemble parameter')

    verbose = traits.Bool(True, usedefault=True, desc='Verbose')

    batch_size = traits.Int(30, usedefault=True, desc='batch size, default 30')

    epochs = traits.Int(5, usedefault=True, desc='epochs, default 5')
    image_shape = traits.Tuple((traits.Int(), traits.Int(), traits.Int()),
                               desc='slice shape')

    shuffle = traits.Bool(True, desc='shuffle')
コード例 #24
0
class QsiprepAnatomicalIngressInputSpec(BaseInterfaceInputSpec):
    recon_input_dir = traits.Directory(exists=True, mandatory=True)
    subject_id = traits.Str()
    subjects_dir = File(exists=True)
コード例 #25
0
class _BIDSFreeSurferDirOutputSpec(TraitedSpec):
    subjects_dir = traits.Directory(exists=True,
                                    desc="FreeSurfer subjects directory")
コード例 #26
0
class InverseSolutionConnInputSpec(BaseInterfaceInputSpec):
    """Input specification for InverseSolution."""

    sbj_id = traits.String(desc='subject id', mandatory=True)
    subjects_dir = traits.Directory(
        exists=True,
        desc='Freesurfer main directory',  # noqa
        mandatory=True)
    raw_filename = traits.File(exists=True,
                               desc='raw filename',
                               mandatory=True)
    cov_filename = traits.File(exists=True,
                               desc='Noise Covariance matrix',
                               mandatory=True)
    fwd_filename = traits.File(exists=True, desc='LF matrix', mandatory=True)
    is_epoched = traits.Bool(False,
                             usedefault=True,
                             desc='if true raw data will be epoched',
                             mandatory=False)
    is_fixed = traits.Bool(False,
                           usedefault=True,
                           desc='if true we use fixed orientation',
                           mandatory=False)
    events_id = traits.Dict({},
                            desc='the id of all events to consider.',
                            usedefault=True,
                            mandatory=False)
    condition = traits.List(desc='list of conditions', mandatory=False)
    t_min = traits.Float(None, desc='start time before event', mandatory=False)
    t_max = traits.Float(None, desc='end time after event', mandatory=False)
    is_evoked = traits.Bool(desc='if true if we want to create evoked data',
                            mandatory=False)
    is_ave = traits.Bool(False,
                         desc='if true if we have already evoked data',
                         mandatory=False)
    inv_method = traits.String('MNE',
                               desc='possible inverse methods are \
                               sLORETA, MNE, dSPM',
                               usedefault=True,
                               mandatory=True)
    snr = traits.Float(1.0,
                       usedefault=True,
                       desc='use smaller SNR for \
                       raw data',
                       mandatory=False)
    parc = traits.String('aparc',
                         usedefault=True,
                         desc='the parcellation to use: aparc vs aparc.a2009s',
                         mandatory=False)
    aseg = traits.Bool(desc='if true sub structures will be considered',
                       mandatory=False)
    aseg_labels = traits.List(desc='list of substructures in the src space',
                              mandatory=False)
    all_src_space = traits.Bool(False,
                                desc='if true compute inverse on all \
                                source space',
                                usedefault=True,
                                mandatory=False)
    ROIs_mean = traits.Bool(True,
                            desc='if true compute mean on ROIs',
                            usedefault=True,
                            mandatory=False)
コード例 #27
0
ファイル: model.py プロジェクト: duyong6380/lyman
 class input_spec(TraitedSpec):
     proc_dir = traits.Directory(exists=True)
     subject = traits.Str()
     experiment = traits.Str()
     model = traits.Str()
コード例 #28
0
ファイル: preproc.py プロジェクト: kiani/lyman
 class input_spec(TraitedSpec):
     session = traits.Tuple()
     data_dir = traits.Directory(exists=True)
     proc_dir = traits.Directory(exists=True)
     fm_template = traits.Str()
     phase_encoding = traits.Either("ap", "pa")
コード例 #29
0
ファイル: preproc.py プロジェクト: kiani/lyman
 class input_spec(TraitedSpec):
     subject_id = traits.Str()
     data_dir = traits.Directory(exists=True)
     in_file = traits.File(exists=True)
     cost_file = traits.File(exists=True)
コード例 #30
0
ファイル: model.py プロジェクト: duyong6380/lyman
 class output_spec(TraitedSpec):
     output_path = traits.Directory()