1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00
psychojs/docs/module-data.ExperimentHandler.html
2018-11-18 20:37:05 +01:00

1171 lines
15 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: ExperimentHandler</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: ExperimentHandler</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>
<span class="ancestors"><a href="module-data.html">data</a>.</span>ExperimentHandler<span class="signature">(options)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="ExperimentHandler"><span class="type-signature"></span>new ExperimentHandler<span class="signature">(options)</span><span class="type-signature"></span></h4>
<div class="description">
<p>An ExperimentHandler keeps track of multiple loops and handlers. It is particularly useful
for generating a single data file from an experiment with many different loops (e.g. interleaved
staircases or loops within loops.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>psychoJS</code></td>
<td class="type">
<span class="param-type"><a href="PsychoJS.html">PsychoJS</a></span>
</td>
<td class="description last">the PsychoJS instance</td>
</tr>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">name of the experiment</td>
</tr>
<tr>
<td class="name"><code>extraInfo</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">additional information, such as session name, participant name, etc.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line15">line 15</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li>PsychObject</li>
</ul>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addData"><span class="type-signature"></span>addData<span class="signature">(key, value)</span><span class="type-signature"></span></h4>
<div class="description">
Add the key/value pair.
<p> Multiple key/value pairs can be added to any given entry of the data file. There are
considered part of the same entry until a call to nextEntry is made. </p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the key</td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the value</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line104">line 104</a>
</li></ul></dd>
</dl>
<h4 class="name" id="addLoop"><span class="type-signature"></span>addLoop<span class="signature">(loop)</span><span class="type-signature"></span></h4>
<div class="description">
Add a loop.
<p> The loop might be a TrialHandler or a StairHandler, for instance.</p>
<p> Data from this loop will be included in the resulting data files.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>loop</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the loop, e.g. an instance of TrialHandler or StairHandler</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line71">line 71</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getLoopAttributes"><span class="type-signature"></span>getLoopAttributes<span class="signature">(loop)</span><span class="type-signature"></span></h4>
<div class="description">
Get the attribute names and values for the current trial of a given loop.
<p> Only only info relating to the trial execution are returned.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>loop</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the loop</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line243">line 243</a>
</li></ul></dd>
</dl>
<h4 class="name" id="nextEntry"><span class="type-signature"></span>nextEntry<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Inform this ExperimentHandler that the current trial has ended. Further calls to addData
will be associated with the next trial.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line125">line 125</a>
</li></ul></dd>
</dl>
<h4 class="name" id="removeLoop"><span class="type-signature"></span>removeLoop<span class="signature">(loop)</span><span class="type-signature"></span></h4>
<div class="description">
Remove the given loop from the list of unfinished loops, e.g. when it has completed.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>loop</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the loop, e.g. an instance of TrialHandler or StairHandler</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line88">line 88</a>
</li></ul></dd>
</dl>
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">(options)</span><span class="type-signature"></span></h4>
<div class="description">
Save the results of the experiment.
<p> Results are uploaded to the remote PsychoJS manager running on the remote https://pavlovia.org server</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>attributes</code></td>
<td class="type">
<span class="param-type"><a href="PsychoJS.html">PsychoJS</a></span>
</td>
<td class="description last">the attributes to be saved</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line153">line 153</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-core.html">core</a></li><li><a href="module-data.html">data</a></li><li><a href="module-sound.html">sound</a></li><li><a href="module-visual.html">visual</a></li></ul><h3>Classes</h3><ul><li><a href="module-core.BuilderKeyResponse.html">BuilderKeyResponse</a></li><li><a href="module-core.EventManager.html">EventManager</a></li><li><a href="module-core.GUI.html">GUI</a></li><li><a href="module-core.MinimalStim.html">MinimalStim</a></li><li><a href="module-core.Mouse.html">Mouse</a></li><li><a href="module-core.PsychoJS.html">PsychoJS</a></li><li><a href="module-core.ServerManager.html">ServerManager</a></li><li><a href="module-core.Window.html">Window</a></li><li><a href="module-data.ExperimentHandler.html">ExperimentHandler</a></li><li><a href="module-data.TrialHandler.html">TrialHandler</a></li><li><a href="module-sound.Sound.html">Sound</a></li><li><a href="module-sound.TonePlayer.html">TonePlayer</a></li><li><a href="module-sound.TrackPlayer.html">TrackPlayer</a></li><li><a href="module-visual.BaseShapeStim.html">BaseShapeStim</a></li><li><a href="module-visual.BaseVisualStim.html">BaseVisualStim</a></li><li><a href="module-visual.ImageStim.html">ImageStim</a></li><li><a href="module-visual.Rect.html">Rect</a></li><li><a href="module-visual.TextStim.html">TextStim</a></li></ul><h3>Mixins</h3><ul><li><a href="module-core.WindowMixin.html">WindowMixin</a></li></ul><h3>Interfaces</h3><ul><li><a href="module-sound.SoundPlayer.html">SoundPlayer</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Nov 18 2018 20:31:50 GMT+0100 (CET)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>