sl-shared-assets 3.0.0rc9__py3-none-any.whl → 3.0.0rc10__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.

Potentially problematic release.


This version of sl-shared-assets might be problematic. Click here for more details.

@@ -44,7 +44,7 @@ class ExperimentState:
44
44
  automatically enabled. Specifically, if the experiment state supports running linearized Virtual Reality track, the
45
45
  system will enable lick guidance for this many trials at the beginning of the experiment state and automatically
46
46
  disable it for the following trials."""
47
- failed_trial_threshold: int
47
+ recovery_failed_trial_threshold: int
48
48
  """Specifies the number of failed (non-rewarded) non-guided trials (laps), after which the system will re-enable
49
49
  guidance for the 'recovery_guided_trials' number of following trials. For this to take effect, the trials must be
50
50
  failed this many times in a row."""
@@ -122,7 +122,7 @@ class MesoscopeExperimentConfiguration(YamlConfig):
122
122
  system_state_code=1,
123
123
  state_duration_s=30,
124
124
  initial_guided_trials=0,
125
- failed_trial_threshold=0,
125
+ recovery_failed_trial_threshold=0,
126
126
  recovery_guided_trials=0,
127
127
  ),
128
128
  "experiment": ExperimentState(
@@ -130,7 +130,7 @@ class MesoscopeExperimentConfiguration(YamlConfig):
130
130
  system_state_code=2,
131
131
  state_duration_s=120,
132
132
  initial_guided_trials=3,
133
- failed_trial_threshold=6,
133
+ recovery_failed_trial_threshold=6,
134
134
  recovery_guided_trials=3,
135
135
  ),
136
136
  "cooldown": ExperimentState(
@@ -138,7 +138,7 @@ class MesoscopeExperimentConfiguration(YamlConfig):
138
138
  system_state_code=1,
139
139
  state_duration_s=15,
140
140
  initial_guided_trials=1000000,
141
- failed_trial_threshold=0,
141
+ recovery_failed_trial_threshold=0,
142
142
  recovery_guided_trials=0,
143
143
  ),
144
144
  }
@@ -24,7 +24,7 @@ class ExperimentState:
24
24
  system_state_code: int
25
25
  state_duration_s: float
26
26
  initial_guided_trials: int
27
- failed_trial_threshold: int
27
+ recovery_failed_trial_threshold: int
28
28
  recovery_guided_trials: int
29
29
 
30
30
  @dataclass()
@@ -205,10 +205,6 @@ class ZaberPositions(YamlConfig):
205
205
  Zaber motor positions across consecutive runtimes for the same project and animal combination.
206
206
 
207
207
  Notes:
208
- The HeadBar axis (connection) also manages the motor that moves the running wheel along the x-axis. While the
209
- motor itself is not part of the HeadBar assembly, it is related to positioning the mouse in the VR system. This
210
- is in contrast to the LickPort group, which is related to positioning the lick tube relative to the mouse.
211
-
212
208
  All positions are saved using native motor units. All class fields initialize to default placeholders that are
213
209
  likely NOT safe to apply to the VR system. Do not apply the positions loaded from the file unless you are
214
210
  certain they are safe to use.
@@ -226,13 +222,12 @@ class ZaberPositions(YamlConfig):
226
222
  """The absolute position, in native motor units, of the HeadBar roll-axis motor."""
227
223
  lickport_z: int = 0
228
224
  """The absolute position, in native motor units, of the LickPort z-axis motor."""
229
- lickport_x: int = 0
230
- """The absolute position, in native motor units, of the LickPort x-axis motor."""
231
225
  lickport_y: int = 0
232
226
  """The absolute position, in native motor units, of the LickPort y-axis motor."""
227
+ lickport_x: int = 0
228
+ """The absolute position, in native motor units, of the LickPort x-axis motor."""
233
229
  wheel_x: int = 0
234
- """The absolute position, in native motor units, of the running wheel platform x-axis motor. Although this motor is
235
- not itself part of the HeadBar assembly, it is controlled through the HeadBar controller port."""
230
+ """The absolute position, in native motor units, of the running wheel platform x-axis motor."""
236
231
 
237
232
 
238
233
  @dataclass()
@@ -240,9 +235,9 @@ class MesoscopePositions(YamlConfig):
240
235
  """Stores real and virtual Mesoscope objective positions reused between experiment sessions that use the
241
236
  Mesoscope-VR system.
242
237
 
243
- Primarily, the class is used to help the experimenter to position the Mesoscope at the same position across
238
+ Primarily, the class is used to help the experimenter to position the Mesoscope on the same imaging plane across
244
239
  multiple imaging sessions. It stores both the physical (real) position of the objective along the motorized
