class_docstr: Determines if stimuli are correlated with motion or intensity
  parameters.
  
  Currently this class supports an SPM generated design matrix and requires
  intensity parameters. This implies that one must run
  :ref:`ArtifactDetect <nipype.algorithms.rapidart.ArtifactDetect>`
  and :ref:`Level1Design <nipype.interfaces.spm.model.Level1Design>` prior to
  running this or provide an SPM.mat file and intensity parameters through
  some other means.
  
  Examples
  --------
  
  >>> sc = StimulusCorrelation()
  >>> sc.inputs.realignment_parameters = 'functional.par'
  >>> sc.inputs.intensity_values = 'functional.rms'
  >>> sc.inputs.spm_mat_file = 'SPM.mat'
  >>> sc.inputs.concatenated_design = False
  >>> sc.run() # doctest: +SKIP
class_docstr_tok: ["Determines","if","stimuli","are","correlated","with","motion","or","intensity","parameters",".","Currently","this","class","supports","an","SPM","generated","design","matrix","and","requires","intensity","parameters",".","This","implies","that","one","must","run",":","ref",":","`","ArtifactDetect","<","nipype.algorithms.rapidart.ArtifactDetect",">","`","and",":","ref",":","`","Level1Design","<","nipype.interfaces.spm.model.Level1Design",">","`","prior","to","running","this","or","provide","an","SPM.mat","file","and","intensity","parameters","through","some","other","means",".","Examples","--","--","--","--",">",">",">","sc","=","StimulusCorrelation","(",")",">",">",">","sc.inputs.realignment_parameters","=","'functional.par'",">",">",">","sc.inputs.intensity_values","=","'functional.rms'",">",">",">","sc.inputs.spm_mat_file","=","'SPM.mat'",">",">",">","sc.inputs.concatenated_design","=","False",">",">",">","sc.run","(",")","#","doctest",":","+SKIP"]
docstr: Generate output files based on motion filenames
  
  Parameters
  ----------
  motionfile: file/string
      Filename for motion parameter file
  output_dir: string
      output directory in which the files will be generated
docstr_tok: ["Generate","output","files","based","on","motion","filenames","Parameters","--","--","--","--","--","motionfile",":","file\/string","Filename","for","motion","parameter","file","output_dir",":","string","output","directory","in","which","the","files","will","be","generated"]
code: def _get_output_filenames(self, motionfile, output_dir):
      """Generate output files based on motion filenames
  
      Parameters
      ----------
      motionfile: file/string
          Filename for motion parameter file
      output_dir: string
          output directory in which the files will be generated
      """
      (_, filename) = os.path.split(motionfile)
      (filename, _) = os.path.splitext(filename)
      corrfile = os.path.join(
          output_dir, "".join(("qa.", filename, "_stimcorr.txt"))
      )
      return corrfile
  
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 1 for calling the StimulusCorrelation obj's underlying member method code with example usage: obj._get_output_filenames(motionfile, output_dir) and returns: corrfile