diff --git a/pyproject.toml b/pyproject.toml index 9c77280..db44c5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - ] +] dependencies = [ "psychopy", # to inspect the API @@ -100,4 +100,12 @@ getter = "psychopy.__init__:getVersion" universal = 1 [tool.psychopy-docs] -src = ["psychopy-docs"] \ No newline at end of file +src = ["psychopy-docs"] + +[tool.setuptools] +packages = [ + "psychopy_docs" +] + +[tool.setuptools.package-dir] +psychopy_docs = "utils" \ No newline at end of file diff --git a/source/builder/components/EyetrackerMarkerComponent.rst b/source/builder/components/EyetrackerMarkerComponent.rst new file mode 100644 index 0000000..abfd269 --- /dev/null +++ b/source/builder/components/EyetrackerMarkerComponent.rst @@ -0,0 +1,70 @@ +.. _eyetrackermarkercomponent: + +------------------------------- +Eyetracker Marker Component +------------------------------- + +Add a text marker in the hdf5 file + +Categories: + Eyetracking +Works in: + PsychoPy + +**Note: Since this is still in beta, keep an eye out for bug fixes.** + +Parameters +------------------------------- + +Basic +=============================== + +The required attributes of the stimulus, controlling its basic function and behaviour + + +.. _eyetrackermarkercomponent-startVal: +Send when... + When the Eyetracker Marker Component should start, see :ref:`startStop`. + +.. _eyetrackermarkercomponent-startEstim: +Expected start (s) + If you are using frames to control timing of your stimuli, you can add an expected start time to display the component timeline in the routine. + +.. _eyetrackermarkercomponent-startType: +Start type + How do you want to define your start point? + + Options: + + * time (s) + + * frame N + + * condition + +.. _eyetrackermarkercomponent-durationEstim: +Expected duration (s) + If you are using frames to control timing of your stimuli, you can add an expected duration to display the component timeline in the routine. + +.. _eyetrackermarkercomponent-message: +Text + Text to send to the eyetracker (128 characters max) + +.. _eyetrackermarkercomponent-category: +Category + Optional grouping text for the message (32 characters max) + +Data +=============================== + +What information about this Component should be saved? + + +.. _eyetrackermarkercomponent-saveStartStop: +Save onset/offset times + Store the onset/offset times in the data file (as well as in the log file). + +.. _eyetrackermarkercomponent-syncScreenRefresh: +Sync timing with screen refresh + Synchronize times with screen refresh (good for visual stimuli and responses based on them) + \ No newline at end of file diff --git a/utils/components.py b/utils/components.py index 6c9b9e2..10911f0 100644 --- a/utils/components.py +++ b/utils/components.py @@ -79,14 +79,15 @@ def createFromTemplate(cls): categs = OrderedDict() for ref, param in comp.params.items(): # make sure categ exists - if param.categ not in params: - params[param.categ] = [] - # give categ a description if available - categs[param.categ] = "" - for srcFile in (__folder__ / "categHints").glob(param.categ + ".rst"): - categs[param.categ] = srcFile.read_text(encoding="utf-8") - # sort by category - params[param.categ].append(param) + if param.categ: + if param.categ not in params: + params[param.categ] = [] + # give categ a description if available + categs[param.categ] = "" + for srcFile in (__folder__ / "categHints").glob(param.categ + ".rst"): + categs[param.categ] = srcFile.read_text(encoding="utf-8") + # sort by category + params[param.categ].append(param) # store ref param.ref = ref # make sure allowedLabels/Vals is a list of strings