Skip to content

Instantly share code, notes, and snippets.

@kylerbrown
Created May 29, 2016 18:53
Show Gist options
  • Save kylerbrown/a0bb13aee844e4516753e6464ebea56d to your computer and use it in GitHub Desktop.
Save kylerbrown/a0bb13aee844e4516753e6464ebea56d to your computer and use it in GitHub Desktop.
a script to use jstim for overnight acoustic stimulation experiments
#!/bin/bash
## stim.sh ##
# a script to use jstim for overnight stimulation experiments
# move to source directory
cd "$(dirname "$0")" || exit
d=$(date +%Y%m%d_%H%M%S)
## examples for 9hr, overnight experiments:
# with two stimuli, 230 repeats is 8.3 hours of stimulation
# >>> 2*230*65/60/60.
# 8.3
# for three stimuli, 150 reps is reasonable.
#>>> 3*150*65/60./60
# 8.125
nreps=150
stimuli="*.wav" #specify stimulus files by name, or "*.wav" for all wav files in the same folder as this script.
/usr/local/bin/jstim $stimuli -o system:playback_1 -o system:playback_2 -o system:playback_3 --pulse system:playback_5 -g 60 -r $nreps -S &> stim_$d.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment