sl-shared-assets 3.1.2__py3-none-any.whl → 4.0.0__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 +8 -0
- sl_shared_assets/__init__.pyi +8 -0
- sl_shared_assets/cli.py +41 -24
- sl_shared_assets/cli.pyi +9 -4
- sl_shared_assets/data_classes/__init__.py +13 -1
- sl_shared_assets/data_classes/__init__.pyi +6 -0
- sl_shared_assets/data_classes/configuration_data.py +1 -1
- sl_shared_assets/data_classes/runtime_data.py +20 -9
- sl_shared_assets/data_classes/runtime_data.pyi +7 -4
- sl_shared_assets/data_classes/session_data.py +271 -232
- sl_shared_assets/data_classes/session_data.pyi +113 -36
- sl_shared_assets/data_classes/surgery_data.py +1 -1
- sl_shared_assets/data_classes/surgery_data.pyi +1 -1
- sl_shared_assets/server/server.py +41 -4
- sl_shared_assets/server/server.pyi +13 -1
- sl_shared_assets/tools/packaging_tools.py +7 -8
- sl_shared_assets/tools/packaging_tools.pyi +2 -0
- sl_shared_assets/tools/project_management_tools.py +195 -61
- sl_shared_assets/tools/project_management_tools.pyi +48 -12
- {sl_shared_assets-3.1.2.dist-info → sl_shared_assets-4.0.0.dist-info}/METADATA +45 -48
- sl_shared_assets-4.0.0.dist-info/RECORD +36 -0
- sl_shared_assets-3.1.2.dist-info/RECORD +0 -36
- {sl_shared_assets-3.1.2.dist-info → sl_shared_assets-4.0.0.dist-info}/WHEEL +0 -0
- {sl_shared_assets-3.1.2.dist-info → sl_shared_assets-4.0.0.dist-info}/entry_points.txt +0 -0
- {sl_shared_assets-3.1.2.dist-info → sl_shared_assets-4.0.0.dist-info}/licenses/LICENSE +0 -0
sl_shared_assets/__init__.py
CHANGED
|
@@ -11,6 +11,7 @@ from .tools import (
|
|
|
11
11
|
ProjectManifest,
|
|
12
12
|
resolve_p53_marker,
|
|
13
13
|
transfer_directory,
|
|
14
|
+
generate_project_manifest,
|
|
14
15
|
calculate_directory_checksum,
|
|
15
16
|
)
|
|
16
17
|
from .server import Job, Server, JupyterJob, ServerCredentials
|
|
@@ -30,6 +31,7 @@ from .data_classes import (
|
|
|
30
31
|
ExperimentState,
|
|
31
32
|
ExperimentTrial,
|
|
32
33
|
MesoscopeCameras,
|
|
34
|
+
TrackerFileNames,
|
|
33
35
|
ProcessingTracker,
|
|
34
36
|
AcquisitionSystems,
|
|
35
37
|
MesoscopePositions,
|
|
@@ -42,6 +44,8 @@ from .data_classes import (
|
|
|
42
44
|
MesoscopeSystemConfiguration,
|
|
43
45
|
MesoscopeExperimentDescriptor,
|
|
44
46
|
MesoscopeExperimentConfiguration,
|
|
47
|
+
generate_manager_id,
|
|
48
|
+
get_processing_tracker,
|
|
45
49
|
get_system_configuration_data,
|
|
46
50
|
set_system_configuration_file,
|
|
47
51
|
)
|
|
@@ -86,9 +90,13 @@ __all__ = [
|
|
|
86
90
|
"SessionTypes",
|
|
87
91
|
"AcquisitionSystems",
|
|
88
92
|
"WindowCheckingDescriptor",
|
|
93
|
+
"get_processing_tracker",
|
|
94
|
+
"generate_manager_id",
|
|
95
|
+
"TrackerFileNames",
|
|
89
96
|
# Tools package
|
|
90
97
|
"ProjectManifest",
|
|
91
98
|
"resolve_p53_marker",
|
|
92
99
|
"transfer_directory",
|
|
93
100
|
"calculate_directory_checksum",
|
|
101
|
+
"generate_project_manifest",
|
|
94
102
|
]
|
sl_shared_assets/__init__.pyi
CHANGED
|
@@ -2,6 +2,7 @@ from .tools import (
|
|
|
2
2
|
ProjectManifest as ProjectManifest,
|
|
3
3
|
resolve_p53_marker as resolve_p53_marker,
|
|
4
4
|
transfer_directory as transfer_directory,
|
|
5
|
+
generate_project_manifest as generate_project_manifest,
|
|
5
6
|
calculate_directory_checksum as calculate_directory_checksum,
|
|
6
7
|
)
|
|
7
8
|
from .server import (
|
|
@@ -26,6 +27,7 @@ from .data_classes import (
|
|
|
26
27
|
ExperimentState as ExperimentState,
|
|
27
28
|
ExperimentTrial as ExperimentTrial,
|
|
28
29
|
MesoscopeCameras as MesoscopeCameras,
|
|
30
|
+
TrackerFileNames as TrackerFileNames,
|
|
29
31
|
ProcessingTracker as ProcessingTracker,
|
|
30
32
|
AcquisitionSystems as AcquisitionSystems,
|
|
31
33
|
MesoscopePositions as MesoscopePositions,
|
|
@@ -38,6 +40,8 @@ from .data_classes import (
|
|
|
38
40
|
MesoscopeSystemConfiguration as MesoscopeSystemConfiguration,
|
|
39
41
|
MesoscopeExperimentDescriptor as MesoscopeExperimentDescriptor,
|
|
40
42
|
MesoscopeExperimentConfiguration as MesoscopeExperimentConfiguration,
|
|
43
|
+
generate_manager_id as generate_manager_id,
|
|
44
|
+
get_processing_tracker as get_processing_tracker,
|
|
41
45
|
get_system_configuration_data as get_system_configuration_data,
|
|
42
46
|
set_system_configuration_file as set_system_configuration_file,
|
|
43
47
|
)
|
|
@@ -76,8 +80,12 @@ __all__ = [
|
|
|
76
80
|
"SessionTypes",
|
|
77
81
|
"AcquisitionSystems",
|
|
78
82
|
"WindowCheckingDescriptor",
|
|
83
|
+
"get_processing_tracker",
|
|
84
|
+
"generate_manager_id",
|
|
85
|
+
"TrackerFileNames",
|
|
79
86
|
"ProjectManifest",
|
|
80
87
|
"resolve_p53_marker",
|
|
81
88
|
"transfer_directory",
|
|
82
89
|
"calculate_directory_checksum",
|
|
90
|
+
"generate_project_manifest",
|
|
83
91
|
]
|
sl_shared_assets/cli.py
CHANGED
|
@@ -7,7 +7,7 @@ from ataraxis_base_utilities import LogLevel, console, ensure_directory_exists
|
|
|
7
7
|
|
|
8
8
|
from .tools import ascend_tyche_data, resolve_p53_marker, verify_session_checksum, generate_project_manifest
|
|
9
9
|
from .server import Server, JupyterJob, generate_server_credentials
|
|
10
|
-
from .data_classes import SessionData,
|
|
10
|
+
from .data_classes import SessionData, TrackerFileNames, get_processing_tracker
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
@click.command()
|
|
@@ -18,6 +18,18 @@ from .data_classes import SessionData, ProcessingTracker
|
|
|
18
18
|
required=True,
|
|
19
19
|
help="The absolute path to the session directory whose raw data needs to be verified for potential corruption.",
|
|
20
20
|
)
|
|
21
|
+
@click.option(
|
|
22
|
+
"-id",
|
|
23
|
+
"--manager_id",
|
|
24
|
+
required=True,
|
|
25
|
+
default=0,
|
|
26
|
+
show_default=True,
|
|
27
|
+
help=(
|
|
28
|
+
"The xxHash-64 hash value that represents the unique identifier for the process that manages this runtime. "
|
|
29
|
+
"This is primarily used when calling this CLI on remote compute servers to ensure that only a single process "
|
|
30
|
+
"can execute the CLI at a time."
|
|
31
|
+
),
|
|
32
|
+
)
|
|
21
33
|
@click.option(
|
|
22
34
|
"-c",
|
|
23
35
|
"--create_processed_directories",
|
|
@@ -26,7 +38,7 @@ from .data_classes import SessionData, ProcessingTracker
|
|
|
26
38
|
default=False,
|
|
27
39
|
help=(
|
|
28
40
|
"Determines whether to create the processed data hierarchy. This flag should be disabled for most runtimes. "
|
|
29
|
-
"Primarily, it is used by
|
|
41
|
+
"Primarily, it is used by acquisition systems to generate processed data directories on the remote "
|
|
30
42
|
"compute servers as part of the data preprocessing pipeline."
|
|
31
43
|
),
|
|
32
44
|
)
|
|
@@ -54,7 +66,11 @@ from .data_classes import SessionData, ProcessingTracker
|
|
|
54
66
|
),
|
|
55
67
|
)
|
|
56
68
|
def verify_session_integrity(
|
|
57
|
-
session_path: Path,
|
|
69
|
+
session_path: Path,
|
|
70
|
+
manager_id: int,
|
|
71
|
+
create_processed_directories: bool,
|
|
72
|
+
processed_data_root: Path | None,
|
|
73
|
+
update_manifest: bool,
|
|
58
74
|
) -> None:
|
|
59
75
|
"""Checks the integrity of the target session's raw data (contents of the raw_data directory).
|
|
60
76
|
|
|
@@ -73,14 +89,15 @@ def verify_session_integrity(
|
|
|
73
89
|
|
|
74
90
|
# Runs the verification process
|
|
75
91
|
verify_session_checksum(
|
|
76
|
-
session,
|
|
92
|
+
session_path=session,
|
|
93
|
+
manager_id=manager_id,
|
|
77
94
|
create_processed_data_directory=create_processed_directories,
|
|
78
95
|
processed_data_root=processed_data_root,
|
|
79
96
|
update_manifest=update_manifest,
|
|
80
97
|
)
|
|
81
98
|
|
|
82
99
|
# Checks the outcome of the verification process
|
|
83
|
-
tracker =
|
|
100
|
+
tracker = get_processing_tracker(root=session_data.raw_data.raw_data_path, file_name=TrackerFileNames.INTEGRITY)
|
|
84
101
|
if tracker.is_complete:
|
|
85
102
|
# noinspection PyTypeChecker
|
|
86
103
|
console.echo(message=f"Session {session.stem} raw data integrity: Verified.", level=LogLevel.SUCCESS)
|
|
@@ -105,18 +122,21 @@ def verify_session_integrity(
|
|
|
105
122
|
help="The absolute path to the directory where to store the generated project manifest file.",
|
|
106
123
|
)
|
|
107
124
|
@click.option(
|
|
108
|
-
"-
|
|
109
|
-
"--
|
|
125
|
+
"-pdr",
|
|
126
|
+
"--processed_data_root",
|
|
110
127
|
type=click.Path(exists=True, file_okay=False, dir_okay=True, path_type=Path),
|
|
111
128
|
required=False,
|
|
112
129
|
help=(
|
|
113
|
-
"The absolute path to the
|
|
114
|
-
"
|
|
115
|
-
"
|
|
130
|
+
"The absolute path to the directory where processed data from all projects is stored on the machine that runs "
|
|
131
|
+
"this command. This argument is used when calling the CLI on the BioHPC server, which uses different data "
|
|
132
|
+
"volumes for raw and processed data. Note, the input path must point to the root directory, as it will be "
|
|
133
|
+
"automatically modified to include the project name. Note, if the system cannot properly resolve the path to "
|
|
134
|
+
"the processed data, the generated manifest will indicate that no data processing has been performed for the "
|
|
135
|
+
"project."
|
|
116
136
|
),
|
|
117
137
|
)
|
|
118
138
|
def generate_project_manifest_file(
|
|
119
|
-
project_path: Path, output_directory: Path,
|
|
139
|
+
project_path: Path, output_directory: Path, processed_data_root: Path | None
|
|
120
140
|
) -> None:
|
|
121
141
|
"""Generates the manifest .feather file that provides information about the data-processing state of all available
|
|
122
142
|
project sessions.
|
|
@@ -128,7 +148,7 @@ def generate_project_manifest_file(
|
|
|
128
148
|
generate_project_manifest(
|
|
129
149
|
raw_project_directory=Path(project_path),
|
|
130
150
|
output_directory=Path(output_directory),
|
|
131
|
-
processed_data_root=Path(
|
|
151
|
+
processed_data_root=Path(processed_data_root) if processed_data_root else None,
|
|
132
152
|
)
|
|
133
153
|
# noinspection PyTypeChecker
|
|
134
154
|
console.echo(message=f"Project {Path(project_path).stem} data manifest file: generated.", level=LogLevel.SUCCESS)
|
|
@@ -428,14 +448,15 @@ def start_jupyter_server(
|
|
|
428
448
|
help="Determines whether to create the processed data hierarchy. This flag should be disabled for most runtimes.",
|
|
429
449
|
)
|
|
430
450
|
@click.option(
|
|
431
|
-
"-
|
|
432
|
-
"--
|
|
451
|
+
"-pdr",
|
|
452
|
+
"--processed_data_root",
|
|
433
453
|
type=click.Path(exists=True, file_okay=False, dir_okay=True, path_type=Path),
|
|
434
454
|
required=False,
|
|
435
455
|
help=(
|
|
436
|
-
"The absolute path to the
|
|
437
|
-
"
|
|
438
|
-
"
|
|
456
|
+
"The absolute path to the directory where processed data from all projects is stored on the machine that runs "
|
|
457
|
+
"this command. This argument is used when calling the CLI on the BioHPC server, which uses different data "
|
|
458
|
+
"volumes for raw and processed data. Note, the input path must point to the root directory, as it will be "
|
|
459
|
+
"automatically modified to include the project name."
|
|
439
460
|
),
|
|
440
461
|
)
|
|
441
462
|
@click.option(
|
|
@@ -444,11 +465,7 @@ def start_jupyter_server(
|
|
|
444
465
|
is_flag=True,
|
|
445
466
|
show_default=True,
|
|
446
467
|
default=False,
|
|
447
|
-
help=
|
|
448
|
-
"Determines whether the command should create or remove the dataset integration marker. Do not enable this "
|
|
449
|
-
"flag unless you know what you are doing. It is only safe to enable this flag if the session is not currently "
|
|
450
|
-
"being integrated into any datasets."
|
|
451
|
-
),
|
|
468
|
+
help="Determines whether the command should create or remove the dataset integration marker.",
|
|
452
469
|
)
|
|
453
470
|
@click.option(
|
|
454
471
|
"-um",
|
|
@@ -463,7 +480,7 @@ def start_jupyter_server(
|
|
|
463
480
|
def resolve_dataset_marker(
|
|
464
481
|
session_path: Path,
|
|
465
482
|
create_processed_directories: bool,
|
|
466
|
-
|
|
483
|
+
processed_data_root: Path | None,
|
|
467
484
|
remove: bool,
|
|
468
485
|
update_manifest: bool,
|
|
469
486
|
) -> None:
|
|
@@ -477,7 +494,7 @@ def resolve_dataset_marker(
|
|
|
477
494
|
resolve_p53_marker(
|
|
478
495
|
session_path=session_path,
|
|
479
496
|
create_processed_data_directory=create_processed_directories,
|
|
480
|
-
processed_data_root=
|
|
497
|
+
processed_data_root=processed_data_root,
|
|
481
498
|
remove=remove,
|
|
482
499
|
update_manifest=update_manifest,
|
|
483
500
|
)
|
sl_shared_assets/cli.pyi
CHANGED
|
@@ -13,11 +13,16 @@ from .server import (
|
|
|
13
13
|
)
|
|
14
14
|
from .data_classes import (
|
|
15
15
|
SessionData as SessionData,
|
|
16
|
-
|
|
16
|
+
TrackerFileNames as TrackerFileNames,
|
|
17
|
+
get_processing_tracker as get_processing_tracker,
|
|
17
18
|
)
|
|
18
19
|
|
|
19
20
|
def verify_session_integrity(
|
|
20
|
-
session_path: Path,
|
|
21
|
+
session_path: Path,
|
|
22
|
+
manager_id: int,
|
|
23
|
+
create_processed_directories: bool,
|
|
24
|
+
processed_data_root: Path | None,
|
|
25
|
+
update_manifest: bool,
|
|
21
26
|
) -> None:
|
|
22
27
|
"""Checks the integrity of the target session's raw data (contents of the raw_data directory).
|
|
23
28
|
|
|
@@ -33,7 +38,7 @@ def verify_session_integrity(
|
|
|
33
38
|
"""
|
|
34
39
|
|
|
35
40
|
def generate_project_manifest_file(
|
|
36
|
-
project_path: Path, output_directory: Path,
|
|
41
|
+
project_path: Path, output_directory: Path, processed_data_root: Path | None
|
|
37
42
|
) -> None:
|
|
38
43
|
"""Generates the manifest .feather file that provides information about the data-processing state of all available
|
|
39
44
|
project sessions.
|
|
@@ -88,7 +93,7 @@ def start_jupyter_server(
|
|
|
88
93
|
def resolve_dataset_marker(
|
|
89
94
|
session_path: Path,
|
|
90
95
|
create_processed_directories: bool,
|
|
91
|
-
|
|
96
|
+
processed_data_root: Path | None,
|
|
92
97
|
remove: bool,
|
|
93
98
|
update_manifest: bool,
|
|
94
99
|
) -> None:
|
|
@@ -12,7 +12,16 @@ from .runtime_data import (
|
|
|
12
12
|
WindowCheckingDescriptor,
|
|
13
13
|
MesoscopeExperimentDescriptor,
|
|
14
14
|
)
|
|
15
|
-
from .session_data import
|
|
15
|
+
from .session_data import (
|
|
16
|
+
RawData,
|
|
17
|
+
SessionData,
|
|
18
|
+
SessionTypes,
|
|
19
|
+
ProcessedData,
|
|
20
|
+
TrackerFileNames,
|
|
21
|
+
ProcessingTracker,
|
|
22
|
+
generate_manager_id,
|
|
23
|
+
get_processing_tracker,
|
|
24
|
+
)
|
|
16
25
|
from .surgery_data import (
|
|
17
26
|
DrugData,
|
|
18
27
|
ImplantData,
|
|
@@ -65,4 +74,7 @@ __all__ = [
|
|
|
65
74
|
"AcquisitionSystems",
|
|
66
75
|
"SessionTypes",
|
|
67
76
|
"WindowCheckingDescriptor",
|
|
77
|
+
"get_processing_tracker",
|
|
78
|
+
"generate_manager_id",
|
|
79
|
+
"TrackerFileNames",
|
|
68
80
|
]
|
|
@@ -12,7 +12,10 @@ from .session_data import (
|
|
|
12
12
|
SessionData as SessionData,
|
|
13
13
|
SessionTypes as SessionTypes,
|
|
14
14
|
ProcessedData as ProcessedData,
|
|
15
|
+
TrackerFileNames as TrackerFileNames,
|
|
15
16
|
ProcessingTracker as ProcessingTracker,
|
|
17
|
+
generate_manager_id as generate_manager_id,
|
|
18
|
+
get_processing_tracker as get_processing_tracker,
|
|
16
19
|
)
|
|
17
20
|
from .surgery_data import (
|
|
18
21
|
DrugData as DrugData,
|
|
@@ -66,4 +69,7 @@ __all__ = [
|
|
|
66
69
|
"AcquisitionSystems",
|
|
67
70
|
"SessionTypes",
|
|
68
71
|
"WindowCheckingDescriptor",
|
|
72
|
+
"get_processing_tracker",
|
|
73
|
+
"generate_manager_id",
|
|
74
|
+
"TrackerFileNames",
|
|
69
75
|
]
|
|
@@ -560,7 +560,7 @@ def get_system_configuration_data() -> MesoscopeSystemConfiguration:
|
|
|
560
560
|
app_dir = Path(appdirs.user_data_dir(appname="sun_lab_data", appauthor="sun_lab"))
|
|
561
561
|
path_file = app_dir.joinpath("configuration_path.txt")
|
|
562
562
|
|
|
563
|
-
# If the cache file or the Sun lab data directory
|
|
563
|
+
# If the cache file or the Sun lab data directory does not exist, aborts with an error
|
|
564
564
|
if not path_file.exists():
|
|
565
565
|
message = (
|
|
566
566
|
"Unable to resolve the path to the local system configuration file, as local machine does not have the "
|
|
@@ -87,9 +87,6 @@ class LickTrainingDescriptor(YamlConfig):
|
|
|
87
87
|
"""The ID of the experimenter running the session."""
|
|
88
88
|
mouse_weight_g: float
|
|
89
89
|
"""The weight of the animal, in grams, at the beginning of the session."""
|
|
90
|
-
dispensed_water_volume_ml: float
|
|
91
|
-
"""Stores the total water volume, in milliliters, dispensed during runtime. This excludes the water volume
|
|
92
|
-
dispensed during the paused (idle) state."""
|
|
93
90
|
minimum_reward_delay_s: int
|
|
94
91
|
"""Stores the minimum delay, in seconds, that can separate the delivery of two consecutive water rewards."""
|
|
95
92
|
maximum_reward_delay_s: int
|
|
@@ -102,6 +99,9 @@ class LickTrainingDescriptor(YamlConfig):
|
|
|
102
99
|
"""Stores the maximum number of consecutive rewards that can be delivered without the animal consuming them. If
|
|
103
100
|
the animal receives this many rewards without licking (consuming) them, reward delivery is paused until the animal
|
|
104
101
|
consumes the rewards."""
|
|
102
|
+
dispensed_water_volume_ml: float = 0.0
|
|
103
|
+
"""Stores the total water volume, in milliliters, dispensed during runtime. This excludes the water volume
|
|
104
|
+
dispensed during the paused (idle) state."""
|
|
105
105
|
pause_dispensed_water_volume_ml: float = 0.0
|
|
106
106
|
"""Stores the total water volume, in milliliters, dispensed during the paused (idle) state."""
|
|
107
107
|
experimenter_notes: str = "Replace this with your notes."
|
|
@@ -110,6 +110,9 @@ class LickTrainingDescriptor(YamlConfig):
|
|
|
110
110
|
experimenter_given_water_volume_ml: float = 0.0
|
|
111
111
|
"""The additional volume of water, in milliliters, administered by the experimenter to the animal after the session.
|
|
112
112
|
"""
|
|
113
|
+
preferred_session_water_volume_ml: float = 0.0
|
|
114
|
+
"""The volume of water, in milliliters, the animal should be receiving during the session runtime if its
|
|
115
|
+
performance matches experimenter-specified threshold."""
|
|
113
116
|
incomplete: bool = False
|
|
114
117
|
"""If this field is set to True, the session is marked as 'incomplete' and automatically excluded from all further
|
|
115
118
|
Sun lab automated processing and analysis."""
|
|
@@ -123,8 +126,6 @@ class RunTrainingDescriptor(YamlConfig):
|
|
|
123
126
|
"""The ID of the experimenter running the session."""
|
|
124
127
|
mouse_weight_g: float
|
|
125
128
|
"""The weight of the animal, in grams, at the beginning of the session."""
|
|
126
|
-
dispensed_water_volume_ml: float
|
|
127
|
-
"""Stores the total water volume, in milliliters, dispensed during runtime."""
|
|
128
129
|
final_run_speed_threshold_cm_s: float
|
|
129
130
|
"""Stores the final running speed threshold, in centimeters per second, that was active at the end of training."""
|
|
130
131
|
final_run_duration_threshold_s: float
|
|
@@ -154,6 +155,9 @@ class RunTrainingDescriptor(YamlConfig):
|
|
|
154
155
|
"""Stores the maximum time, in seconds, the animal can dip below the running speed threshold to still receive the
|
|
155
156
|
reward. This allows animals that 'run' by taking a series of large steps, briefly dipping below speed threshold at
|
|
156
157
|
the end of each step, to still get water rewards."""
|
|
158
|
+
dispensed_water_volume_ml: float = 0.0
|
|
159
|
+
"""Stores the total water volume, in milliliters, dispensed during runtime. This excludes the water volume
|
|
160
|
+
dispensed during the paused (idle) state."""
|
|
157
161
|
pause_dispensed_water_volume_ml: float = 0.0
|
|
158
162
|
"""Stores the total water volume, in milliliters, dispensed during the paused (idle) state."""
|
|
159
163
|
experimenter_notes: str = "Replace this with your notes."
|
|
@@ -162,6 +166,9 @@ class RunTrainingDescriptor(YamlConfig):
|
|
|
162
166
|
experimenter_given_water_volume_ml: float = 0.0
|
|
163
167
|
"""The additional volume of water, in milliliters, administered by the experimenter to the animal after the session.
|
|
164
168
|
"""
|
|
169
|
+
preferred_session_water_volume_ml: float = 0.0
|
|
170
|
+
"""The volume of water, in milliliters, the animal should be receiving during the session runtime if its
|
|
171
|
+
performance matches experimenter-specified threshold."""
|
|
165
172
|
incomplete: bool = False
|
|
166
173
|
"""If this field is set to True, the session is marked as 'incomplete' and automatically excluded from all further
|
|
167
174
|
Sun lab automated processing and analysis."""
|
|
@@ -175,20 +182,24 @@ class MesoscopeExperimentDescriptor(YamlConfig):
|
|
|
175
182
|
"""The ID of the experimenter running the session."""
|
|
176
183
|
mouse_weight_g: float
|
|
177
184
|
"""The weight of the animal, in grams, at the beginning of the session."""
|
|
178
|
-
dispensed_water_volume_ml: float
|
|
179
|
-
"""Stores the total water volume, in milliliters, dispensed during runtime."""
|
|
180
185
|
maximum_unconsumed_rewards: int = 1
|
|
181
186
|
"""Stores the maximum number of consecutive rewards that can be delivered without the animal consuming them. If
|
|
182
187
|
the animal receives this many rewards without licking (consuming) them, reward delivery is paused until the animal
|
|
183
188
|
consumes the rewards."""
|
|
189
|
+
dispensed_water_volume_ml: float = 0.0
|
|
190
|
+
"""Stores the total water volume, in milliliters, dispensed during runtime. This excludes the water volume
|
|
191
|
+
dispensed during the paused (idle) state."""
|
|
192
|
+
pause_dispensed_water_volume_ml: float = 0.0
|
|
193
|
+
"""Stores the total water volume, in milliliters, dispensed during the paused (idle) state."""
|
|
184
194
|
experimenter_notes: str = "Replace this with your notes."
|
|
185
195
|
"""This field is not set during runtime. It is expected that each experimenter will replace this field with their
|
|
186
196
|
notes made during runtime."""
|
|
187
|
-
pause_dispensed_water_volume_ml: float = 0.0
|
|
188
|
-
"""Stores the total water volume, in milliliters, dispensed during the paused (idle) state."""
|
|
189
197
|
experimenter_given_water_volume_ml: float = 0.0
|
|
190
198
|
"""The additional volume of water, in milliliters, administered by the experimenter to the animal after the session.
|
|
191
199
|
"""
|
|
200
|
+
preferred_session_water_volume_ml: float = 0.0
|
|
201
|
+
"""The volume of water, in milliliters, the animal should be receiving during the session runtime if its
|
|
202
|
+
performance matches experimenter-specified threshold."""
|
|
192
203
|
incomplete: bool = False
|
|
193
204
|
"""If this field is set to True, the session is marked as 'incomplete' and automatically excluded from all further
|
|
194
205
|
Sun lab automated processing and analysis."""
|
|
@@ -49,15 +49,16 @@ class LickTrainingDescriptor(YamlConfig):
|
|
|
49
49
|
|
|
50
50
|
experimenter: str
|
|
51
51
|
mouse_weight_g: float
|
|
52
|
-
dispensed_water_volume_ml: float
|
|
53
52
|
minimum_reward_delay_s: int
|
|
54
53
|
maximum_reward_delay_s: int
|
|
55
54
|
maximum_water_volume_ml: float
|
|
56
55
|
maximum_training_time_m: int
|
|
57
56
|
maximum_unconsumed_rewards: int = ...
|
|
57
|
+
dispensed_water_volume_ml: float = ...
|
|
58
58
|
pause_dispensed_water_volume_ml: float = ...
|
|
59
59
|
experimenter_notes: str = ...
|
|
60
60
|
experimenter_given_water_volume_ml: float = ...
|
|
61
|
+
preferred_session_water_volume_ml: float = ...
|
|
61
62
|
incomplete: bool = ...
|
|
62
63
|
|
|
63
64
|
@dataclass()
|
|
@@ -66,7 +67,6 @@ class RunTrainingDescriptor(YamlConfig):
|
|
|
66
67
|
|
|
67
68
|
experimenter: str
|
|
68
69
|
mouse_weight_g: float
|
|
69
|
-
dispensed_water_volume_ml: float
|
|
70
70
|
final_run_speed_threshold_cm_s: float
|
|
71
71
|
final_run_duration_threshold_s: float
|
|
72
72
|
initial_run_speed_threshold_cm_s: float
|
|
@@ -78,9 +78,11 @@ class RunTrainingDescriptor(YamlConfig):
|
|
|
78
78
|
maximum_training_time_m: int
|
|
79
79
|
maximum_unconsumed_rewards: int = ...
|
|
80
80
|
maximum_idle_time_s: float = ...
|
|
81
|
+
dispensed_water_volume_ml: float = ...
|
|
81
82
|
pause_dispensed_water_volume_ml: float = ...
|
|
82
83
|
experimenter_notes: str = ...
|
|
83
84
|
experimenter_given_water_volume_ml: float = ...
|
|
85
|
+
preferred_session_water_volume_ml: float = ...
|
|
84
86
|
incomplete: bool = ...
|
|
85
87
|
|
|
86
88
|
@dataclass()
|
|
@@ -89,11 +91,12 @@ class MesoscopeExperimentDescriptor(YamlConfig):
|
|
|
89
91
|
|
|
90
92
|
experimenter: str
|
|
91
93
|
mouse_weight_g: float
|
|
92
|
-
dispensed_water_volume_ml: float
|
|
93
94
|
maximum_unconsumed_rewards: int = ...
|
|
94
|
-
|
|
95
|
+
dispensed_water_volume_ml: float = ...
|
|
95
96
|
pause_dispensed_water_volume_ml: float = ...
|
|
97
|
+
experimenter_notes: str = ...
|
|
96
98
|
experimenter_given_water_volume_ml: float = ...
|
|
99
|
+
preferred_session_water_volume_ml: float = ...
|
|
97
100
|
incomplete: bool = ...
|
|
98
101
|
|
|
99
102
|
@dataclass()
|