sl-shared-assets 1.0.0rc15__py3-none-any.whl → 1.0.0rc17__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/data_classes/session_data.py +27 -9
- sl_shared_assets/suite2p/multi_day.py +119 -87
- sl_shared_assets/suite2p/single_day.py +220 -136
- {sl_shared_assets-1.0.0rc15.dist-info → sl_shared_assets-1.0.0rc17.dist-info}/METADATA +1 -1
- sl_shared_assets-1.0.0rc17.dist-info/RECORD +23 -0
- sl_shared_assets/__init__.pyi +0 -71
- sl_shared_assets/cli.pyi +0 -28
- sl_shared_assets/data_classes/__init__.pyi +0 -61
- sl_shared_assets/data_classes/configuration_data.pyi +0 -37
- sl_shared_assets/data_classes/runtime_data.pyi +0 -145
- sl_shared_assets/data_classes/session_data.pyi +0 -527
- sl_shared_assets/data_classes/surgery_data.pyi +0 -89
- sl_shared_assets/server/__init__.pyi +0 -8
- sl_shared_assets/server/job.pyi +0 -94
- sl_shared_assets/server/server.pyi +0 -95
- sl_shared_assets/suite2p/__init__.pyi +0 -4
- sl_shared_assets/suite2p/multi_day.pyi +0 -99
- sl_shared_assets/suite2p/single_day.pyi +0 -192
- sl_shared_assets/tools/__init__.pyi +0 -5
- sl_shared_assets/tools/ascension_tools.pyi +0 -68
- sl_shared_assets/tools/packaging_tools.pyi +0 -52
- sl_shared_assets/tools/transfer_tools.pyi +0 -53
- sl_shared_assets-1.0.0rc15.dist-info/RECORD +0 -40
- {sl_shared_assets-1.0.0rc15.dist-info → sl_shared_assets-1.0.0rc17.dist-info}/WHEEL +0 -0
- {sl_shared_assets-1.0.0rc15.dist-info → sl_shared_assets-1.0.0rc17.dist-info}/entry_points.txt +0 -0
- {sl_shared_assets-1.0.0rc15.dist-info → sl_shared_assets-1.0.0rc17.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
sl_shared_assets/__init__.py,sha256=VASYVzsHnaFykp1xdEjOgQdnfuqwokaKIp387zXyFqA,2080
|
|
2
|
+
sl_shared_assets/cli.py,sha256=a4Ja2gm4ykOac7QmHen14Jhgu6955IUQDZrysp1RpFM,4207
|
|
3
|
+
sl_shared_assets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
sl_shared_assets/data_classes/__init__.py,sha256=pq-iyd4eyv1CPVcLcQQJBVAm7XCDWuZqxurrLOMW3e0,1702
|
|
5
|
+
sl_shared_assets/data_classes/configuration_data.py,sha256=zKZ3cE2pZFDRiQ7off8hu2nV9JsBly9Phc5goY4qCH4,4163
|
|
6
|
+
sl_shared_assets/data_classes/runtime_data.py,sha256=jSCvZG01gkcSUexFiKITjTJ8ZoF18qRfxiwhyrWW7-I,13964
|
|
7
|
+
sl_shared_assets/data_classes/session_data.py,sha256=Xn7t6kbhQfif7oneT2SLppBGXCfmDGtYOKj3HM7t64U,79135
|
|
8
|
+
sl_shared_assets/data_classes/surgery_data.py,sha256=Z4QZAZCz0_w7qrGMMzYn-fwwwycw3ki9SPJU0kD5Ap4,7425
|
|
9
|
+
sl_shared_assets/server/__init__.py,sha256=nyX6-9ACcrQeRQOCNvBVrWSTHGjRPANIG_u0aq7HPTg,426
|
|
10
|
+
sl_shared_assets/server/job.py,sha256=M7ZytqhluEV-YQPM9VQV3SqK-F9egQ3UcLc1SLBH4rA,7885
|
|
11
|
+
sl_shared_assets/server/server.py,sha256=NpqWVjvxdtxHZIooBVaKY2jEBDN3dGohBzrFA0TSKIU,9380
|
|
12
|
+
sl_shared_assets/suite2p/__init__.py,sha256=8N2BQNINBkH7JNODmYACHhvUH_uurTuw7w0PW3rVRYM,411
|
|
13
|
+
sl_shared_assets/suite2p/multi_day.py,sha256=2_AHI91wuxwS07GFJn8S1454uLrQGmt0bS_qBoZsHVc,13102
|
|
14
|
+
sl_shared_assets/suite2p/single_day.py,sha256=7dgYN9FnIvxNL0uHo0CtoLng2nRxZJYtV_AfskMt6tE,29961
|
|
15
|
+
sl_shared_assets/tools/__init__.py,sha256=UWrNfseGupOrY4OK2PgDEJ-Q3LbSrPLC2pfaLm8wYBA,468
|
|
16
|
+
sl_shared_assets/tools/ascension_tools.py,sha256=y2w72Czpbw9LwgsbdEx_ckzMKTZ78cgKPTIk6vRYmAk,15877
|
|
17
|
+
sl_shared_assets/tools/packaging_tools.py,sha256=LOKCKvT6UD_cidCONaI4ctWyej5zEwwdhhgwYrj60Kg,6746
|
|
18
|
+
sl_shared_assets/tools/transfer_tools.py,sha256=J26kwOp_NpPSY0-xu5FTw9udte-rm_mW1FJyaTNoqQI,6606
|
|
19
|
+
sl_shared_assets-1.0.0rc17.dist-info/METADATA,sha256=71y5EAy43UddnuutTvU2PGjupezOo8haw-PmMYQ30PM,47807
|
|
20
|
+
sl_shared_assets-1.0.0rc17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
21
|
+
sl_shared_assets-1.0.0rc17.dist-info/entry_points.txt,sha256=bdnmVAcK3nrKi9QEYeNMrCLFH5LQ4BMBfwbLIgLPtq4,222
|
|
22
|
+
sl_shared_assets-1.0.0rc17.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
23
|
+
sl_shared_assets-1.0.0rc17.dist-info/RECORD,,
|
sl_shared_assets/__init__.pyi
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
from .tools import (
|
|
2
|
-
transfer_directory as transfer_directory,
|
|
3
|
-
calculate_directory_checksum as calculate_directory_checksum,
|
|
4
|
-
)
|
|
5
|
-
from .server import (
|
|
6
|
-
Server as Server,
|
|
7
|
-
ServerCredentials as ServerCredentials,
|
|
8
|
-
)
|
|
9
|
-
from .suite2p import (
|
|
10
|
-
MultiDayS2PConfiguration as MultiDayS2PConfiguration,
|
|
11
|
-
SingleDayS2PConfiguration as SingleDayS2PConfiguration,
|
|
12
|
-
)
|
|
13
|
-
from .data_classes import (
|
|
14
|
-
RawData as RawData,
|
|
15
|
-
DrugData as DrugData,
|
|
16
|
-
ImplantData as ImplantData,
|
|
17
|
-
SessionData as SessionData,
|
|
18
|
-
SubjectData as SubjectData,
|
|
19
|
-
SurgeryData as SurgeryData,
|
|
20
|
-
InjectionData as InjectionData,
|
|
21
|
-
MesoscopeData as MesoscopeData,
|
|
22
|
-
ProcedureData as ProcedureData,
|
|
23
|
-
ProcessedData as ProcessedData,
|
|
24
|
-
DeepLabCutData as DeepLabCutData,
|
|
25
|
-
ZaberPositions as ZaberPositions,
|
|
26
|
-
ExperimentState as ExperimentState,
|
|
27
|
-
VRPCDestinations as VRPCDestinations,
|
|
28
|
-
ConfigurationData as ConfigurationData,
|
|
29
|
-
MesoscopePositions as MesoscopePositions,
|
|
30
|
-
VRPCPersistentData as VRPCPersistentData,
|
|
31
|
-
ProjectConfiguration as ProjectConfiguration,
|
|
32
|
-
HardwareConfiguration as HardwareConfiguration,
|
|
33
|
-
RunTrainingDescriptor as RunTrainingDescriptor,
|
|
34
|
-
LickTrainingDescriptor as LickTrainingDescriptor,
|
|
35
|
-
ExperimentConfiguration as ExperimentConfiguration,
|
|
36
|
-
ScanImagePCPersistentData as ScanImagePCPersistentData,
|
|
37
|
-
MesoscopeExperimentDescriptor as MesoscopeExperimentDescriptor,
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
__all__ = [
|
|
41
|
-
"Server",
|
|
42
|
-
"ServerCredentials",
|
|
43
|
-
"SingleDayS2PConfiguration",
|
|
44
|
-
"MultiDayS2PConfiguration",
|
|
45
|
-
"DrugData",
|
|
46
|
-
"ImplantData",
|
|
47
|
-
"SessionData",
|
|
48
|
-
"RawData",
|
|
49
|
-
"ProcessedData",
|
|
50
|
-
"ConfigurationData",
|
|
51
|
-
"DeepLabCutData",
|
|
52
|
-
"VRPCPersistentData",
|
|
53
|
-
"ScanImagePCPersistentData",
|
|
54
|
-
"MesoscopeData",
|
|
55
|
-
"VRPCDestinations",
|
|
56
|
-
"SubjectData",
|
|
57
|
-
"SurgeryData",
|
|
58
|
-
"InjectionData",
|
|
59
|
-
"ProcedureData",
|
|
60
|
-
"ZaberPositions",
|
|
61
|
-
"ExperimentState",
|
|
62
|
-
"MesoscopePositions",
|
|
63
|
-
"ProjectConfiguration",
|
|
64
|
-
"HardwareConfiguration",
|
|
65
|
-
"RunTrainingDescriptor",
|
|
66
|
-
"LickTrainingDescriptor",
|
|
67
|
-
"ExperimentConfiguration",
|
|
68
|
-
"MesoscopeExperimentDescriptor",
|
|
69
|
-
"transfer_directory",
|
|
70
|
-
"calculate_directory_checksum",
|
|
71
|
-
]
|
sl_shared_assets/cli.pyi
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
from .tools import ascend_tyche_data as ascend_tyche_data
|
|
2
|
-
from .server import generate_server_credentials as generate_server_credentials
|
|
3
|
-
from .data_classes import replace_root_path as replace_root_path
|
|
4
|
-
|
|
5
|
-
def replace_local_root_directory(path: str) -> None:
|
|
6
|
-
"""Replaces the root directory used to store all lab projects on the local PC with the specified directory.
|
|
7
|
-
|
|
8
|
-
To ensure all projects are saved in the same location, this library resolves and saves the absolute path to the
|
|
9
|
-
project directory the first time ProjectConfiguration class instance is created on a new PC. All future projects
|
|
10
|
-
automatically reuse the same 'root' directory path. Since this information is stored in a typically hidden user
|
|
11
|
-
directory, this CLI can be used to replace the local directory path, if necessary.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
def generate_server_credentials_file(output_directory: str, host: str, username: str, password: str) -> None:
|
|
15
|
-
"""Generates a new server_credentials.yaml file under the specified directory, using input information.
|
|
16
|
-
|
|
17
|
-
This CLI is used to set up new PCs to work with the lab BioHPC server. While this is primarily intended for the
|
|
18
|
-
VRPC, any machined that interacts with BioHPC server can use this CLI to build the access credentials file.
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
def ascend_tyche_directory(path: str, output_directory: str, server_directory: str) -> None:
|
|
22
|
-
"""Restructures old Tyche project data to use the modern Sun lab data structure.
|
|
23
|
-
|
|
24
|
-
This CLI is used to convert ('ascend') the old Tyche project data to the modern Sun lab structure. After
|
|
25
|
-
ascension, the data can be processed and analyzed using all modern Sun lab (sl-) tools and libraries. Note, this
|
|
26
|
-
process expects the input data to be preprocessed using an old Sun lab mesoscope data preprocessing pipeline. It
|
|
27
|
-
will not work for any other project or data.
|
|
28
|
-
"""
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
from .runtime_data import (
|
|
2
|
-
ZaberPositions as ZaberPositions,
|
|
3
|
-
MesoscopePositions as MesoscopePositions,
|
|
4
|
-
HardwareConfiguration as HardwareConfiguration,
|
|
5
|
-
RunTrainingDescriptor as RunTrainingDescriptor,
|
|
6
|
-
LickTrainingDescriptor as LickTrainingDescriptor,
|
|
7
|
-
MesoscopeExperimentDescriptor as MesoscopeExperimentDescriptor,
|
|
8
|
-
)
|
|
9
|
-
from .session_data import (
|
|
10
|
-
RawData as RawData,
|
|
11
|
-
SessionData as SessionData,
|
|
12
|
-
MesoscopeData as MesoscopeData,
|
|
13
|
-
ProcessedData as ProcessedData,
|
|
14
|
-
DeepLabCutData as DeepLabCutData,
|
|
15
|
-
VRPCDestinations as VRPCDestinations,
|
|
16
|
-
ConfigurationData as ConfigurationData,
|
|
17
|
-
VRPCPersistentData as VRPCPersistentData,
|
|
18
|
-
ProjectConfiguration as ProjectConfiguration,
|
|
19
|
-
ScanImagePCPersistentData as ScanImagePCPersistentData,
|
|
20
|
-
replace_root_path as replace_root_path,
|
|
21
|
-
)
|
|
22
|
-
from .surgery_data import (
|
|
23
|
-
DrugData as DrugData,
|
|
24
|
-
ImplantData as ImplantData,
|
|
25
|
-
SubjectData as SubjectData,
|
|
26
|
-
SurgeryData as SurgeryData,
|
|
27
|
-
InjectionData as InjectionData,
|
|
28
|
-
ProcedureData as ProcedureData,
|
|
29
|
-
)
|
|
30
|
-
from .configuration_data import (
|
|
31
|
-
ExperimentState as ExperimentState,
|
|
32
|
-
ExperimentConfiguration as ExperimentConfiguration,
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
__all__ = [
|
|
36
|
-
"DrugData",
|
|
37
|
-
"ImplantData",
|
|
38
|
-
"SessionData",
|
|
39
|
-
"RawData",
|
|
40
|
-
"ProcessedData",
|
|
41
|
-
"ConfigurationData",
|
|
42
|
-
"DeepLabCutData",
|
|
43
|
-
"VRPCPersistentData",
|
|
44
|
-
"ScanImagePCPersistentData",
|
|
45
|
-
"MesoscopeData",
|
|
46
|
-
"VRPCDestinations",
|
|
47
|
-
"SubjectData",
|
|
48
|
-
"SurgeryData",
|
|
49
|
-
"InjectionData",
|
|
50
|
-
"ProcedureData",
|
|
51
|
-
"ZaberPositions",
|
|
52
|
-
"ExperimentState",
|
|
53
|
-
"MesoscopePositions",
|
|
54
|
-
"ProjectConfiguration",
|
|
55
|
-
"HardwareConfiguration",
|
|
56
|
-
"RunTrainingDescriptor",
|
|
57
|
-
"LickTrainingDescriptor",
|
|
58
|
-
"ExperimentConfiguration",
|
|
59
|
-
"MesoscopeExperimentDescriptor",
|
|
60
|
-
"replace_root_path",
|
|
61
|
-
]
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
from pathlib import Path as Path
|
|
2
|
-
from dataclasses import field, dataclass
|
|
3
|
-
|
|
4
|
-
from _typeshed import Incomplete
|
|
5
|
-
from ataraxis_data_structures import YamlConfig
|
|
6
|
-
|
|
7
|
-
@dataclass()
|
|
8
|
-
class ExperimentState:
|
|
9
|
-
"""Encapsulates the information used to set and maintain the desired experiment and Mesoscope-VR system state.
|
|
10
|
-
|
|
11
|
-
Primarily, experiment runtime logic (task logic) is resolved by the Unity game engine. However, the Mesoscope-VR
|
|
12
|
-
system configuration may also need to change throughout the experiment to optimize the runtime by disabling or
|
|
13
|
-
reconfiguring specific hardware modules. For example, some experiment stages may require the running wheel to be
|
|
14
|
-
locked to prevent the animal from running, and other may require the VR screens to be turned off.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
experiment_state_code: int
|
|
18
|
-
vr_state_code: int
|
|
19
|
-
state_duration_s: float
|
|
20
|
-
|
|
21
|
-
@dataclass()
|
|
22
|
-
class ExperimentConfiguration(YamlConfig):
|
|
23
|
-
"""Stores the configuration of a single experiment runtime.
|
|
24
|
-
|
|
25
|
-
Primarily, this includes the sequence of experiment and Virtual Reality (Mesoscope-VR) states that defines the flow
|
|
26
|
-
of the experiment runtime. During runtime, the main runtime control function traverses the sequence of states
|
|
27
|
-
stored in this class instance start-to-end in the exact order specified by the user. Together with custom Unity
|
|
28
|
-
projects that define the task logic (how the system responds to animal interactions with the VR system) this class
|
|
29
|
-
allows flexibly implementing a wide range of experiments.
|
|
30
|
-
|
|
31
|
-
Each project should define one or more experiment configurations and save them as .yaml files inside the project
|
|
32
|
-
'configuration' folder. The name for each configuration file is defined by the user and is used to identify and load
|
|
33
|
-
the experiment configuration when 'sl-run-experiment' CLI command exposed by the sl-experiment library is executed.
|
|
34
|
-
"""
|
|
35
|
-
|
|
36
|
-
cue_map: dict[int, float] = field(default_factory=Incomplete)
|
|
37
|
-
experiment_states: dict[str, ExperimentState] = field(default_factory=Incomplete)
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
from dataclasses import dataclass
|
|
2
|
-
|
|
3
|
-
from ataraxis_data_structures import YamlConfig
|
|
4
|
-
|
|
5
|
-
@dataclass()
|
|
6
|
-
class HardwareConfiguration(YamlConfig):
|
|
7
|
-
"""This class is used to save the runtime hardware configuration parameters as a .yaml file.
|
|
8
|
-
|
|
9
|
-
This information is used to read and decode the data saved to the .npz log files during runtime as part of data
|
|
10
|
-
processing.
|
|
11
|
-
|
|
12
|
-
Notes:
|
|
13
|
-
All fields in this dataclass initialize to None. During log processing, any log associated with a hardware
|
|
14
|
-
module that provides the data stored in a field will be processed, unless that field is None. Therefore, setting
|
|
15
|
-
any field in this dataclass to None also functions as a flag for whether to parse the log associated with the
|
|
16
|
-
module that provides this field's information.
|
|
17
|
-
|
|
18
|
-
This class is automatically configured by MesoscopeExperiment and BehaviorTraining classes from sl-experiment
|
|
19
|
-
library to facilitate log parsing.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
cue_map: dict[int, float] | None = ...
|
|
23
|
-
cm_per_pulse: float | None = ...
|
|
24
|
-
maximum_break_strength: float | None = ...
|
|
25
|
-
minimum_break_strength: float | None = ...
|
|
26
|
-
lick_threshold: int | None = ...
|
|
27
|
-
valve_scale_coefficient: float | None = ...
|
|
28
|
-
valve_nonlinearity_exponent: float | None = ...
|
|
29
|
-
torque_per_adc_unit: float | None = ...
|
|
30
|
-
screens_initially_on: bool | None = ...
|
|
31
|
-
recorded_mesoscope_ttl: bool | None = ...
|
|
32
|
-
|
|
33
|
-
@dataclass()
|
|
34
|
-
class LickTrainingDescriptor(YamlConfig):
|
|
35
|
-
"""This class is used to save the description information specific to lick training sessions as a .yaml file.
|
|
36
|
-
|
|
37
|
-
The information stored in this class instance is filled in two steps. The main runtime function fills most fields
|
|
38
|
-
of the class, before it is saved as a .yaml file. After runtime, the experimenter manually fills leftover fields,
|
|
39
|
-
such as 'experimenter_notes,' before the class instance is transferred to the long-term storage destination.
|
|
40
|
-
|
|
41
|
-
The fully filled instance data is also used during preprocessing to write the water restriction log entry for the
|
|
42
|
-
trained animal.
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
experimenter: str
|
|
46
|
-
mouse_weight_g: float
|
|
47
|
-
dispensed_water_volume_ml: float
|
|
48
|
-
minimum_reward_delay: int
|
|
49
|
-
maximum_reward_delay_s: int
|
|
50
|
-
maximum_water_volume_ml: float
|
|
51
|
-
maximum_training_time_m: int
|
|
52
|
-
experimenter_notes: str = ...
|
|
53
|
-
experimenter_given_water_volume_ml: float = ...
|
|
54
|
-
|
|
55
|
-
@dataclass()
|
|
56
|
-
class RunTrainingDescriptor(YamlConfig):
|
|
57
|
-
"""This class is used to save the description information specific to run training sessions as a .yaml file.
|
|
58
|
-
|
|
59
|
-
The information stored in this class instance is filled in two steps. The main runtime function fills most fields
|
|
60
|
-
of the class, before it is saved as a .yaml file. After runtime, the experimenter manually fills leftover fields,
|
|
61
|
-
such as 'experimenter_notes,' before the class instance is transferred to the long-term storage destination.
|
|
62
|
-
|
|
63
|
-
The fully filled instance data is also used during preprocessing to write the water restriction log entry for the
|
|
64
|
-
trained animal.
|
|
65
|
-
"""
|
|
66
|
-
|
|
67
|
-
experimenter: str
|
|
68
|
-
mouse_weight_g: float
|
|
69
|
-
dispensed_water_volume_ml: float
|
|
70
|
-
final_run_speed_threshold_cm_s: float
|
|
71
|
-
final_run_duration_threshold_s: float
|
|
72
|
-
initial_run_speed_threshold_cm_s: float
|
|
73
|
-
initial_run_duration_threshold_s: float
|
|
74
|
-
increase_threshold_ml: float
|
|
75
|
-
run_speed_increase_step_cm_s: float
|
|
76
|
-
run_duration_increase_step_s: float
|
|
77
|
-
maximum_water_volume_ml: float
|
|
78
|
-
maximum_training_time_m: int
|
|
79
|
-
experimenter_notes: str = ...
|
|
80
|
-
experimenter_given_water_volume_ml: float = ...
|
|
81
|
-
|
|
82
|
-
@dataclass()
|
|
83
|
-
class MesoscopeExperimentDescriptor(YamlConfig):
|
|
84
|
-
"""This class is used to save the description information specific to experiment sessions as a .yaml file.
|
|
85
|
-
|
|
86
|
-
The information stored in this class instance is filled in two steps. The main runtime function fills most fields
|
|
87
|
-
of the class, before it is saved as a .yaml file. After runtime, the experimenter manually fills leftover fields,
|
|
88
|
-
such as 'experimenter_notes,' before the class instance is transferred to the long-term storage destination.
|
|
89
|
-
|
|
90
|
-
The fully filled instance data is also used during preprocessing to write the water restriction log entry for the
|
|
91
|
-
animal participating in the experiment runtime.
|
|
92
|
-
"""
|
|
93
|
-
|
|
94
|
-
experimenter: str
|
|
95
|
-
mouse_weight_g: float
|
|
96
|
-
dispensed_water_volume_ml: float
|
|
97
|
-
experimenter_notes: str = ...
|
|
98
|
-
experimenter_given_water_volume_ml: float = ...
|
|
99
|
-
|
|
100
|
-
@dataclass()
|
|
101
|
-
class ZaberPositions(YamlConfig):
|
|
102
|
-
"""This class is used to save Zaber motor positions as a .yaml file to reuse them between sessions.
|
|
103
|
-
|
|
104
|
-
The class is specifically designed to store, save, and load the positions of the LickPort and HeadBar motors
|
|
105
|
-
(axes). It is used to both store Zaber motor positions for each session for future analysis and to restore the same
|
|
106
|
-
Zaber motor positions across consecutive runtimes for the same project and animal combination.
|
|
107
|
-
|
|
108
|
-
Notes:
|
|
109
|
-
All positions are saved using native motor units. All class fields initialize to default placeholders that are
|
|
110
|
-
likely NOT safe to apply to the VR system. Do not apply the positions loaded from the file unless you are
|
|
111
|
-
certain they are safe to use.
|
|
112
|
-
|
|
113
|
-
Exercise caution when working with Zaber motors. The motors are powerful enough to damage the surrounding
|
|
114
|
-
equipment and manipulated objects. Do not modify the data stored inside the .yaml file unless you know what you
|
|
115
|
-
are doing.
|
|
116
|
-
"""
|
|
117
|
-
|
|
118
|
-
headbar_z: int = ...
|
|
119
|
-
headbar_pitch: int = ...
|
|
120
|
-
headbar_roll: int = ...
|
|
121
|
-
lickport_z: int = ...
|
|
122
|
-
lickport_x: int = ...
|
|
123
|
-
lickport_y: int = ...
|
|
124
|
-
|
|
125
|
-
@dataclass()
|
|
126
|
-
class MesoscopePositions(YamlConfig):
|
|
127
|
-
"""This class is used to save the real and virtual Mesoscope objective positions as a .yaml file to reuse it
|
|
128
|
-
between experiment sessions.
|
|
129
|
-
|
|
130
|
-
Primarily, the class is used to help the experimenter to position the Mesoscope at the same position across
|
|
131
|
-
multiple imaging sessions. It stores both the physical (real) position of the objective along the motorized
|
|
132
|
-
X, Y, Z, and Roll axes and the virtual (ScanImage software) tip, tilt, and fastZ focus axes.
|
|
133
|
-
|
|
134
|
-
Notes:
|
|
135
|
-
Since the API to read and write these positions automatically is currently not available, this class relies on
|
|
136
|
-
the experimenter manually entering all positions and setting the mesoscope to these positions when necessary.
|
|
137
|
-
"""
|
|
138
|
-
|
|
139
|
-
mesoscope_x_position: float = ...
|
|
140
|
-
mesoscope_y_position: float = ...
|
|
141
|
-
mesoscope_roll_position: float = ...
|
|
142
|
-
mesoscope_z_position: float = ...
|
|
143
|
-
mesoscope_fast_z_position: float = ...
|
|
144
|
-
mesoscope_tip_position: float = ...
|
|
145
|
-
mesoscope_tilt_position: float = ...
|