Difference between revisions of "Ultrasession in opensesame"

From Phonlab
Jump to navigationJump to search
m
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
   
  +
These steps are followed in the sample experiment available on github. See the test experiment provided in [https://github.com/rsprouse/ultracomm/releases the latest release].
 
  +
== Sample experiment ==
  +
 
The steps shown above are followed in a sample experiment available on github. See the test experiment provided in [https://github.com/rsprouse/ultracomm/releases the latest release].
  +
  +
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:

  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 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 this 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 by 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.