245
- X, Y, Z, and Roll axes and the virtual (ScanImage software) tip, tilt, and fastZ focus axes.
240
+ X, Y, Z, and Roll axes, and the virtual (ScanImage software) tip, tilt, and fastZ focus axes.
246
241
 
247
242
  Notes:
248
243
  Since the API to read and write these positions automatically is currently not available, this class relies on
@@ -250,16 +245,18 @@ class MesoscopePositions(YamlConfig):
250
245
  """
251
246
 
252
247
  mesoscope_x: float = 0.0
253
- """The X-axis position, in centimeters, of the Mesoscope objective used during session runtime."""
248
+ """The X-axis position, in centimeters, of the Mesoscope objective."""
254
249
  mesoscope_y: float = 0.0
255
- """The Y-axis position, in centimeters, of the Mesoscope objective used during session runtime."""
250
+ """The Y-axis position, in centimeters, of the Mesoscope objective."""
256
251
  mesoscope_roll: float = 0.0
257
- """The Roll-axis position, in degrees, of the Mesoscope objective used during session runtime."""
252
+ """The Roll-axis position, in degrees, of the Mesoscope objective."""
258
253
  mesoscope_z: float = 0.0
259
- """The Z-axis position, in centimeters, of the Mesoscope objective used during session runtime."""
254
+ """The Z-axis position, in centimeters, of the Mesoscope objective."""
260
255
  mesoscope_fast_z: float = 0.0
261
- """The Fast-Z-axis position, in micrometers, of the Mesoscope objective used during session runtime."""
256
+ """The Fast-Z-axis (virtual Z) position, in micrometers."""
262
257
  mesoscope_tip: float = 0.0
263
- """The Tilt-axis position, in degrees, of the Mesoscope objective used during session runtime."""
258
+ """The Tilt-axis (software) position, in degrees.."""
264
259
  mesoscope_tilt: float = 0.0
265
- """The Tip-axis position, in degrees, of the Mesoscope objective used during session runtime."""
260
+ """The Tip-axis (software) position, in degrees."""
261
+ laser_power_mw: float = 0.0
262
+ """The excitation laser power delivered to the sample, in milliwatts."""
@@ -106,10 +106,6 @@ class ZaberPositions(YamlConfig):
106
106
  Zaber motor positions across consecutive runtimes for the same project and animal combination.
107
107
 
108
108
  Notes:
109
- The HeadBar axis (connection) also manages the motor that moves the running wheel along the x-axis. While the
110
- motor itself is not part of the HeadBar assembly, it is related to positioning the mouse in the VR system. This
111
- is in contrast to the LickPort group, which is related to positioning the lick tube relative to the mouse.
112
-
113
109
  All positions are saved using native motor units. All class fields initialize to default placeholders that are
114
110
  likely NOT safe to apply to the VR system. Do not apply the positions loaded from the file unless you are
115
111
  certain they are safe to use.
@@ -123,8 +119,8 @@ class ZaberPositions(YamlConfig):
123
119
  headbar_pitch: int = ...
124
120
  headbar_roll: int = ...
125
121
  lickport_z: int = ...
126
- lickport_x: int = ...
127
122
  lickport_y: int = ...
123
+ lickport_x: int = ...
128
124
  wheel_x: int = ...
129
125
 
130
126
  @dataclass()
@@ -132,9 +128,9 @@ class MesoscopePositions(YamlConfig):
132
128
  """Stores real and virtual Mesoscope objective positions reused between experiment sessions that use the
133
129
  Mesoscope-VR system.
134
130
 
135
- Primarily, the class is used to help the experimenter to position the Mesoscope at the same position across
131
+ Primarily, the class is used to help the experimenter to position the Mesoscope on the same imaging plane across
136
132
  multiple imaging sessions. It stores both the physical (real) position of the objective along the motorized
137
- X, Y, Z, and Roll axes and the virtual (ScanImage software) tip, tilt, and fastZ focus axes.
133
+ X, Y, Z, and Roll axes, and the virtual (ScanImage software) tip, tilt, and fastZ focus axes.
138
134
 
139
135
  Notes:
140
136
  Since the API to read and write these positions automatically is currently not available, this class relies on
@@ -148,3 +144,4 @@ class MesoscopePositions(YamlConfig):
148
144
  mesoscope_fast_z: float = ...
149
145
  mesoscope_tip: float = ...
150
146
  mesoscope_tilt: float = ...
147
+ laser_power_mw: float = ...
@@ -498,12 +498,12 @@ class SessionData(YamlConfig):
498
498
  # Returns the initialized SessionData instance to caller
499
499
  return instance
500
500
 
501
- def mark_initialization(self) -> None:
502
- """Ensures that the 'nk.bin' marker file is removed from the session's raw_dat folder.
501
+ def runtime_initialized(self) -> None:
502
+ """Ensures that the 'nk.bin' marker file is removed from the session's raw_data folder.
503
503
 
