Difference between revisions of "Ultrasession in opensesame"
From Phonlab
Jump to navigationJump to searchm |
|||
Line 9: | Line 9: | ||
## <code>ultrasession.py</code> is sent a signal to stop acquisition |
## <code>ultrasession.py</code> is sent a signal to stop acquisition |
||
+ | |||
⚫ | |||
+ | == Sample experiment == |
||
+ | |||
⚫ | |||
+ | |||
+ | The sample experiment relates to the steps as follows: |
||
+ | |||
+ | * the <code>ultrasound_arguments</code> defines variables related to data acquisition. The most important variables to change are <code>myparams</code>, which points to your imaging parameters file, and <code>datadir</code>, which is the parent directory for your timestamped acquisitions. In the Phonology Lab this should be somewhere on the <code>U:</code> drive. Set <code>do_log</code> to <code>True</code> if you want <code>ultracomm</code> to produce a detailed log of its activity. |
||
+ | |||
+ | * the <code>init_ultrasound</code> inline script initializes the Ultrasonix system. You should not need to make any changes to this script. |
||
+ | |||
+ | * the <code>stimuli</code> object contains a list of prompts to display to the subject. The prompts are provided by the <code>stimulus</code> variable, and it will be simplest if you give your variable the same name. |
||
+ | |||
+ | * the <code>display_word_prep</code> object shows the prepartory prompt to the subject. Customize a display for your own needs. |
||
+ | |||
+ | * the <code>run_ultrasession</code> inline script starts <code>ultrasession.py</code> and waits until the ultrasound system has confirmed it is imaging. You should not need to change this script unless you did not name your prompt variable <code>stimulus</code>. |
||
+ | |||
+ | * the <code>display_word_while_acquiring</code> object displays the acquisition prompt to the subject. Customize this display for your own needs. It can end after a duration of your choosing, or on a keypress. |
||
+ | |||
+ | * the <code>stop_acquisition</code> inline script terminates <code>ultrasession.py</code>. You should not need to change this script. |
Revision as of 15:14, 18 August 2015
The recommended way to acquire ultrasound data in the Phonology Lab is via an Opensesame experiment. You can use Opensesame to display a series of prompts to a subject and run and control the acquisition utilities in inline scripts. A simple experiment proceeds like this:
- variables related to data acquisition are set
- the ultrasound acquisition system is initialized
- the experiment loops over a list of stimuli, which are used to prompt the subject
- a preparatory prompt is shown to the subject
ultrasession.py
is started and delays until the ultrasound system confirms that it is imaging- a speaking prompt is shown to the subject. This prompt can be shown for a defined duration, or it can be displayed until the subject presses a key.
ultrasession.py
is sent a signal to stop acquisition
Sample experiment
The steps shown above are followed in a sample experiment available on github. See the test experiment provided in the latest release.
The sample experiment relates to the steps as follows:
- the
ultrasound_arguments
defines variables related to data acquisition. The most important variables to change aremyparams
, which points to your imaging parameters file, anddatadir
, which is the parent directory for your timestamped acquisitions. In the Phonology Lab this should be somewhere on theU:
drive. Setdo_log
toTrue
if you wantultracomm
to produce a detailed log of its activity.
- the
init_ultrasound
inline script initializes the Ultrasonix system. You should not need to make any changes to this script.
- the
stimuli
object contains a list of prompts to display to the subject. The prompts are provided by thestimulus
variable, and it will be simplest if you give your variable the same name.
- the
display_word_prep
object shows the prepartory prompt to the subject. Customize a display for your own needs.
- the
run_ultrasession
inline script startsultrasession.py
and waits until the ultrasound system has confirmed it is imaging. You should not need to change this script unless you did not name your prompt variablestimulus
.
- the
display_word_while_acquiring
object displays the acquisition prompt to the subject. Customize this display for your own needs. It can end after a duration of your choosing, or on a keypress.
- the
stop_acquisition
inline script terminatesultrasession.py
. You should not need to change this script.