np-workflows 1.6.91__tar.gz → 1.6.93__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.
Files changed (53) hide show
  1. {np_workflows-1.6.91 → np_workflows-1.6.93}/PKG-INFO +1 -1
  2. {np_workflows-1.6.91 → np_workflows-1.6.93}/pyproject.toml +1 -1
  3. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/dynamic_routing/widgets.py +28 -1
  4. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/shared/base_experiments.py +0 -1
  5. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows.egg-info/PKG-INFO +1 -1
  6. {np_workflows-1.6.91 → np_workflows-1.6.93}/README.md +0 -0
  7. {np_workflows-1.6.91 → np_workflows-1.6.93}/setup.cfg +0 -0
  8. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/__init__.py +0 -0
  9. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/__init__.py +0 -0
  10. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/dynamic_routing/__init__.py +0 -0
  11. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/dynamic_routing/main.py +0 -0
  12. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_P3/P3_workflow_widget.py +0 -0
  13. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_P3/__init__.py +0 -0
  14. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_P3/main_P3_pilot.py +0 -0
  15. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_barcode/__init__.py +0 -0
  16. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_barcode/barcode_workflow_widget.py +0 -0
  17. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_barcode/camstim_scripts/barcode_mapping_script.py +0 -0
  18. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_barcode/camstim_scripts/barcode_opto_script.py +0 -0
  19. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_barcode/main_barcode_pilot.py +0 -0
  20. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_loop/__init__.py +0 -0
  21. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_loop/camstim_scripts/barcode_mapping_script.py +0 -0
  22. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_loop/camstim_scripts/barcode_opto_script.py +0 -0
  23. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_loop/loop_workflow_widget.py +0 -0
  24. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_loop/main_loop_pilot.py +0 -0
  25. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_psycode/__init__.py +0 -0
  26. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_psycode/main_psycode_pilot.py +0 -0
  27. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_psycode/psycode_workflow_widget.py +0 -0
  28. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_v2/__init__.py +0 -0
  29. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_v2/main_v2_pilot.py +0 -0
  30. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_v2/v2_workflow_widget.py +0 -0
  31. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_vippo/__init__.py +0 -0
  32. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_vippo/main_vippo_pilot.py +0 -0
  33. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/openscope_vippo/vippo_workflow_widget.py +0 -0
  34. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/__init__.py +0 -0
  35. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/camstim_scripts/make_tt_stims.py +0 -0
  36. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/camstim_scripts/oct22_tt_stim_script.py +0 -0
  37. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_main_script.py +0 -0
  38. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_mapping_script.py +0 -0
  39. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/camstim_scripts/ttn_opto_script.py +0 -0
  40. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/main_ttn_pilot.py +0 -0
  41. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/ttn_session_widget.py +0 -0
  42. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/task_trained_network/ttn_stim_config.py +0 -0
  43. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/templeton/__init__.py +0 -0
  44. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/templeton/main.py +0 -0
  45. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/experiments/templeton/widgets.py +0 -0
  46. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/shared/__init__.py +0 -0
  47. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/shared/npxc.py +0 -0
  48. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows/shared/widgets.py +0 -0
  49. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows.egg-info/SOURCES.txt +0 -0
  50. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows.egg-info/dependency_links.txt +0 -0
  51. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows.egg-info/entry_points.txt +0 -0
  52. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows.egg-info/requires.txt +0 -0
  53. {np_workflows-1.6.91 → np_workflows-1.6.93}/src/np_workflows.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: np-workflows
3
- Version: 1.6.91
3
+ Version: 1.6.93
4
4
  Summary: Ecephys and behavior workflows for the Mindscope Neuropixels team.
5
5
  Author-email: Ben Hardcastle <ben.hardcastle@alleninstitute.org>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "np-workflows"
3
- version = "1.6.91"
3
+ version = "1.6.93"
4
4
  description = "Ecephys and behavior workflows for the Mindscope Neuropixels team."
5
5
  authors = [
6
6
  { name = "Ben Hardcastle", email = "ben.hardcastle@alleninstitute.org" },
@@ -1,7 +1,13 @@
1
+ import shutil
2
+ import time
3
+
1
4
  import IPython.display
2
5
  import ipywidgets as ipw
6
+ import np_config
7
+ import np_services
3
8
  import np_session
4
9
 
10
+ import np_workflows.shared.npxc as npxc
5
11
  from np_workflows.shared.base_experiments import DynamicRoutingExperiment
6
12
 
7
13
  # for widget, before creating a experiment --------------------------------------------- #
@@ -82,6 +88,27 @@ def workflow_select_widget(
82
88
 
83
89
 
84
90
  def photodoc_widget(session: np_session.Session, reminder: str) -> None:
91
+ vimba_dir = np_config.local_to_unc(
92
+ session.rig.mon, np_services.config_from_zk()["ImageVimba"]["data"]
93
+ )
94
+ n_files = len(tuple(vimba_dir.iterdir()))
95
+ t0 = time.time()
85
96
  print(
86
- f"Take an image in Vimba Viewer and save as:\n{session.npexp_path.name}_{reminder}.png"
97
+ f"Take an image in Vimba Viewer and save it with the default name (eg should be unique)."
98
+ f"\n\n*This cell will wait for a new file to be created in {vimba_dir}, then copy it to the session folder with suffix {reminder!r}*"
99
+ )
100
+ timeout_s = 120
101
+ while len(files := tuple(vimba_dir.iterdir())) == n_files:
102
+ time.sleep(1)
103
+ if time.time() - t0 > timeout_s:
104
+ raise TimeoutError(
105
+ f"No new image file detected in Vimba folder after {timeout_s} seconds - aborting"
106
+ )
107
+ latest_image = max(
108
+ (p for p in files if p.is_file()), key=lambda f: f.stat().st_ctime
87
109
  )
110
+ print(f"New file detected:\n\t{latest_image.name}\nCopying to session folder")
111
+ new_name = f"{session.npexp_path.name}_{reminder}.png"
112
+ shutil.copy2(latest_image, session.npexp_path / new_name)
113
+ npxc.validate_or_overwrite(session.npexp_path / new_name, latest_image)
114
+ print("Done!")
@@ -13,7 +13,6 @@ from typing import Any, ClassVar, Literal, Optional, Protocol, Type
13
13
 
14
14
  import fabric
15
15
  import invoke
16
- import ipylab
17
16
  import np_config
18
17
  import np_logging
19
18
  import np_services
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: np-workflows
3
- Version: 1.6.91
3
+ Version: 1.6.93
4
4
  Summary: Ecephys and behavior workflows for the Mindscope Neuropixels team.
5
5
  Author-email: Ben Hardcastle <ben.hardcastle@alleninstitute.org>
6
6
  License: MIT
File without changes
File without changes