experiment

Experiment workflow and design.

class axopy.experiment.Experiment(daq=None, data='data', subject=None, allow_overwrite=False)[source]

Experiment workflow manager.

Presents the researcher with a prompt for entering session details and then presents the appropriate tasks.

Parameters:
  • daq (object, optional) – A data acquisition device that follows the AxoPy DAQ protocol. See axopy.daq. For mutliple devices, a dictionary, list or tuple is expected.

  • data (str, optional) – Path to the data. The directory is created for you if it doesn’t exist.

  • subject (str, optional) – The subject ID to use. If not specified, a configuration screen is shown before running the tasks so you can enter it there. This is mostly for experiment writing (to avoid the extra configuration step).

  • allow_overwrite (bool, optional) – If True, overwrite protection in Storage is disabled. This is mostly for experiment writing purposes.

configure(**options)[source]

Configure the experiment with custom options.

This method allows you to specify a number of options that you want to configure with a graphical interface prior to running the tasks. Use keyword arguments to specify which options you want to configure. The options selected/specified in the graphical interface are then returned by this method so that you can alter setup before running the experiment.

Each keyword argument should list the data type to configure, such as float, str, or int. You can also provide a list or tuple of available choices for that option.

You do not need to add an option for the subject name/ID – that is added automatically if the subject ID was not specified when creating the experiment.

run(*tasks)[source]

Run the experimental tasks.