Week 4 Flashcards
How do you manually compute RT?
t1 =now();
awaitkey(‘s,l’);
t2 =now(); RT =t2 -t1;
text(“Yourreactiontime was: “+RT);
Why can you not show a stimulus for 26ms?
becausescreensrefreshat specificrates
–E.g., aboutevery16.7 ms
await() records the intended and actual presentation time, as well as other times
give four of these event variable e structures
● e.intendedTime: the intended waiting time, which is 33 (ms) here ● e.duration: the actual duration of waiting time, which may have been, for example, 34 or 39 (ms) ● e.delta: this is simply e.duration - e.intendedTime, included for convenience ● e.timestamp: low-resolution time in ms that can be converted into a date and time of day
How can you get RT quicker?
e.RT
How do you know which key is pressed?
e.key
What is the difference between log and store?
If you call log(e.RT,”RT”)many times, each time a new line of data is added, The store() function also works in the background, but overwrites its variable in the table.
How may store() be useful?
store(1,”where”); // store bookmark. You can also use retrieve(“where”) to retrieve the last stored value. This is handy because ‘stored()’ values are available even after the subject has moved away from the experiment half-way through.
Sometimes you need to be absolutely surea piece of data is stored, before you want the script to proceed. Use store_now() for that
How does the increase function work?
Increases the valuable of the variable by 1 e.g for assigning subjects to conditions
varsubject_id=increase(“Subject ID”,”script”);
What does the following code do?
b.style(“color”,”grey”);
Make the text colour grey
Why should styles be used sparingly?
There are many subtle differences between browsers’ implementation of styles
Which style is particularly variable and how do you get around this?
font-family is particularly variable (missing fonts will be substituted by others!). Use images of words if you must use a specific font
How do you make a large header within text?
text(“<h1>Instruction</h1>”);
–Opening bracket is like
–Closing bracket is like
Headers: <h1> to </h1><h6>, e.g.,</h6><h3>Medium-size header</h3>
Give some other HTML tags
- Paragraph: <p>my text</p>
- Bold text: <b>bold text</b>•Italics: <i>italics</i>
- Span: <span>does nothing</span>
- Horizontal line: <hr> (N.B. single tag)
- List: <ul> <li>item 1</li> <li> </li></ul>
What does the code
b.style(“opacity”,1);
do?
Makes it completely transparent
How do you change the background colour?
main.style(“body-background-color”,”black”);