504
504
  This marker is generated as part of the SessionData initialization (creation) process to mark sessions that did
505
- not fully initialize during runtime. Call this method after fully initializing the data acquisition runtime
506
- control class to ensure that the session is not marker for automated deletion upon runtime completion.
505
+ not fully initialize during runtime. This service method is designed to be called by the inner runtime control
506
+ functions and classes of the sl-experiment library and generally should not be called by end-users.
507
507
  """
508
508
  self.raw_data.nk_path.unlink(missing_ok=True)
509
509
 
@@ -192,12 +192,12 @@ class SessionData(YamlConfig):
192
192
  FileNotFoundError: If the 'session_data.yaml' file is not found under the session_path/raw_data/ subfolder.
193
193
 
194
194
  """
195
- def mark_initialization(self) -> None:
196
- """Ensures that the 'nk.bin' marker file is removed from the session's raw_dat folder.
195
+ def runtime_initialized(self) -> None:
196
+ """Ensures that the 'nk.bin' marker file is removed from the session's raw_data folder.
197
197
 
198
198
  This marker is generated as part of the SessionData initialization (creation) process to mark sessions that did
199
- not fully initialize during runtime. Call this method after fully initializing the data acquisition runtime
200
- control class to ensure that the session is not marker for automated deletion upon runtime completion.
199
+ not fully initialize during runtime. This service method is designed to be called by the inner runtime control
200
+ functions and classes of the sl-experiment library and generally should not be called by end-users.
201
201
  """
202
202
  def _save(self) -> None:
203
203
  """Saves the instance data to the 'raw_data' directory of the managed session as a 'session_data.yaml' file.
@@ -227,7 +227,7 @@ def ascend_tyche_data(root_directory: Path) -> None:
227
227
  )
228
228
 
229
229
  # Since this runtime reprocesses already acquired data, marks the session as fully initialized.
230
- session_data.mark_initialization()
230
+ session_data.runtime_initialized()
231
231
 
232
232
  # Moves the data from the old hierarchy to the new hierarchy. If the process runs as expected, and
233
233
  # fully empties the source acquisition folder, destroys the folder. Otherwise, notifies the user that
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sl-shared-assets
3
- Version: 3.0.0rc9
3
+ Version: 3.0.0rc10
4
4
  Summary: Provides data acquisition and processing assets shared between Sun (NeuroAI) lab libraries.
5
5
  Project-URL: Homepage, https://github.com/Sun-Lab-NBB/sl-shared-assets
6
6
  Project-URL: Documentation, https://sl-shared-assets-api-docs.netlify.app/
@@ -5,12 +5,12 @@ sl_shared_assets/cli.pyi,sha256=8ZJK56_jh2QlF3XCN6c7fI6Z022XtehB0eCrQDJbAsU,5515
5
5
  sl_shared_assets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  sl_shared_assets/data_classes/__init__.py,sha256=SUDN7gFngUPEa7Da_G0PjXwnF9Q0S4EgvjpKe3KSr5g,1852
7
7
  sl_shared_assets/data_classes/__init__.pyi,sha256=J-tUXAtGEasacVU1qGFFksvfB1tFdEO-GKs90vSTAcg,2022
8
- sl_shared_assets/data_classes/configuration_data.py,sha256=73IP9e8bESHbYlr0sCCLktU3JScofuSTuLE8N4MIwjs,35389
9
- sl_shared_assets/data_classes/configuration_data.pyi,sha256=Jg4TmrDjEBtQn7zH0140-6pQ1J9ljSuzC0tiysx4qBM,10772
10
- sl_shared_assets/data_classes/runtime_data.py,sha256=O98BZg7i7cEUlpIE16JswKOwQNRsS5RxVdBzXYvAw00,16543
11
- sl_shared_assets/data_classes/runtime_data.pyi,sha256=i8CuZd9p0Nu43xhpE62pB07AiovZIgtMZYN5wQjz-r0,6861
12
- sl_shared_assets/data_classes/session_data.py,sha256=nvGW8TagsGmxH3Eh63zosKHJAfOT4U_2ukfxy3frum8,45575
13
- sl_shared_assets/data_classes/session_data.pyi,sha256=QEoxKdcaa0lwJ8Bv4rsvAiC32lwpagcsnsnRK1x0AqA,14152
8
+ sl_shared_assets/data_classes/configuration_data.py,sha256=bTkfJqQfNdw-vnsZfzLBE_rLFR_YoiYM3BZQt08Syp4,35425
9
+ sl_shared_assets/data_classes/configuration_data.pyi,sha256=9X06Zsuj2p3XTOdb651rBnZ2RYdRzlv1F7KiMOtNF_8,10781
10
+ sl_shared_assets/data_classes/runtime_data.py,sha256=MwNe_Ilg-DwfgboYafizRj--05z85WsIHQimxDUqI0w,15937
11
+ sl_shared_assets/data_classes/runtime_data.pyi,sha256=BX4sPgr47pitg24N2fvCIFxjG_s9DkqCimF8hiO7Jmo,6545
12
+ sl_shared_assets/data_classes/session_data.py,sha256=yUcHYajAv0SKir2HOHYSMkXkusFL5XP_KfkzzvkmnX0,45576
13
+ sl_shared_assets/data_classes/session_data.pyi,sha256=hNNElZHOe5hlQAStkNqkYYl1UbfGh88LchYjBIqdreY,14153
14
14
  sl_shared_assets/data_classes/surgery_data.py,sha256=qsMj3NkjhylAT9b_wHBY-1XwTu2xsZcZatdECmkA7Bs,7437
