Difference between revisions of "Ultrasession in opensesame"

From Phonlab
Jump to navigationJump to search
Line 20: Line 20:
 
* the <code>init_ultrasound</code> inline script initializes the Ultrasonix system. You should not need to make any changes to this script.
 
* 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>stimuli</code> object contains a list of prompts to display to the subject. The prompts are provided in 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>display_word_prep</code> object shows the prepartory prompt to the subject. Customize a display for your own needs.

Revision as of 16:16, 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:

  1. variables related to data acquisition are set
  2. the ultrasound acquisition system is initialized
  3. the experiment loops over a list of stimuli which are used to prompt the subject
    1. a preparatory prompt is shown to the subject
    2. ultrasession.py is started and delays until the ultrasound system confirms that it is imaging
    3. 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.
    4. 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 inline script defines variables related to data acquisition. The most important variables to change are myparams, which points to your imaging parameters file, and datadir, which is the parent directory for your timestamped acquisitions. In the Phonology Lab the datadir should be somewhere on the U: drive. Set do_log to True if you want ultracomm 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 in the stimulus 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 starts ultrasession.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 variable stimulus.
  • 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 terminates ultrasession.py. You should not need to change this script.