pliers.stimuli.load_stims

pliers.stimuli.load_stims(source, dtype=None, fail_silently=False)[source]

Load one or more stimuli directly from file, inferring/extracting metadata as needed.

Parameters
  • source (str or list) – The location to load the stim(s) from. Can be the path to a directory, to a single file, or a list of filenames.

  • dtype (str) – The type of stim to load. If dtype is None, relies on the filename extension for guidance. If dtype is provided, must be one of ‘video’, ‘image’, ‘audio’, or ‘text’.

  • fail_silently (bool) – If True do not raise error when trying to load a missing stimulus from a list of sources.

Returns: A list of Stims.