@@ -186,6 +186,7 @@ def _02_one_alignment(self):
186186 self .alignments ['2020-06-26T16:40:14_Karolina_Socha' ]}
187187 trajectory = copy .deepcopy (self .trajectory )
188188 trajectory .update ({'json' : alignments })
189+ trajectory .update ({'chronic_insertion' : None })
189190 _ = one .alyx .rest ('trajectories' , 'create' , data = trajectory )
190191 align_qc = AlignmentQC (self .probe_id , one = one , brain_atlas = brain_atlas , channels = False )
191192 align_qc .run (update = True , upload_alyx = True , upload_flatiron = False )
@@ -199,8 +200,8 @@ def _03_alignments_disagree(self):
199200 self .alignments ['2020-06-26T16:40:14_Karolina_Socha' ],
200201 '2020-06-12T00:39:15_nate' : self .alignments ['2020-06-12T00:39:15_nate' ]}
201202 trajectory = copy .deepcopy (self .trajectory )
202- trajectory .update ({'json' : alignments })
203- traj = one .alyx .rest ('trajectories' , 'update ' , id = self .prev_traj_id , data = trajectory )
203+ trajectory .update ({'probe_insertion' : self . probe_id , ' json' : alignments })
204+ traj = one .alyx .rest ('trajectories' , 'partial_update ' , id = self .prev_traj_id , data = trajectory )
204205 align_qc = AlignmentQC (self .probe_id , one = one , brain_atlas = brain_atlas , channels = False )
205206 align_qc .load_data (prev_alignments = traj ['json' ], xyz_picks = np .array (self .xyz_picks ) / 1e6 ,
206207 cluster_chns = self .cluster_chns , depths = SITES_COORDINATES [:, 1 ],
@@ -216,8 +217,8 @@ def _04_alignments_agree(self):
216217 self .alignments ['2020-06-19T10:52:36_noam.roth' ],
217218 '2020-06-12T00:39:15_nate' : self .alignments ['2020-06-12T00:39:15_nate' ]}
218219 trajectory = copy .deepcopy (self .trajectory )
219- trajectory .update ({'json' : alignments })
220- traj = one .alyx .rest ('trajectories' , 'update ' , id = self .prev_traj_id , data = trajectory )
220+ trajectory .update ({'probe_insertion' : self . probe_id , ' json' : alignments })
221+ traj = one .alyx .rest ('trajectories' , 'partial_update ' , id = self .prev_traj_id , data = trajectory )
221222 self .assertEqual (self .prev_traj_id , traj ['id' ])
222223 align_qc = AlignmentQC (self .probe_id , one = one , brain_atlas = brain_atlas , channels = False )
223224 align_qc .load_data (cluster_chns = self .cluster_chns , depths = SITES_COORDINATES [:, 1 ],
@@ -230,8 +231,8 @@ def _04_alignments_agree(self):
230231 def _05_not_latest_alignments_agree (self ):
231232 alignments = copy .deepcopy (self .alignments )
232233 trajectory = copy .deepcopy (self .trajectory )
233- trajectory .update ({'json' : alignments })
234- traj = one .alyx .rest ('trajectories' , 'update ' , id = self .prev_traj_id , data = trajectory )
234+ trajectory .update ({'probe_insertion' : self . probe_id , ' json' : alignments })
235+ traj = one .alyx .rest ('trajectories' , 'partial_update ' , id = self .prev_traj_id , data = trajectory )
235236 self .assertEqual (self .prev_traj_id , traj ['id' ])
236237 align_qc = AlignmentQC (self .probe_id , one = one , brain_atlas = brain_atlas , channels = False )
237238 align_qc .load_data (prev_alignments = traj ['json' ], xyz_picks = np .array (self .xyz_picks ) / 1e6 ,
@@ -277,6 +278,7 @@ def setUpClass(cls) -> None:
277278 cls .probe_id = probe_insertion ['id' ]
278279 cls .trajectory = data ['trajectory' ].tolist ()
279280 cls .trajectory .update ({'probe_insertion' : cls .probe_id })
281+ cls .trajectory .update ({'chronic_insertion' : None })
280282 cls .trajectory .update ({'json' : cls .alignments })
281283 cls .traj = one .alyx .rest ('trajectories' , 'create' , data = cls .trajectory )
282284
@@ -415,6 +417,7 @@ def setUpClass(cls) -> None:
415417 cls .probe_name = probe_insertion ['name' ]
416418 cls .trajectory = data ['trajectory' ].tolist ()
417419 cls .trajectory .update ({'probe_insertion' : cls .probe_id })
420+ cls .trajectory .update ({'chronic_insertion' : None })
418421 cls .trajectory .update ({'json' : cls .alignments })
419422 cls .traj = one .alyx .rest ('trajectories' , 'create' , data = cls .trajectory )
420423
0 commit comments