Try OSWeb 1.4 with new features for online experiments!
(Update August 31: the latest prerelease is now 3.3.10a14.)
OSWeb 1.4 will be released soon. This is a substantial update with many new features for online experiments.
New features:
- Many improvements to the inline_javascript item to bring it closer to the Python API:
- Canvas support for programmatically creating displays
- Common functions such as
xy_circle()
pool
object for access to the file poolpersistent
object for sharing variables and functions between scripts
- Support for
.csv
files as source for loop tables - Support for all color specifications, including HSL, HSV, and LAB color spaces
- Support for form plugins (except
form_base
) - Support for custom HTML forms through the new
inline_html
item - Customizable welcome text (on the first screen that is shown)
OSWeb 1.4 will be officially released together with OpenSesame 3.3.10. But you can already try it now, thus helping us by finding any remaining bugs, and helping yourself by being among the first to get your hands on this cool new functionality!
How to update to OSWeb 1.4?
If you're using Windows, the easiest way to get OSWeb 1.4 is by downloading the latest prerelease of OpenSesame 3.3.10:
For other operating systems, including Mac OS, you can update the OSWeb extension in your existing OpenSesame installation. You can do this with pip
(you may need to prefix pip
with !
when running from the OpenSesame console):
!pip install opensesame-extension-osweb --upgrade !pip install opensesame-extension-osweb --upgrade --user # doesn't need admin rights
Or with conda
:
!conda update opensesame-extension-osweb -y -c cogsci
Ubuntu users can install the latest (testing) versions of OSWeb and other packages through the Rapunzel PPA:
sudo add-apt-repository ppa:smathot/rapunzel sudo apt-get update
For more information about how to update packages in OpenSesame, see:
Comments
Fantastic new features - thank you Seb! ๐
Tested
forms
and they worked perfectly!Is there any documentation on how to use the
pool
object and thepersistent
object by any chance?Many thanks,
Bo
Hi @boyao , glad to hear it works for you! There is some limited documentation for
pool
andpersistent
on this page:Check out SigmundAI.eu for our OpenSesame AI assistant!
That is great! Does this version also allow to change the source file of a loop using JavaScript? In an online experiment, I would like to pick a pseudo-random trial sequence (say 1 out of 24 files generated in Excel) and the [] notation seems not to be allowed for the file name field of a loop.
@HenkvanSteenbergen Yes, you can. The
[var_name]
notation also works forloop
sources (if it appears not to, then that must be because of something different), so you can specify theloop
source by setting a variable in aninline_javascript
item.Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi @sebastiaan,
Love the new features! Thanks for this!
I understand documentation is limited at the moment and that it's a pre-release. I was wondering whether you could give me a hint on how to go about modifying the welcome screen, though. Would love to give it a go (happy to report my experience here for other users).
Best,
Fabrice.
Hi @HenkvanSteenbergen,
Following up on Sebastian's reply, you can indeed select a csv file at random and use it as the source of a loop. Here's how to do it practically.
First, ensure that your csv files are loaded in the pool.
Use Javascript to select a digit at random (here I'm picking a digit between 1 and 5; you could of course easily change that to 1 and 24):
Once you've defined
stimfile
as the variable containing the name of the file to use as the source, you can use the[ ]
method like so:Make sure that the headers in your csv files match the names you use when setting up the objects to to be presented in your sequence:
That's it!
You can download my example here:
I hope this helps. Hopefully it'll help you work out why it is not working in your task (using your browser's console or the debugger can be very useful to find the origin of the problem).
Good luck!
Fabrice.
_____________________________________________________________________________________
If you found my reply helpful and wish to invite me to a coffee, you can do so here ๐: https://www.buymeacoffee.com/psyfab
Dear @sebastiaan,
I have a question about exporting my experiment to Jatos if my experiment procedure has an inline script? When I check on my compatibility, it was showed item_inline script is not supported, is there any suggestion for me to solve this issue?
Best,
TZ
Hi @Tzlim,
OsWeb is based on javascript, not Python, therefore you cannot use the regular python inline_script. Fortunately, since OSWeb, the
inline_javascript
is quite powerful and can do many things that the python inline_script can do.So in order to migrate your experiment to the web, you need to translate the the python bits to javascript bits. Check out the documentation. There is a lot of very useful information on how to go about it.
Hope this helps,
Eduard
ps, if you have specific issues with your experiments and the adjustments to osweb-compatibility, it is better to open a dedicated discussion for it, rather than replying to this announcement-type discussion.