class_docstr: Detects outliers in a functional imaging series
  
  Uses intensity and motion parameters to infer outliers. If `use_norm` is
  True, it computes the movement of the center of each face a cuboid centered
  around the head and returns the maximal movement across the centers. If you
  wish to use individual thresholds instead, import `Undefined` from
  `nipype.interfaces.base` and set `....inputs.use_norm = Undefined`
  
  
  Examples
  --------
  
  >>> ad = ArtifactDetect()
  >>> ad.inputs.realigned_files = 'functional.nii'
  >>> ad.inputs.realignment_parameters = 'functional.par'
  >>> ad.inputs.parameter_source = 'FSL'
  >>> ad.inputs.norm_threshold = 1
  >>> ad.inputs.use_differences = [True, False]
  >>> ad.inputs.zintensity_threshold = 3
  >>> ad.run()  # doctest: +SKIP
class_docstr_tok: ["Detects","outliers","in","a","functional","imaging","series","Uses","intensity","and","motion","parameters","to","infer","outliers",".","If","`","use_norm","`","is","True",",","it","computes","the","movement","of","the","center","of","each","face","a","cuboid","centered","around","the","head","and","returns","the","maximal","movement","across","the","centers",".","If","you","wish","to","use","individual","thresholds","instead",",","import","`","Undefined","`","from","`","nipype.interfaces.base","`","and","set","`","....","inputs.use_norm","=","Undefined","`","Examples","--","--","--","--",">",">",">","ad","=","ArtifactDetect","(",")",">",">",">","ad.inputs.realigned_files","=","'functional.nii'",">",">",">","ad.inputs.realignment_parameters","=","'functional.par'",">",">",">","ad.inputs.parameter_source","=","'FSL'",">",">",">","ad.inputs.norm_threshold","=","1",">",">",">","ad.inputs.use_differences","=","[","True",",","False","]",">",">",">","ad.inputs.zintensity_threshold","=","3",">",">",">","ad.run","(",")","#","doctest",":","+SKIP"]
docstr: Execute this module.
docstr_tok: ["Execute","this","module","."]
code: def _run_interface(self, runtime):
      """Execute this module."""
      funcfilelist = ensure_list(self.inputs.realigned_files)
      motparamlist = ensure_list(self.inputs.realignment_parameters)
      for i, imgf in enumerate(funcfilelist):
          self._detect_outliers_core(
              imgf, motparamlist[i], i, cwd=os.getcwd()
          )
      return runtime
  
imports: import os
  from copy import deepcopy
  from nibabel import load, funcs, Nifti1Image
  import numpy
  from ..interfaces.base import BaseInterface, traits, InputMultiPath, OutputMultiPath, TraitedSpec, File, BaseInterfaceInputSpec, isdefined
  from ..utils.filemanip import ensure_list, save_json, split_filename
  from ..utils.misc import find_indices, normalize_mc_params
  from ..None import logging, config
label_desc: Use image node_id 6 for calling the ArtifactDetect obj's underlying member method code with example usage: obj._run_interface(runtime) and returns: runtime