sl-shared-assets 3.0.0rc7__py3-none-any.whl → 3.0.0rc8__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.
- sl_shared_assets/__init__.py +2 -2
- sl_shared_assets/__init__.pyi +2 -2
- sl_shared_assets/data_classes/__init__.py +2 -2
- sl_shared_assets/data_classes/__init__.pyi +2 -2
- sl_shared_assets/data_classes/configuration_data.py +27 -13
- sl_shared_assets/data_classes/configuration_data.pyi +11 -9
- sl_shared_assets/data_classes/session_data.py +8 -0
- sl_shared_assets/data_classes/session_data.pyi +1 -0
- {sl_shared_assets-3.0.0rc7.dist-info → sl_shared_assets-3.0.0rc8.dist-info}/METADATA +1 -1
- {sl_shared_assets-3.0.0rc7.dist-info → sl_shared_assets-3.0.0rc8.dist-info}/RECORD +13 -13
- {sl_shared_assets-3.0.0rc7.dist-info → sl_shared_assets-3.0.0rc8.dist-info}/WHEEL +0 -0
- {sl_shared_assets-3.0.0rc7.dist-info → sl_shared_assets-3.0.0rc8.dist-info}/entry_points.txt +0 -0
- {sl_shared_assets-3.0.0rc7.dist-info → sl_shared_assets-3.0.0rc8.dist-info}/licenses/LICENSE +0 -0
sl_shared_assets/__init__.py
CHANGED
|
@@ -26,8 +26,8 @@ from .data_classes import (
|
|
|
26
26
|
MesoscopePaths,
|
|
27
27
|
ZaberPositions,
|
|
28
28
|
ExperimentState,
|
|
29
|
+
ExperimentTrial,
|
|
29
30
|
MesoscopeCameras,
|
|
30
|
-
TrialCueSequence,
|
|
31
31
|
ProcessingTracker,
|
|
32
32
|
MesoscopePositions,
|
|
33
33
|
RunTrainingDescriptor,
|
|
@@ -78,7 +78,7 @@ __all__ = [
|
|
|
78
78
|
"MesoscopeAdditionalFirmware",
|
|
79
79
|
"get_system_configuration_data",
|
|
80
80
|
"set_system_configuration_file",
|
|
81
|
-
"
|
|
81
|
+
"ExperimentTrial",
|
|
82
82
|
# Tools package
|
|
83
83
|
"resolve_p53_marker",
|
|
84
84
|
"transfer_directory",
|
sl_shared_assets/__init__.pyi
CHANGED
|
@@ -22,8 +22,8 @@ from .data_classes import (
|
|
|
22
22
|
MesoscopePaths as MesoscopePaths,
|
|
23
23
|
ZaberPositions as ZaberPositions,
|
|
24
24
|
ExperimentState as ExperimentState,
|
|
25
|
+
ExperimentTrial as ExperimentTrial,
|
|
25
26
|
MesoscopeCameras as MesoscopeCameras,
|
|
26
|
-
TrialCueSequence as TrialCueSequence,
|
|
27
27
|
ProcessingTracker as ProcessingTracker,
|
|
28
28
|
MesoscopePositions as MesoscopePositions,
|
|
29
29
|
RunTrainingDescriptor as RunTrainingDescriptor,
|
|
@@ -68,7 +68,7 @@ __all__ = [
|
|
|
68
68
|
"MesoscopeAdditionalFirmware",
|
|
69
69
|
"get_system_configuration_data",
|
|
70
70
|
"set_system_configuration_file",
|
|
71
|
-
"
|
|
71
|
+
"ExperimentTrial",
|
|
72
72
|
"resolve_p53_marker",
|
|
73
73
|
"transfer_directory",
|
|
74
74
|
"calculate_directory_checksum",
|
|
@@ -23,8 +23,8 @@ from .surgery_data import (
|
|
|
23
23
|
from .configuration_data import (
|
|
24
24
|
MesoscopePaths,
|
|
25
25
|
ExperimentState,
|
|
26
|
+
ExperimentTrial,
|
|
26
27
|
MesoscopeCameras,
|
|
27
|
-
TrialCueSequence,
|
|
28
28
|
MesoscopeMicroControllers,
|
|
29
29
|
MesoscopeAdditionalFirmware,
|
|
30
30
|
MesoscopeSystemConfiguration,
|
|
@@ -59,5 +59,5 @@ __all__ = [
|
|
|
59
59
|
"MesoscopeMicroControllers",
|
|
60
60
|
"MesoscopeAdditionalFirmware",
|
|
61
61
|
"ProcessingTracker",
|
|
62
|
-
"
|
|
62
|
+
"ExperimentTrial",
|
|
63
63
|
]
|
|
@@ -23,8 +23,8 @@ from .surgery_data import (
|
|
|
23
23
|
from .configuration_data import (
|
|
24
24
|
MesoscopePaths as MesoscopePaths,
|
|
25
25
|
ExperimentState as ExperimentState,
|
|
26
|
+
ExperimentTrial as ExperimentTrial,
|
|
26
27
|
MesoscopeCameras as MesoscopeCameras,
|
|
27
|
-
TrialCueSequence as TrialCueSequence,
|
|
28
28
|
MesoscopeMicroControllers as MesoscopeMicroControllers,
|
|
29
29
|
MesoscopeAdditionalFirmware as MesoscopeAdditionalFirmware,
|
|
30
30
|
MesoscopeSystemConfiguration as MesoscopeSystemConfiguration,
|
|
@@ -59,5 +59,5 @@ __all__ = [
|
|
|
59
59
|
"MesoscopeMicroControllers",
|
|
60
60
|
"MesoscopeAdditionalFirmware",
|
|
61
61
|
"ProcessingTracker",
|
|
62
|
-
"
|
|
62
|
+
"ExperimentTrial",
|
|
63
63
|
]
|
|
@@ -56,14 +56,14 @@ class ExperimentState:
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
@dataclass()
|
|
59
|
-
class
|
|
60
|
-
"""Encapsulates information about
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
some
|
|
65
|
-
this class can be used to specify supported trial structures
|
|
66
|
-
|
|
59
|
+
class ExperimentTrial:
|
|
60
|
+
"""Encapsulates information about a single experiment trial.
|
|
61
|
+
|
|
62
|
+
All Virtual Reality tasks can be broadly conceptualized as repeating motifs (sequences) of wall cues,
|
|
63
|
+
associated with a specific rewarded goal. These repeated motifs are typically used to define experiment trials
|
|
64
|
+
during analysis. Since some experiments can use multiple trial types as part of the same experiment session,
|
|
65
|
+
multiple instances of this class can be used to specify supported trial structures and trial parameters for a
|
|
66
|
+
given experiment.
|
|
67
67
|
"""
|
|
68
68
|
|
|
69
69
|
cue_sequence: list[int]
|
|
@@ -72,6 +72,8 @@ class TrialCueSequence:
|
|
|
72
72
|
"""The length of the trial cue sequence, in Unity units."""
|
|
73
73
|
trial_length_cm: float
|
|
74
74
|
"""The length of the trial cue sequence in centimeters."""
|
|
75
|
+
trial_reward_size_ul: float = 5.0
|
|
76
|
+
"""The volume of water, in microliters, to be dispensed when the animal successfully completes the trial task."""
|
|
75
77
|
|
|
76
78
|
|
|
77
79
|
# noinspection PyArgumentList
|
|
@@ -98,6 +100,14 @@ class MesoscopeExperimentConfiguration(YamlConfig):
|
|
|
98
100
|
"""A dictionary that maps each integer-code associated with a wall cue used in the Virtual Reality experiment
|
|
99
101
|
environment to its length in real-world centimeters. It is used to map each VR cue to the distance the animal needs
|
|
100
102
|
to travel to fully traverse the wall cue region from start to end."""
|
|
103
|
+
cue_offset_cm: float = 10.0
|
|
104
|
+
"""Specifies the positive offset distance, in centimeters, by which the animal's starting position is shifted
|
|
105
|
+
relative to experiment environment onset. Due to how the VR environment is revealed to the animal, most runtimes
|
|
106
|
+
need to shift the animal slightly forward relative to the track origin (0), to prevent it from seeing the area
|
|
107
|
+
before the first VR wall cue when the task starts and when the animal is teleported to the beginning of the track.
|
|
108
|
+
This offset statically shifts the entire track (in centimeters) against the set of VR wall cues used during
|
|
109
|
+
runtime. Storing this static offset as part of experiment configuration is crucial for correctly interpreting the
|
|
110
|
+
data acquiring during runtime."""
|
|
101
111
|
experiment_states: dict[str, ExperimentState] = field(
|
|
102
112
|
default_factory=lambda: {
|
|
103
113
|
"baseline": ExperimentState(
|
|
@@ -128,15 +138,19 @@ class MesoscopeExperimentConfiguration(YamlConfig):
|
|
|
128
138
|
)
|
|
129
139
|
"""A dictionary that uses human-readable state-names as keys and ExperimentState instances as values. Each
|
|
130
140
|
ExperimentState instance represents a phase of the experiment."""
|
|
131
|
-
trial_structures: dict[str,
|
|
141
|
+
trial_structures: dict[str, ExperimentTrial] = field(
|
|
132
142
|
default_factory=lambda: {
|
|
133
|
-
"
|
|
134
|
-
cue_sequence=[0, 1, 0, 2, 0, 3, 0, 4],
|
|
143
|
+
"cyclic_4_cue": ExperimentTrial(
|
|
144
|
+
cue_sequence=[0, 1, 0, 2, 0, 3, 0, 4],
|
|
145
|
+
trial_length_unity_unit=24.0,
|
|
146
|
+
trial_length_cm=240.0,
|
|
147
|
+
trial_reward_size_ul=5.0,
|
|
135
148
|
)
|
|
136
149
|
}
|
|
137
150
|
)
|
|
138
|
-
"""A dictionary that maps human-readable trial structure names as keys and
|
|
139
|
-
Each
|
|
151
|
+
"""A dictionary that maps human-readable trial structure names as keys and ExperimentTrial instances as values.
|
|
152
|
+
Each ExperimentTrial instance specifies the Virtual Reality layout and runtime parameters associated with a single
|
|
153
|
+
type of trials supported by the experiment runtime."""
|
|
140
154
|
|
|
141
155
|
|
|
142
156
|
@dataclass()
|
|
@@ -28,19 +28,20 @@ class ExperimentState:
|
|
|
28
28
|
recovery_guided_trials: int
|
|
29
29
|
|
|
30
30
|
@dataclass()
|
|
31
|
-
class
|
|
32
|
-
"""Encapsulates information about
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
some
|
|
37
|
-
this class can be used to specify supported trial structures
|
|
38
|
-
|
|
31
|
+
class ExperimentTrial:
|
|
32
|
+
"""Encapsulates information about a single experiment trial.
|
|
33
|
+
|
|
34
|
+
All Virtual Reality tasks can be broadly conceptualized as repeating motifs (sequences) of wall cues,
|
|
35
|
+
associated with a specific rewarded goal. These repeated motifs are typically used to define experiment trials
|
|
36
|
+
during analysis. Since some experiments can use multiple trial types as part of the same experiment session,
|
|
37
|
+
multiple instances of this class can be used to specify supported trial structures and trial parameters for a
|
|
38
|
+
given experiment.
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
41
|
cue_sequence: list[int]
|
|
42
42
|
trial_length_unity_unit: float
|
|
43
43
|
trial_length_cm: float
|
|
44
|
+
trial_reward_size_ul: float = ...
|
|
44
45
|
|
|
45
46
|
@dataclass()
|
|
46
47
|
class MesoscopeExperimentConfiguration(YamlConfig):
|
|
@@ -62,8 +63,9 @@ class MesoscopeExperimentConfiguration(YamlConfig):
|
|
|
62
63
|
"""
|
|
63
64
|
|
|
64
65
|
cue_map: dict[int, float] = field(default_factory=Incomplete)
|
|
66
|
+
cue_offset_cm: float = ...
|
|
65
67
|
experiment_states: dict[str, ExperimentState] = field(default_factory=Incomplete)
|
|
66
|
-
trial_structures: dict[str,
|
|
68
|
+
trial_structures: dict[str, ExperimentTrial] = field(default_factory=Incomplete)
|
|
67
69
|
|
|
68
70
|
@dataclass()
|
|
69
71
|
class MesoscopePaths:
|
|
@@ -103,6 +103,13 @@ class RawData:
|
|
|
103
103
|
the long-term storage destinations (NAS and Server) and the integrity of the moved data is verified on at least one
|
|
104
104
|
destination. During 'purge' sl-experiment runtimes, the library discovers and removes all session data marked with
|
|
105
105
|
'ubiquitin.bin' files from the machine that runs the code."""
|
|
106
|
+
nk_path: Path = Path()
|
|
107
|
+
"""Stores the path to the nk.bin file. This file is used during new data acquisition by the sl-experiment library
|
|
108
|
+
to mark sessions going through initial runtime initialization. Since runtime initialization is a complex process
|
|
109
|
+
that may fail at many different time-points, it is important to know whether the runtime initialized before
|
|
110
|
+
encountering an error. The presence of an nk.bin marker notifies post-runtime processes that the runtime failed to
|
|
111
|
+
initialize, marking that session's data for immediate deletion from all sources, as it does not contain any valid
|
|
112
|
+
information."""
|
|
106
113
|
integrity_verification_tracker_path: Path = Path()
|
|
107
114
|
"""Stores the path to the integrity_verification.yaml tracker file. This file stores the current state of the data
|
|
108
115
|
integrity verification pipeline. It prevents more than one instance of the pipeline from working with the data
|
|
@@ -137,6 +144,7 @@ class RawData:
|
|
|
137
144
|
self.system_configuration_path = self.raw_data_path.joinpath("system_configuration.yaml")
|
|
138
145
|
self.telomere_path = self.raw_data_path.joinpath("telomere.bin")
|
|
139
146
|
self.ubiquitin_path = self.raw_data_path.joinpath("ubiquitin.bin")
|
|
147
|
+
self.nk_path = self.raw_data_path.joinpath("nk.bin")
|
|
140
148
|
self.integrity_verification_tracker_path = self.raw_data_path.joinpath("integrity_verification_tracker.yaml")
|
|
141
149
|
|
|
142
150
|
def make_directories(self) -> None:
|
|
@@ -37,6 +37,7 @@ class RawData:
|
|
|
37
37
|
checksum_path: Path = ...
|
|
38
38
|
telomere_path: Path = ...
|
|
39
39
|
ubiquitin_path: Path = ...
|
|
40
|
+
nk_path: Path = ...
|
|
40
41
|
integrity_verification_tracker_path: Path = ...
|
|
41
42
|
def resolve_paths(self, root_directory_path: Path) -> None:
|
|
42
43
|
"""Resolves all paths managed by the class instance based on the input root directory path.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sl-shared-assets
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0rc8
|
|
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/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
sl_shared_assets/__init__.py,sha256=
|
|
2
|
-
sl_shared_assets/__init__.pyi,sha256=
|
|
1
|
+
sl_shared_assets/__init__.py,sha256=RzYuJclcE8EpbAC1wRb6eFIycPpsEmNvGkndrIxtmis,2197
|
|
2
|
+
sl_shared_assets/__init__.pyi,sha256=58fHlHTVMfrX4wDnYC2U_mkNMefw7odPn29nN1UnxFU,2399
|
|
3
3
|
sl_shared_assets/cli.py,sha256=R_h_Dlla48mG1LpFDDE9flZ_NyDC9UguRUAYZL6gA9s,18383
|
|
4
4
|
sl_shared_assets/cli.pyi,sha256=8ZJK56_jh2QlF3XCN6c7fI6Z022XtehB0eCrQDJbAsU,5515
|
|
5
5
|
sl_shared_assets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
sl_shared_assets/data_classes/__init__.py,sha256=
|
|
7
|
-
sl_shared_assets/data_classes/__init__.pyi,sha256=
|
|
8
|
-
sl_shared_assets/data_classes/configuration_data.py,sha256=
|
|
9
|
-
sl_shared_assets/data_classes/configuration_data.pyi,sha256=
|
|
6
|
+
sl_shared_assets/data_classes/__init__.py,sha256=SUDN7gFngUPEa7Da_G0PjXwnF9Q0S4EgvjpKe3KSr5g,1852
|
|
7
|
+
sl_shared_assets/data_classes/__init__.pyi,sha256=J-tUXAtGEasacVU1qGFFksvfB1tFdEO-GKs90vSTAcg,2022
|
|
8
|
+
sl_shared_assets/data_classes/configuration_data.py,sha256=0uKfFrUO-9xI3MvWNf2xxGZ_RuxJ7MW3yjHXAqPNPeA,34782
|
|
9
|
+
sl_shared_assets/data_classes/configuration_data.pyi,sha256=DNsz6HCs0cPBP7Sn7G_-Y9z_fTFd0ub2s-97wlrPcb4,10723
|
|
10
10
|
sl_shared_assets/data_classes/runtime_data.py,sha256=O98BZg7i7cEUlpIE16JswKOwQNRsS5RxVdBzXYvAw00,16543
|
|
11
11
|
sl_shared_assets/data_classes/runtime_data.pyi,sha256=i8CuZd9p0Nu43xhpE62pB07AiovZIgtMZYN5wQjz-r0,6861
|
|
12
|
-
sl_shared_assets/data_classes/session_data.py,sha256=
|
|
13
|
-
sl_shared_assets/data_classes/session_data.pyi,sha256=
|
|
12
|
+
sl_shared_assets/data_classes/session_data.py,sha256=3MwnDSUJt4PLMcFfQMg7gt5ogoxP2kuc6n98qYFldOc,44699
|
|
13
|
+
sl_shared_assets/data_classes/session_data.pyi,sha256=rgab48TLjWMtSIg2qIuXRG1rQhs_2WfItjEl-MaRW8U,13654
|
|
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
|
|
@@ -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.
|
|
33
|
-
sl_shared_assets-3.0.
|
|
34
|
-
sl_shared_assets-3.0.
|
|
35
|
-
sl_shared_assets-3.0.
|
|
36
|
-
sl_shared_assets-3.0.
|
|
32
|
+
sl_shared_assets-3.0.0rc8.dist-info/METADATA,sha256=pvUOjPIynm4Ue5yT2eV4eg4-cNw8_fGT_HPot8lbRcE,49309
|
|
33
|
+
sl_shared_assets-3.0.0rc8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
sl_shared_assets-3.0.0rc8.dist-info/entry_points.txt,sha256=UmO1rl7ly9N7HWPwWyP9E0b5KBUStpBo4TRoqNtizDY,430
|
|
35
|
+
sl_shared_assets-3.0.0rc8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
36
|
+
sl_shared_assets-3.0.0rc8.dist-info/RECORD,,
|
|
File without changes
|
{sl_shared_assets-3.0.0rc7.dist-info → sl_shared_assets-3.0.0rc8.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{sl_shared_assets-3.0.0rc7.dist-info → sl_shared_assets-3.0.0rc8.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|