np-services 0.1.65__py3-none-any.whl → 0.1.67__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.
- np_services/scripts/pretest.py +16 -8
- {np_services-0.1.65.dist-info → np_services-0.1.67.dist-info}/METADATA +1 -1
- {np_services-0.1.65.dist-info → np_services-0.1.67.dist-info}/RECORD +5 -5
- {np_services-0.1.65.dist-info → np_services-0.1.67.dist-info}/WHEEL +0 -0
- {np_services-0.1.65.dist-info → np_services-0.1.67.dist-info}/entry_points.txt +0 -0
np_services/scripts/pretest.py
CHANGED
|
@@ -28,7 +28,7 @@ import npc_stim
|
|
|
28
28
|
logger = logging.getLogger()
|
|
29
29
|
|
|
30
30
|
DEFAULT_SERVICES: tuple[np_services.Testable, ...] = (np_services.MouseDirector, )
|
|
31
|
-
DEFAULT_RECORDERS: tuple[np_services.Startable, ...] = (np_services.Sync, np_services.
|
|
31
|
+
DEFAULT_RECORDERS: tuple[np_services.Startable, ...] = (np_services.Sync, np_services.VideoMVR, )
|
|
32
32
|
|
|
33
33
|
@dataclasses.dataclass
|
|
34
34
|
class PretestConfig:
|
|
@@ -49,7 +49,9 @@ class PretestSession(abc.ABC):
|
|
|
49
49
|
return DEFAULT_SERVICES + self.recorders + (self.stim, )
|
|
50
50
|
|
|
51
51
|
@property
|
|
52
|
-
def recorders(self) -> tuple[np_services.Startable, ...]:
|
|
52
|
+
def recorders(self) -> tuple[np_services.Startable, ...]:
|
|
53
|
+
if self.pretest_config.check_barcodes:
|
|
54
|
+
return DEFAULT_RECORDERS + (np_services.OpenEphys, )
|
|
53
55
|
return DEFAULT_RECORDERS
|
|
54
56
|
|
|
55
57
|
@property
|
|
@@ -156,9 +158,11 @@ class DynamicRoutingPretest(PretestSession):
|
|
|
156
158
|
|
|
157
159
|
rig = str(self.rig).replace('.', '')
|
|
158
160
|
locs_root = self.base_path / 'OptoGui' / f'{dirname}'
|
|
159
|
-
|
|
161
|
+
# use any available locs file - as long as the light switches on the
|
|
162
|
+
# values don't matter
|
|
163
|
+
available_locs = sorted(tuple(locs_root.glob(f"{file_prefix}*")), reverse=True)
|
|
160
164
|
if not available_locs:
|
|
161
|
-
raise FileNotFoundError(f"No optotagging locs found
|
|
165
|
+
raise FileNotFoundError(f"No optotagging locs found - have you run OptoGui?")
|
|
162
166
|
return available_locs[0]
|
|
163
167
|
|
|
164
168
|
|
|
@@ -255,10 +259,14 @@ class DynamicRoutingPretest(PretestSession):
|
|
|
255
259
|
self.stim.finalize()
|
|
256
260
|
|
|
257
261
|
def run_pretest_stim(self) -> None:
|
|
258
|
-
self.
|
|
259
|
-
|
|
260
|
-
self.run_script('
|
|
261
|
-
|
|
262
|
+
if self.pretest_config.check_audio:
|
|
263
|
+
print("Starting audio test - check for sound...", end="", flush=True)
|
|
264
|
+
self.run_script('sound_test')
|
|
265
|
+
print(" done")
|
|
266
|
+
print("Starting stim - check for opto, spin wheel and tap lick spout...", end="", flush=True)
|
|
267
|
+
self.run_script('optotagging') # vis stim with opto (for checking vsyncs, running, )
|
|
268
|
+
print(" done")
|
|
269
|
+
|
|
262
270
|
def configure_services(self) -> None:
|
|
263
271
|
self.stim.script = '//allen/programs/mindscope/workgroups/dynamicrouting/DynamicRoutingTask/runTask.py'
|
|
264
272
|
self.stim.data_root = pathlib.Path('//allen/programs/mindscope/workgroups/dynamicrouting/DynamicRoutingTask/Data/366122')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: np-services
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.67
|
|
4
4
|
Summary: Tools for interfacing with devices and services used in Mindscope Neuropixels experiments at the Allen Institute.
|
|
5
5
|
Author-Email: bjhardcastle <ben.hardcastle@alleninstitute.org>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
np_services-0.1.
|
|
2
|
-
np_services-0.1.
|
|
3
|
-
np_services-0.1.
|
|
1
|
+
np_services-0.1.67.dist-info/METADATA,sha256=glAO-ZEXfv8mIsxorj09Tmtg9EpmmzIs72mHLOPYkUs,879
|
|
2
|
+
np_services-0.1.67.dist-info/WHEEL,sha256=N2J68yzZqJh3mI_Wg92rwhw0rtJDFpZj9bwQIMJgaVg,90
|
|
3
|
+
np_services-0.1.67.dist-info/entry_points.txt,sha256=TldbYj9M3gsdasFZbDnfhCa-fm5kPiMDXcOj21Qoawk,62
|
|
4
4
|
np_services/.mypy_cache/.gitignore,sha256=_7s5RkPBEvI1a7XzGE6V4z_XMhRokvTu6tEml1Vw_zk,36
|
|
5
5
|
np_services/.mypy_cache/3.9/@plugins_snapshot.json,sha256=RBNvo1WzZ4oRRq0W9-hknpT7T8If536DEMBg9hyq_4o,2
|
|
6
6
|
np_services/.mypy_cache/3.9/__future__.data.json,sha256=raQSzDEsSFGbpuXnjSoGWTF3ufScHYT4VgkTwlfTX3s,8382
|
|
@@ -200,7 +200,7 @@ np_services/resources/grey_desktop.ps1,sha256=dKv_J7o3rmV6kLwhtIJA-kJSP1jOOp_Yxq
|
|
|
200
200
|
np_services/resources/mvr_connector.py,sha256=ZcZYtdtxMyOwoZzGiH2Xh2vllRzcgr6nhNiuYOkbPHM,8230
|
|
201
201
|
np_services/resources/reset_desktop.ps1,sha256=x37x6upJs6F4w47pOmtBMJ9L9b3S_g7zFyb7wd_7ASA,2219
|
|
202
202
|
np_services/resources/zro.py,sha256=eAtKB1h3rFXd-EfGuXFNjtkDMC_9e6ZDA_mzIUjze-g,10246
|
|
203
|
-
np_services/scripts/pretest.py,sha256=
|
|
203
|
+
np_services/scripts/pretest.py,sha256=biHyPtguBpsBvzgoyUbwn2hifO4DPn_XxIEa7CtRq7c,14573
|
|
204
204
|
np_services/stim_computer_theme_changer.py,sha256=ypUWS6FZICpZta4GmtTMmgNvw9Sms-cAKv0WZDzFln4,2034
|
|
205
205
|
np_services/utils.py,sha256=VoCRLg7AGcv0qogMQF1-cBq1dWMOlKURotCwW7PKsns,5770
|
|
206
|
-
np_services-0.1.
|
|
206
|
+
np_services-0.1.67.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|