First, most people who use PEBL are aware of the launcher. This is a little front-end that assembles the right command-line arguments. It looks something like this:
The launcher defaults to running in the pebl-exp.XX directory, and will be default have some options filled in. By default, this leaves a lot of room for error, especially if your experiment is run by volunteer undergraduates who may not be aware of everything they should. Also, many of the PEBL test battery experiments override settings in the launcher, like subject code and screen resolution. I think of the launcher as sort of an easy way to navigate PEBL programs, but I actually never use to to run studies themselves.
Tweaking the Launcher
Before telling you how I do it, let me first mention that some of the initial settings of the launcher can be specified in a config file, taking away some of the guesswork. The file pebl-init.txt contains
C:\Program Files\PEBL\bin\pebl.exe
C:\Documents and Settings\username\My Documents\pebl-exp.0.09
Condition|0
The first line specifies where it should look for the PEBL executable. The second specifies which directory it should start in. If you have a particular experiment you are running, you can make a copy of the pebl-init.txt file, change line 2, and copy it to the directory of your script. Then make a windows shortcut to launch in that directory, and you can reduce some of the guesswork. Also, specifying further lines like Condition|0 can feed different command-line arguments into PEBL, in case you want to specify a condition at the outset.C:\Documents and Settings\username\My Documents\pebl-exp.0.09
Condition|0
Running when not installed
Sometimes experimenters have access to computer labs to run subjects, but cannot actually install software. Luckily, PEBL does not actually need to be 'installed' to run--you can create a .zip archive that gets copied to the desktop (or stays on a flash drive) and runs from there. Right now, I don't offer a stand-alone .zip of PEBL that can do this, so you would first need to install PEBL with the normal installation program. Here are the steps to make a stand-alone:
- Install PEBL
- Create a folder somewhere, called something like "runexp"
- Copy (don't move--copy it) the folder c:\Program Files\pebl into runexp
- Move your experiment file into the runexp folder
- Create a launcher shortcut and pebl-init.txt (as above) or a run.bat file (as below) to launch your program.
- (optional) Right-click on the runexp folder and choose Send To > Compressed (zipped) Folder
- Now, you can move the runexp.zip folder to any other computer, unzip it, and it should run just fine.
Avoiding the Launcher
When running PEBL for actual experiments, I almost never use the launcher. Instead, I run directly from a .bat file, and make sure any condition/subject information is entered at the beginning of the experiment using things like GetSubNum() and GetEasyInput(). Creating a .bat file is really easy. First, right click in the folder and choose New>Text Document, then rename it to something like run.bat. It will ask you if you are sure you want to rename the file. Say yes. If you have file extensions turned off, you probably won't see the .bat, but the icon will change to the type seen in the window above.
Next, edit the .bat file using wordpad (right-click > edit). Copy the following into the file:
"c:\Program Files\pebl\pebl.exe" experiment.pbl
Then save, and you are ready to roll. Once you are happy with the experiment, you can change this to:
"c:\Program Files\pebl\pebl.exe" experiment.pbl --fullscreen
Which will run the experiment fullscreen. Remember that ctrl-alt-shift-\ is the secret key combo to abort a PEBL experiment in fullscreen mode. If you are creating a specific folder on the desktop to run PEBL from, you can do:
"PEBL\pebl.exe" experiment.pbl
Also, for the scripts that allow you to specify a user translation, you can do something like:
"c:\Program Files\pebl\pebl.exe" experiment.pbl --language "ES"
So that you don't have to enter this in each time.
Finally, you can use this trick to run multiple experiments in sequence, or make backups of data to a server or archive directory, and so on. Just copy multiple lines into the file
"c:\Program Files\pebl\pebl.exe" experiment1.pbl
"c:\Program Files\pebl\pebl.exe" experiment2.pbl
copy exp-out*.txt archive\
So, these are just a few ways of using PEBL in a lab situation that offer better control over the results.
3 comments:
:D Thanks a bunch. This will make my life a WHOLE lot easier...
Thank you so much for this helpful post!
This post was very helpful - thank you! Katerina
Post a Comment