psychopy-neuroplaypro-neurolab 0.0.3__py3-none-any.whl → 0.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  from psychopy.plugins import Plugin
2
2
  from psychopy.experiment.components import registerComponent
3
- from psychopy_neuroplaypro.component import NeuroPlayComponent
3
+ from psychopy_neuroplaypro_neurolab.components.neuroplay import NeuroPlayComponent
4
4
 
5
5
  class NeuroPlayPlugin(Plugin):
6
6
  def onLoad(self):
7
7
  registerComponent("NeuroPlay", NeuroPlayComponent)
8
- print("✅ NeuroPlay plugin loaded")
8
+ print("✅ NeuroPlay component registered")
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: psychopy-neuroplaypro-neurolab
3
+ Version: 0.0.5
4
+ Summary: Plugin for integrating NeuroPlayPro EEG recording in PsychoPy Builder.
5
+ Author-email: Enicast <enicaster@gmail.com>
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: psychopy
10
+ Dynamic: license-file
11
+
12
+ # PsychoPy NeuroPlay Plugin
13
+
14
+ Component for controlling NeuroPlayPro EEG recording from PsychoPy Builder experiments.
15
+ - Start recording when the component starts
16
+ - Stop recording when the component ends
17
+ - Choose folder and filename prefix
18
+ - Auto-add timestamp if needed
@@ -0,0 +1,8 @@
1
+ psychopy_neuroplaypro_neurolab/__init__.py,sha256=fd3Mi-jIseuqbdbmJqsB86t7nxhkg2fq0l3P4OiboA0,87
2
+ psychopy_neuroplaypro_neurolab/plugin.py,sha256=4-NyZjmnUGtg3dZEkXfsYgjLDPHcNhOYwH_uTx9ieNc,345
3
+ psychopy_neuroplaypro_neurolab-0.0.5.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ psychopy_neuroplaypro_neurolab-0.0.5.dist-info/METADATA,sha256=Kmg9FHW3V_aR0WF6bxB-QeK9Z_xVlhPXhIqW4n51AOY,599
5
+ psychopy_neuroplaypro_neurolab-0.0.5.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
6
+ psychopy_neuroplaypro_neurolab-0.0.5.dist-info/entry_points.txt,sha256=0VDQ3hVJwOgHdb8ZSUpvIF8JZSgik9Gn2uu9H78IXFk,85
7
+ psychopy_neuroplaypro_neurolab-0.0.5.dist-info/top_level.txt,sha256=mbHktuA5YpOE3G2X-JWuUqqCKZtXNJ5CY4aPqRxJMRI,31
8
+ psychopy_neuroplaypro_neurolab-0.0.5.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [psychopy.plugins]
2
+ neuroplay = psychopy_neuroplaypro_neurolab.plugin:NeuroPlayPlugin
@@ -0,0 +1 @@
1
+ psychopy_neuroplaypro_neurolab
@@ -1,26 +0,0 @@
1
- from psychopy.experiment.components.basecomponent import BaseComponent
2
- import os
3
-
4
- class NeuroPlayComponent(BaseComponent):
5
- categories = ['EEG']
6
- iconFile = os.path.join(os.path.dirname(__file__), 'resources', 'icon.png')
7
-
8
- def __init__(self, exp, parentName, name='neuroplay',
9
- saveFolder='data', filePrefix='recording', autoTimestamp=True,
10
- startType='time (s)', startVal='0', stopType='duration (s)', stopVal=''):
11
- super().__init__(exp, parentName, name=name,
12
- startType=startType, startVal=startVal,
13
- stopType=stopType, stopVal=stopVal)
14
- self.type = 'NeuroPlay'
15
- self.url = "http://127.0.0.1:2336"
16
- self.order += ['saveFolder', 'filePrefix', 'autoTimestamp']
17
- self.params['saveFolder'] = {'val': saveFolder, 'valType': 'code', 'updates': 'constant', 'hint': 'Folder to save EEG data'}
18
- self.params['filePrefix'] = {'val': filePrefix, 'valType': 'code', 'updates': 'constant', 'hint': 'Filename prefix'}
19
- self.params['autoTimestamp'] = {'val': autoTimestamp, 'valType': 'bool', 'updates': 'constant', 'hint': 'Append timestamp to filename'}
20
-
21
- def writeRoutineStartCode(self, buff):
22
- buff.writeIndentedLines(f\"\"\"\n# Start NeuroPlay recording\nimport requests, os, datetime\n\"\"\")
23
- buff.writeIndentedLines(f\"\"\"\nsave_folder = {self.params['saveFolder']['val']}\nfile_prefix = {self.params['filePrefix']['val']}\nauto_timestamp = {self.params['autoTimestamp']['val']}\nif auto_timestamp:\n timestamp = datetime.datetime.now().strftime('%Y%m%d_%H%M%S')\n filename = f\"{file_prefix}_{{timestamp}}.edf\"\nelse:\n filename = f\"{file_prefix}.edf\"\nfull_path = os.path.join(save_folder, filename)\n\ntry:\n os.makedirs(save_folder, exist_ok=True)\n response = requests.post('{self.url}', json={{\"command\": \"startRecord\", \"path\": full_path}})\n if not response.ok:\n print(f\"[NeuroPlay] Failed to start: {{response.text}}\")\nexcept Exception as e:\n print(f\"[NeuroPlay] Exception: {{e}}\")\n\"\"\")
24
-
25
- def writeRoutineEndCode(self, buff):
26
- buff.writeIndentedLines(f\"\"\"\n# Stop NeuroPlay recording\ntry:\n response = requests.post('{self.url}', json={{\"command\": \"stopRecord\"}})\n if not response.ok:\n print(f\"[NeuroPlay] Failed to stop: {{response.text}}\")\nexcept Exception as e:\n print(f\"[NeuroPlay] Exception: {{e}}\")\n\"\"\")
@@ -1,9 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: psychopy-neuroplaypro-neurolab
3
- Version: 0.0.3
4
- Summary: NeuroPlay EEG recording plugin for PsychoPy Builder
5
- Author-email: Enicast <enicaster@gmail.com>
6
- Requires-Python: >=3.8
7
- License-File: LICENSE
8
- Requires-Dist: psychopy
9
- Dynamic: license-file
@@ -1,9 +0,0 @@
1
- psychopy_neuroplaypro/__init__.py,sha256=fd3Mi-jIseuqbdbmJqsB86t7nxhkg2fq0l3P4OiboA0,87
2
- psychopy_neuroplaypro/component.py,sha256=ZS84qevNqBJBMp9iwiKvm0631aMVWaJikq-DoEEnvOw,2472
3
- psychopy_neuroplaypro/plugin.py,sha256=OcVKwjRk8TFbqtGRclwsEuWdlDXI2gdf6sLv9G4jRWc,318
4
- psychopy_neuroplaypro_neurolab-0.0.3.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- psychopy_neuroplaypro_neurolab-0.0.3.dist-info/METADATA,sha256=hCDIkyWbC1IEEIaX-CtOPJc2BwhU7Uk5NfO9lOp7WDo,270
6
- psychopy_neuroplaypro_neurolab-0.0.3.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
7
- psychopy_neuroplaypro_neurolab-0.0.3.dist-info/entry_points.txt,sha256=wN4RTZ4kOCrKFoQrhq-pqtiMgYNrM4RtuWoYQX0i8S0,76
8
- psychopy_neuroplaypro_neurolab-0.0.3.dist-info/top_level.txt,sha256=yFmWoUXUcLuorBVd9lVUWwjDmk9sIHoKXW8QhBO5NLI,22
9
- psychopy_neuroplaypro_neurolab-0.0.3.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [psychopy.plugins]
2
- neuroplay = psychopy_neuroplaypro.plugin:NeuroPlayPlugin
@@ -1 +0,0 @@
1
- psychopy_neuroplaypro