15
15
  sl_shared_assets/data_classes/surgery_data.pyi,sha256=rf59lJ3tGSYKHQlEGXg75MnjajBwl0DYhL4TClAO4SM,2605
16
16
  sl_shared_assets/server/__init__.py,sha256=w7y73RXXjBrWQsjU5g1QNCv_gsXDYnHos3NpOoR2AHA,452
@@ -21,7 +21,7 @@ sl_shared_assets/server/server.py,sha256=MGk1v49aEFeIChMDsiR7CXjVkWwDpD9kA1TK0fw
21
21
  sl_shared_assets/server/server.pyi,sha256=5Yxq4txhjtd9w-6U9fPehzMeIZL5GcprVCHd9mPP6FI,15113
22
22
  sl_shared_assets/tools/__init__.py,sha256=NktXk62E_HHOrO_93z_MVmSd6-Oir3mE4xE9Yr8Qa7U,682
23
23
  sl_shared_assets/tools/__init__.pyi,sha256=0UXorfCXXmHQOP5z7hODpsqEX0DAkOta5VZqN6FSS-w,623
24
- sl_shared_assets/tools/ascension_tools.py,sha256=XdJC3nibtgqpmH0KG6Q-YZkOLTK3TexZHWVglqW0pl4,14595
24
+ sl_shared_assets/tools/ascension_tools.py,sha256=1cDs6Nx3woL9UPESQBpMbP7mC5URxCdPmjpU_GN87c4,14595
25
25
  sl_shared_assets/tools/ascension_tools.pyi,sha256=c-SI9TYJ1vmJXMV2pSW9Nri4mlySF8MtXqrvRvz5C8s,3705
26
26
  sl_shared_assets/tools/packaging_tools.py,sha256=QikjeaE_A8FyVJi3cnWLeW-hUXy1-FF1N23muA5VfT4,7526
27
27
  sl_shared_assets/tools/packaging_tools.pyi,sha256=vgGbAQCExwg-0A5F72MzEhzHxu97Nqg1yuz-5P89ycU,3118
@@ -29,8 +29,8 @@ sl_shared_assets/tools/project_management_tools.py,sha256=Z_U0R26w9Le1O-u66gyF5C
29
29
  sl_shared_assets/tools/project_management_tools.pyi,sha256=4kok98nOZ4KnT-Sg-ZCZYg-WIM5qZqiyK8g1XiiDjHM,10375
30
30
  sl_shared_assets/tools/transfer_tools.py,sha256=J26kwOp_NpPSY0-xu5FTw9udte-rm_mW1FJyaTNoqQI,6606
31
31
  sl_shared_assets/tools/transfer_tools.pyi,sha256=FoH7eYZe7guGHfPr0MK5ggO62uXKwD2aJ7h1Bu7PaEE,3294
32
- sl_shared_assets-3.0.0rc9.dist-info/METADATA,sha256=ld-V567zlZD-KHbtRdqSIMivD--AjX_VW-l9WV4Wyuk,49309
33
- sl_shared_assets-3.0.0rc9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
34
- sl_shared_assets-3.0.0rc9.dist-info/entry_points.txt,sha256=UmO1rl7ly9N7HWPwWyP9E0b5KBUStpBo4TRoqNtizDY,430
35
- sl_shared_assets-3.0.0rc9.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
36
- sl_shared_assets-3.0.0rc9.dist-info/RECORD,,
32
+ sl_shared_assets-3.0.0rc10.dist-info/METADATA,sha256=OpcKZWppCyDoGafIiWowtf9p9HZcdbV2lEuQPADmAqY,49310
33
+ sl_shared_assets-3.0.0rc10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
34
+ sl_shared_assets-3.0.0rc10.dist-info/entry_points.txt,sha256=UmO1rl7ly9N7HWPwWyP9E0b5KBUStpBo4TRoqNtizDY,430
35
+ sl_shared_assets-3.0.0rc10.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
36
+ sl_shared_assets-3.0.0rc10.dist-info/RECORD,,