Neurotask Flashcards
Lecture 2 + 3 (73 cards)
What is the structure of experiment script?
- Welcome the subject
- Ask for informed consent
- Give instructions
- Present stimuli (such as words)
- Record responses (such as words remembered)
- Debrief, where you may thank the subject for participating
what does function ‘‘text’’ do?
it makes words centralized and big (remember to put word into a string “ “)
What is the main function of semicolons?
they enable to perform operations step-by-step
What does await() function?
it gives participant a visual break -> it waits for the number of ms typed in or for example until subjects clicks
what does function clear()?
it clears the text out
what does function largeinput()?
it makes a text field with text to put into brackets, lasts until sb presses okay button
What is the characteristic of code url of participant?
it is unique for each participant = can be used to identify participants
where is the experimental data stored?
in data dashword (export trial data - the one which interest you usually, but you can also export n variables - which gives you much more information)
how to put notes for yourself in the script?
// <- easiest way to do it!
What is the difference between input() and largeinput()?
input() yields single line text box, whereas largeinput() generates large text box, of about 5 rows
What is the default box?
default box is a white box on a white background - called main
it fills the largest possible square on the screen and resizes on window resize
What is the code to change the box color?
there are 2 ways to do it:
1 )var main = new Box(“lightgrey”)
2)var main = new Box(“#d3d3d3”) <- to achieve exact vision you have in mind you can use HEX color codes
What if you want to create sky blue box with orange border on the gray background?
var main = new Box(“skyblue”,”grey”,”red”,
100,40,”orange”,2);
where:
- “skyblue” - color of the box
- “grey” - color of the background
- “red”, 100 - red text, 100% standard font size
- 40 - 40 pixel-wide border
- “orange” - color of the border
- 2 - box has 2% margin inside so it doesn’t touch edges of the box
how to add blocks?
addblock(10,25,80,50, “yellow”, “Carrot”)
it adds yellow block at
- 10% from the left (margin)
- 25% from the top (margin),
- with width of 80% (100 - 10 - 10)
- and height of 50% (100 - 25 -25)
- with text Carrot
How to organize space inside the box?
you can use blocks! you can put any number of blocks inside default box
How to make block centered?
addblock(“center”, “center”, 80, 50, “yellow”, “Carrot”)
it yields the same results as before, but instead of manually calculating margins, you can just use center command
How blocks can be stored?
Blocks can be stored in variables:
var t = addblock (“center”, “top”, 80, 10)
it is advisable because then you can for example apply text function directly to variable:
t.text (“this is experiment”)
What is default color of block?
Block is see-through, but desired colors can be given as 5th argument
How to make font smaller or larger?
main.setfontsize(70); // Sets font-size to 70%
before setting the text function!
How to remove blocks?
removeblock()
if additionally you add parameter true:
main.removeblock(b,true)
the command removes block b from main but doesn’t destroy it!
you can put the block back with function Q.pushblock
how to permanently destroy block?
destroy()
How to clear all contents of box object?
boxclearall()
How to implement pictures into your experiment?
1) preload (“image.png”)
2) image.await(“preloading_completed”)
3) setimage (“image.png”)
Why preloading images is important?
Because normally image needs to be retrieved from the server, then mapped to browser window and then shown = it takes a lot of time
However, with preloading the picture can be put into browser window within 1 second!