31
31
# Optional parameters with defaults:
32
32
experimenter_full_name=["test_experimenter_1", "test_experimenter_2"],
33
33
rig_id="428_9_B_20240617",
34
- task_version="1.0.0",
35
34
iacuc_protocol="2115",
36
35
mouse_platform_name="mouse_tube_foraging",
37
36
active_mouse_platform=False,
@@ -62,13 +61,14 @@ def create_metadata(
62
61
"test_experimenter_2" ,
63
62
],
64
63
rig_id : str = "428_9_0_20240617" ,
65
- task_version : str = "1.0.0" ,
66
64
iacuc_protocol : str = "2115" ,
67
65
mouse_platform_name : str = "mouse_tube_foraging" ,
68
66
active_mouse_platform : bool = False ,
69
- session_type : str = "Foraging_Photometry" ,
70
- task_name : str = "Fiber Photometry" ,
71
- notes : str = "Example configuration for fiber photometry rig" ,
67
+ session_type : str = "FIB" ,
68
+ notes : str = "" ,
69
+ anaesthesia : Optional [str ] = None ,
70
+ animal_weight_post : Optional [float ] = None ,
71
+ animal_weight_prior : Optional [float ] = None ,
72
72
) -> bool :
73
73
"""Create fiber photometry metadata with default settings.
74
74
@@ -79,13 +79,14 @@ def create_metadata(
79
79
output_filename: Name of the output JSON file
80
80
experimenter_full_name: List of experimenter names
81
81
rig_id: Identifier for the experimental rig
82
- task_version: Version of the experimental task
83
82
iacuc_protocol: Protocol identifier
84
83
mouse_platform_name: Name of the mouse platform
85
84
active_mouse_platform: Whether platform is active
86
85
session_type: Type of experimental session
87
- task_name: Name of the experimental task
88
86
notes: Additional notes about the session
87
+ anaesthesia: Anaesthesia used
88
+ animal_weight_post: Animal weight after session
89
+ animal_weight_prior: Animal weight before session
89
90
90
91
Returns:
91
92
bool: True if metadata was successfully
@@ -99,13 +100,14 @@ def create_metadata(
99
100
"output_directory" : str (output_directory ),
100
101
"output_filename" : output_filename ,
101
102
"rig_id" : rig_id ,
102
- "task_version" : task_version ,
103
103
"iacuc_protocol" : iacuc_protocol ,
104
104
"mouse_platform_name" : mouse_platform_name ,
105
105
"active_mouse_platform" : active_mouse_platform ,
106
106
"session_type" : session_type ,
107
- "task_name" : task_name ,
108
107
"notes" : notes ,
108
+ "anaesthesia" : anaesthesia ,
109
+ "animal_weight_post" : animal_weight_post ,
110
+ "animal_weight_prior" : animal_weight_prior ,
109
111
"data_streams" : [
110
112
{
111
113
"stream_start_time" : None ,
@@ -184,7 +186,7 @@ def create_metadata(
184
186
{
185
187
"name" : "Bonsai" ,
186
188
"parameters" : {},
187
- "url" : "" ,
189
+ "url" : "https://github.com/AllenNeuralDynamics/PavlovianCond_Bonsai/tree/dafd7dfe0f347f781e91466b3d16b83cf32f8b6d" , # noqa E501
188
190
"version" : "" ,
189
191
}
190
192
],
@@ -232,6 +234,32 @@ def create_metadata(
232
234
default = "session_fip.json" ,
233
235
help = "Name of the output JSON file (default: session_fip.json)" ,
234
236
)
237
+ parser .add_argument (
238
+ "--active-mouse-platform" ,
239
+ action = "store_true" ,
240
+ help = "Whether the mouse platform was active" ,
241
+ )
242
+ parser .add_argument (
243
+ "--anaesthesia" , type = str , default = None , help = "Anaesthesia used"
244
+ )
245
+ parser .add_argument (
246
+ "--animal-weight-post" ,
247
+ type = float ,
248
+ default = None ,
249
+ help = "Animal weight after session" ,
250
+ )
251
+ parser .add_argument (
252
+ "--animal-weight-prior" ,
253
+ type = float ,
254
+ default = None ,
255
+ help = "Animal weight before session" ,
256
+ )
257
+ parser .add_argument (
258
+ "--mouse-platform-name" ,
259
+ type = str ,
260
+ default = "mouse_tube_foraging" ,
261
+ help = "Name of the mouse platform" ,
262
+ )
235
263
236
264
args = parser .parse_args ()
237
265
@@ -240,6 +268,11 @@ def create_metadata(
240
268
data_directory = args .data_directory ,
241
269
output_directory = args .output_directory ,
242
270
output_filename = args .output_filename ,
271
+ active_mouse_platform = args .active_mouse_platform ,
272
+ anaesthesia = args .anaesthesia ,
273
+ animal_weight_post = args .animal_weight_post ,
274
+ animal_weight_prior = args .animal_weight_prior ,
275
+ mouse_platform_name = args .mouse_platform_name ,
243
276
)
244
277
245
278
output_path = args .output_directory / args .output_filename
0 commit comments