np-workflows 1.6.93__tar.gz → 1.6.94__tar.gz
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_workflows-1.6.93 → np_workflows-1.6.94}/PKG-INFO +1 -1
- {np_workflows-1.6.93 → np_workflows-1.6.94}/pyproject.toml +1 -1
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/dynamic_routing/widgets.py +20 -8
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows.egg-info/PKG-INFO +1 -1
- {np_workflows-1.6.93 → np_workflows-1.6.94}/README.md +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/setup.cfg +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/dynamic_routing/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/dynamic_routing/main.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_P3/P3_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_P3/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_P3/main_P3_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_barcode/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_barcode/barcode_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_barcode/camstim_scripts/barcode_mapping_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_barcode/camstim_scripts/barcode_opto_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_barcode/main_barcode_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_loop/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_loop/camstim_scripts/barcode_mapping_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_loop/camstim_scripts/barcode_opto_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_loop/loop_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_loop/main_loop_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_psycode/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_psycode/main_psycode_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_psycode/psycode_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_v2/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_v2/main_v2_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_v2/v2_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_vippo/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_vippo/main_vippo_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_vippo/vippo_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/camstim_scripts/make_tt_stims.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/camstim_scripts/oct22_tt_stim_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_main_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_mapping_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_opto_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/main_ttn_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/ttn_session_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/task_trained_network/ttn_stim_config.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/templeton/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/templeton/main.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/templeton/widgets.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/shared/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/shared/base_experiments.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/shared/npxc.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/shared/widgets.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows.egg-info/SOURCES.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows.egg-info/dependency_links.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows.egg-info/entry_points.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows.egg-info/requires.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows.egg-info/top_level.txt +0 -0
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/dynamic_routing/widgets.py
RENAMED
|
@@ -91,22 +91,34 @@ def photodoc_widget(session: np_session.Session, reminder: str) -> None:
|
|
|
91
91
|
vimba_dir = np_config.local_to_unc(
|
|
92
92
|
session.rig.mon, np_services.config_from_zk()["ImageVimba"]["data"]
|
|
93
93
|
)
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
|
|
95
|
+
def get_file_stats():
|
|
96
|
+
return {p: p.stat().st_mtime for p in vimba_dir.iterdir() if p.is_file()}
|
|
97
|
+
|
|
98
|
+
original_file_stats = get_file_stats()
|
|
99
|
+
|
|
96
100
|
print(
|
|
97
|
-
f"Take an image in Vimba Viewer and save it with
|
|
98
|
-
f"\n\
|
|
101
|
+
f"Take an image in Vimba Viewer and save it {vimba_dir} with any name + .png suffix."
|
|
102
|
+
f"\n\nThis cell will wait for a new file or an existing file to be modified, then copy it as {reminder!r}*"
|
|
99
103
|
)
|
|
104
|
+
t0 = time.time()
|
|
100
105
|
timeout_s = 120
|
|
101
|
-
while
|
|
106
|
+
while True:
|
|
102
107
|
time.sleep(1)
|
|
108
|
+
new_files = len(new_file_stats := get_file_stats()) != len(original_file_stats)
|
|
109
|
+
modified_files = any(
|
|
110
|
+
p
|
|
111
|
+
for p in new_file_stats
|
|
112
|
+
if new_file_stats[p] > original_file_stats.get(p, 0)
|
|
113
|
+
)
|
|
114
|
+
if new_files or modified_files:
|
|
115
|
+
break
|
|
116
|
+
|
|
103
117
|
if time.time() - t0 > timeout_s:
|
|
104
118
|
raise TimeoutError(
|
|
105
119
|
f"No new image file detected in Vimba folder after {timeout_s} seconds - aborting"
|
|
106
120
|
)
|
|
107
|
-
latest_image = max(
|
|
108
|
-
(p for p in files if p.is_file()), key=lambda f: f.stat().st_ctime
|
|
109
|
-
)
|
|
121
|
+
latest_image = max(new_file_stats, key=lambda k: new_file_stats[k])
|
|
110
122
|
print(f"New file detected:\n\t{latest_image.name}\nCopying to session folder")
|
|
111
123
|
new_name = f"{session.npexp_path.name}_{reminder}.png"
|
|
112
124
|
shutil.copy2(latest_image, session.npexp_path / new_name)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/dynamic_routing/__init__.py
RENAMED
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/dynamic_routing/main.py
RENAMED
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_P3/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_loop/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_v2/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/openscope_vippo/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/templeton/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.94}/src/np_workflows/experiments/templeton/widgets.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|