np-workflows 1.6.93__tar.gz → 1.6.95__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.95}/PKG-INFO +1 -1
- {np_workflows-1.6.93 → np_workflows-1.6.95}/pyproject.toml +1 -1
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/dynamic_routing/widgets.py +27 -12
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows.egg-info/PKG-INFO +1 -1
- {np_workflows-1.6.93 → np_workflows-1.6.95}/README.md +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/setup.cfg +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/dynamic_routing/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/dynamic_routing/main.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_P3/P3_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_P3/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_P3/main_P3_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_barcode/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_barcode/barcode_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_barcode/camstim_scripts/barcode_mapping_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_barcode/camstim_scripts/barcode_opto_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_barcode/main_barcode_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_loop/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_loop/camstim_scripts/barcode_mapping_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_loop/camstim_scripts/barcode_opto_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_loop/loop_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_loop/main_loop_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_psycode/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_psycode/main_psycode_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_psycode/psycode_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_v2/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_v2/main_v2_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_v2/v2_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_vippo/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_vippo/main_vippo_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/openscope_vippo/vippo_workflow_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/task_trained_network/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/task_trained_network/camstim_scripts/make_tt_stims.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/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.95}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_main_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_mapping_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_opto_script.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/task_trained_network/main_ttn_pilot.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/task_trained_network/ttn_session_widget.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/task_trained_network/ttn_stim_config.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/templeton/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/templeton/main.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/templeton/widgets.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/shared/__init__.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/shared/base_experiments.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/shared/npxc.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/shared/widgets.py +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows.egg-info/SOURCES.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows.egg-info/dependency_links.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows.egg-info/entry_points.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows.egg-info/requires.txt +0 -0
- {np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows.egg-info/top_level.txt +0 -0
{np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/dynamic_routing/widgets.py
RENAMED
|
@@ -91,24 +91,39 @@ 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
|
+
|
|
100
|
+
timeout_s = 300
|
|
96
101
|
print(
|
|
97
|
-
f"Take an image in Vimba Viewer and save it with
|
|
98
|
-
f"\n\
|
|
102
|
+
f"Take an image in Vimba Viewer and save it {vimba_dir} with any name and .png suffix."
|
|
103
|
+
f"\n\nThis cell will wait for a new file or an existing file to be modified ({timeout_s = })*"
|
|
99
104
|
)
|
|
100
|
-
|
|
101
|
-
while
|
|
105
|
+
t0 = time.time()
|
|
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
|
-
|
|
121
|
+
latest_image = max(new_file_stats, key=lambda k: new_file_stats[k])
|
|
122
|
+
dest = (
|
|
123
|
+
session.npexp_path
|
|
124
|
+
/ f"{session.npexp_path.name}_{reminder}{latest_image.suffix}"
|
|
109
125
|
)
|
|
110
|
-
print(f"New file detected:\n\t{latest_image.name}\nCopying to
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
npxc.validate_or_overwrite(session.npexp_path / new_name, latest_image)
|
|
126
|
+
print(f"New file detected:\n\t{latest_image.name}\nCopying to:\n\t{dest}")
|
|
127
|
+
shutil.copy2(latest_image, dest)
|
|
128
|
+
npxc.validate_or_overwrite(dest, latest_image)
|
|
114
129
|
print("Done!")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/dynamic_routing/__init__.py
RENAMED
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.95}/src/np_workflows/experiments/dynamic_routing/main.py
RENAMED
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.95}/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.95}/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.95}/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.95}/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.95}/src/np_workflows/experiments/templeton/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{np_workflows-1.6.93 → np_workflows-1.6.95}/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
|