Forum Replies Created
-
AuthorPosts
-
Jeremy
KeymasterHi Roberto,
I have not run masked priming myself, but I seem to remember hearing of people doing it with Ibex.
As any javascript-based solution, Ibex, and therefore PennController as well, runs locally, on the client side, which means that quality of connection shouldn’t be an issue, as long as you make sure that all resources are preloaded before running trials.
Then there’s the question of refresh rate. With online experiments, you really have no control over the participant’s monitor, but I doubt many people run under 60Hz nowadays, which still gives you a 16ms time window theoretically, it’s not bad.
Then enters the question of performance, and the question of alignment between your script’s frame-rate and the monitor’s refreshing cycle. PennController’s Timer elements currently use JavaScript’s setTimeout function which is far from perfect and can be problematic for highly accurate measures. I wouldn’t rely on it if you need to compose with time windows under about 30ms (missing one refresh rate, you get 2 times 16ms = 32ms). Note that you can estimate how much time really elapsed if you call .settings.log() on your Timer and then look at the difference between the timestamps of the results lines corresponding to the Start and End events.
A better solution might be to rely on JavaScript’s requestAnimationFrame function, which I plan on using instead of setTimeout for Timer elements in future releases of PennController. I could prioritize working on this feature if you think the current Timer element will give you too poor performances regarding your masked priming needs.
In any case, it’s always a good idea to pilot this kind of things first. I would say, if you think you’d be fine with time windows between 40ms and 60ms, then maybe try to run a few participants and look at the actual data. The considerations above hold true of any javascript-based solution.
Let me know if you have any questions.
Best,
Jeremy-
This reply was modified 6 years ago by
PennController.
-
This reply was modified 6 years ago by
PennController.
-
This reply was modified 6 years ago by
PennController.
Jeremy
KeymasterHi Katya,
Specific requirements for the .zip file are described here:
You also want to make sure that your resource files are at the root of your ZIP file, rather than included in a subfolder.
PennController tries to download the ZIP file in the background at the beginning of the experiment. As this is done automatically via javascript, it is different from a manual download of the ZIP file (hence the need to use the .htaccess method).
And it is also different from accessing non-zipped files, as PennController downloads the zip file into the client’s cache and unzips it there to access the resource files it contains.You can open your browser’s javascript console and refresh the page to look for any CORS related error/warning message: if you see any, it means that something is not right with the .htaccess configuration.
Let me know if the problem persists.
Best,
JeremyJeremy
KeymasterHi Camilo,
1. Have you tried placing your images in
~/Sites/
as well?2. The errors could be due to hidden files in chunk_includes. On Mac, Finder automatically generates .DS_Store in some folders, which usually causes Ibex to crash. I usually solve the problem in the Terminal, I move to the chunk_includes folder and I type
rm .DS_Store
.This is an archive of the experiment I successfully ran on my Mac, if you want to try it yourself (and/or copy the
server.py
file in case you have doubts on the edits I describe in my previous message):
https://www.dropbox.com/s/x62tvt20e775i8m/ibex-local.zip?dl=0-
This reply was modified 6 years ago by
PennController.
Jeremy
KeymasterHi Roberto,
When I try to use your
PreloadZip
command with the URL that you give, my browser gives me a CORS error, suggesting that there might be a problem with your .htaccess configuration. Did you make sure that the .htaccess file is in the exact same folder as your zip file? (i.e. https://sprouse.uconn.edu/downloads/syllabicity/)
Also, did you check that your file is indeed named .htaccess and has no extension that could be hidden when you’re browsing your files? For example, if you created it using a text editor, it could be that its actual name is .htaccess.txt. The initial.
is necessary as well.A note on
PennController.CheckPreloaded
: this command creates a trial labeled unlabeled by default. You must indicate when in your sequence the CheckPreloaded trial should appear (i.e. at what point in the experiment it becomes crucial that the resources are preloaded before proceeding). If you want to use a specific label, use thelabel
command.Jeremy
KeymasterHi Roberto,
1. Have you taken a look at the Aesthetics page in the documentation? If you’re trying to apply general aesthetics (i.e. something that would apply to more than one trial) I would use the PennController.css solution described there. You probably want to add margins to the container. Say you name your element
sentence
then you could add something along these lines to PennController.css:.sentence-container { margin: 10px; }
If you want to use
.settings.css
you should use only one of the expressions separated by a slash in the command that you give. If that’s already what you did, then you can try.settings.cssContainer
instead.2. Have you tried using
.settings.size
with the same width on both your Html and your TextInput elements? E.g.PennController( newHtml("explanations", "debriefing.html") .settings.size("40em") .print() , newTextInput("feedback", "") .settings.size("40em") .print() , newButton("continue", "Continue") .print() .wait() )
3. You are correct. If what you want to check is that the textbox contains text, you can use
.testNot.text(/^\W*$/)
on your TextInput PennController element, or if you’d rather have everything in a single HTML file, you can add atextarea
to its content with theobligatory
class (as described in the Ibex documentation manual under Form) and then test your Html PennController element with.test.complete()
(click the link to see an example).Best,
Jeremy-
This reply was modified 6 years ago by
PennController.
Jeremy
KeymasterHi Roberto,
1. Thank you for this question and you feedback about the documentation, I have added a link to an external page listing audio support in HTML5. You surely can use WAV files, which actually appear to be compatible with the most browsers.
2. There currently is no alternative to using your own servers, since download takes place automatically in the background (as opposed to manually, at the initiative of the participant) which requires the servers where the ZIP file is hosted to grant the domain where the experiment is hosted (e.g. spellout.net) such automatic distant access to your ZIP file (e.g. using a .htaccess file, as described in the documentation).
2′. I am sorry if the documentation is unclear: one cannot refer to GDrive/Dropbox folders, but one can directly refer to GDrive/Dropbox files directly (and inidividually) as long as they have a public-access URL. With Dropbox, you can click “Copy Link” next to the file you want to use and replace the
?dl=0
bit at the end with?raw=1
and use the URL in anewImage
,newAudio
ornewVideo
command.Let me know if you have further questions or requests.
Jeremy
-
This reply was modified 6 years ago by
PennController.
Jeremy
KeymasterHi Camilo,
Are you running you IBEX instance on Mac OS? If so, you can place your image and audio files in
/Library/WebServer/Documents/
(or~/Sites/
) and then access it at, e.g.http://localhost/myImage.png
. So this should work:PennController.AddHost("http://localhost/"); PennController( newImage("my image", "myImage.png") .print() , newButton("continue", "Continue") .print() .wait() )
Alternatively you can edit the file
server.py
in your experiment’swww
folder and, below these two lines:if fname.endswith(".wav") or fname.endswith(".mp3") or fname.endswith("m4a"): continue
add
if fname.endswith(".png") or fname.endswith(".jpg") or fname.endswith(".bmp"): continue
And further down, replace this line:
start_response('200 OK', [('Content-Type', 'audio/mpeg'), ('Content-Length', stats.st_size)])
withif qs_hash['resource'][0].endswith(".wav") or qs_hash['resource'][0].endswith(".mp3") or qs_hash['resource'][0].endswith(".m4a"): start_response('200 OK', [('Content-Type', 'audio/mpeg'), ('Content-Length', stats.st_size)]) elif qs_hash['resource'][0].endswith(".png") or qs_hash['resource'][0].endswith(".jpg") or qs_hash['resource'][0].endswith(".bmp"): start_response('200 OK', [('Content-Type', 'image/*'), ('Content-Length', stats.st_size)])
Then you can place your image and audio files (though no OGG file) in chunk_includes and do this:
PennController( newImage("my image", "http://localhost:3000/server.py?resource=myImage.png") .print() , newButton("continue", "Continue") .print() .wait() )
-
This reply was modified 6 years ago by
-
AuthorPosts