Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
smathot committed Apr 30, 2024
1 parent d151342 commit 1b9cce1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 0 deletions.
Binary file modified .db.cache/index.faiss
Binary file not shown.
Binary file modified .db.cache/index.pkl
Binary file not shown.
2 changes: 2 additions & 0 deletions sources/jsonl/howtos.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
{"content": "To change the language of the user interface in OpenSesame:\n\n1. Go to Menu \u2192 Tools \u2192 Preferences.\n2. In the Preferences window, select the 'Common settings' tab.\n3. In the section 'Application appearance', under 'Language', choose your desired language from the dropdown menu.\n4. The '[Default]' language corresponds to the language of the operating system.\n5. Restart OpenSesame to have the change take effect.", "url": null, "title": "How to change the language in OpenSesame"}
{"content": "When an OSWeb experiment doesn't run as expected, there are a few things that you can do:\n\n1. Make sure that you are running the latest versions of OpenSesame and OSWeb. OpenSesame 4 has an automatic updater, which will notify you of any available updates. This notification may take a few minutes to appear after you have started OpenSesame.\n2. Check for error messages in the browser console. See also: <https://osdoc.cogsci.nl/4.0/manual/debugging/>\n3. Make sure that your experiment is compatible with OSWeb. See also: <https://osdoc.cogsci.nl/4.0/manual/osweb/osweb/>", "url": null, "title": "How to debug errors when running an experiment in a browser with OSWeb"}
{"content": "To provide feedback by showing an image after a response:\n\n1. Insert a KEYBOARD_RESPONSE item in the *trial_sequence* to collect a key press.\n2. In the \"Allowed responses\" field of the KEYBOARD_RESPONSE, specify which keys should be accepted. This should be a semicolon-separated list, for example \"left;right\".\n3. After the KEYBOARD_RESPONSE, insert one SKETCHPAD item for each feedback image that might be presented. For example, you might create a *left_sketchpad* item that shows the image `left_feedback.png`, and a *right_sketchpad* item that shows the image `right_feedback.png`. The image files should be in the file pool.\n4. In the *trial_sequence*, use Run-If expressions to determine which item should be run on a given trial: `response == \"left\"` for *left_sketchpad* and `response == \"right\"` for *right_sketchpad*. The `response` variable is automatically set by the KEYBOARD_RESPONSE item.", "url": null, "title": "How to give feedback by showing an image after a response, with the specific image depending on which key was pressed"}
{"content": "The data structure used by LOOP items is a DataMatrix, which is an alternative to pandas DataFrame and a bit more light-weight and intuitive. If you want to use a pandas DataFrame to populate a LOOP table, you first need to convert it to a DataMatrix, and then assign it to the `dm` property of the LOOP item. You need to do this in the Prepare phase of an INLINE_SCRIPT that comes before the LOOP item that it modifies.\n\n```python\nimport pandas as pd\nfrom datamatrix import convert as cnv\n\n# Create a dummy DataFrame with two rows and one column called `cond`\ndf = pd.DataFrame(data=dict(cond=['a', 'b']))\n# Convert the DataFrame to a DataMatrix and assign it to the loop table of\n# the block_loop item\nitems['block_loop'].dm = cnv.from_pandas(df)\n```", "url": null, "title": "How to use a pandas DataFrame for the loop table"}
{"content": "OSWeb requires WebGL, which is a technology for rendering visual stimuli in a browser. If your browser or operating system does not support WebGL, the experiment will not run. Usually, you will see an error message stating that \"Your browser does not support WebGL\". Sometimes you will simply see a blank screen, in which case you can check the browser console for specific error messages.", "url": null, "title": "How to fix a blank screen or \"Your browser does not support WebGL\" message when starting an OSWeb experiment in a browser"}
{"content": "To add line breaks in OpenSesame text:\n\n1. Open the item (e.g., sketchpad, form_text_input, etc.) where you want to add line breaks.\n2. When entering text, you can typically enter multiple lines in the text input, and line breaks will be automatically inserted.\n3. When editing the script of an item, you need to manually indicate line breaks as shown below.\n4. In the item script, locate the text field where you need to insert line breaks.\n5. To add a line break, use the HTML tag `<br>` at the point where you want the text to start on a new line.\n6. If you need multiple consecutive line breaks, use multiple `<br>` tags.\n7. Save the changes to the item.\n8. Run the experiment to verify that the line breaks appear as expected.\n\nImportant side note: When running an experiment on the desktop, long lines are automatically wrapped so that they run out of the screen. However, when running an experiment in a browser with OSWeb, this doesn't happen, and you need to explicitly indicate line breaks to avoid lines from running out of the screen.", "url": null, "title": "How to add line breaks in OpenSesame text"}
{"content": "OpenSesame supports regular HTML formatting for text. To format text in OpenSesame using HTML tags:\n\n1. Identify the item (e.g., sketchpad, form_text_input, etc.) where you want to format the text.\n2. Use the appropriate HTML tags to format the text:\n - For bold text, use `<b>text</b>`\n - For italic text, use `<i>text</i>`\n - For underlined text, use `<u>text</u>`\n - For text color, use `<span style=\"color: red;\">text</span>` (replace \"red\" with the desired color)\n3. Apply the HTML tags around the text you want to format.\n4. Save the changes to the item.\n5. Run the experiment to verify that the text formatting appears as expected.", "url": null, "title": "How to format text in OpenSesame using HTML tags"}
{"content": "OpenSesame assumes that text is encoded in UTF-8 format and also uses UTF-8 for the log file.\n\nIf you find that text from a file, for example a source file for a LOOP table, is incorrectly encoded (because non-ASCII characters are not shown correctly), this generally means that the file uses a different file encoding. In that case, change the character encoding of the file to UTF-8, which is something that most text editors allow you to do. \n\nSimilarly, if you open an OpenSesame log file and find that it is incorrectly encoded (because non-ASCII characters are not shown correctly), indicate in the text editor or spreadsheet that the file is encoded using UTF-8.\n\nCharacter-encoding issues are especially common on Windows, because most versions of Windows do not use UTF-8 encoding by default.", "url": null, "title": "How to debug text encoding issues in OpenSesame"}
Expand Down

0 comments on commit 1b9cce1

Please sign in to comment.