stimuli function

Stimulus extraction function