preload long sequence of images #2935
Replies: 1 comment 3 replies
-
Do you have an example of the structure of your csv file? And would it be possible to perhaps create this sequence directly in JavaScript? It is possible to read in a csv file, but in order for that to work your experiment needs to run on a webserver (which can be either on your own computer during testing and debugging, or on a remote server when your experiment goes live). After loading the csv file you will also have to parse it so that you get the information in a format that is proper for your experiment. If you only need a list of numbers, what I typically do is create a small Python script that constructs this sequence, prints it as a string, and put that into a separate JavaScript file which I then read in by including that file into my main experiment. For example: the following would be the content of a script
In the html file of my experiment, before the scipt tags for the jsPsych code, I would include:
Is this something in the direction that you need? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have a collection of a dozen images, that I'd like to pregenerate a long sequence of trials from (N>1000). Ideally, I would read a csv with a list of numbers, that I would use to index a list of stimuli. How would I go about doing this?
Beta Was this translation helpful? Give feedback.
All reactions