def setUpClass(cls) -> None:
     probe = ['probe00', 'probe01']
     create_alyx_probe_insertions(session_path=EPHYS_SESSION,
                                  model='3B2',
                                  labels=probe,
                                  one=one,
                                  force=True)
     cls.probe_id = one.alyx.rest('insertions',
                                  'list',
                                  session=EPHYS_SESSION,
                                  name='probe00')[0]['id']
     cls.probe_id2 = one.alyx.rest('insertions',
                                   'list',
                                   session=EPHYS_SESSION,
                                   name='probe01')[0]['id']
     data = np.load(Path(
         Path(__file__).parent.joinpath('fixtures',
                                        'data_alignmentqc_gui.npz')),
                    allow_pickle=True)
     cls.xyz_picks = data['xyz_picks']
     cls.alignments = data['alignments'].tolist()
     cls.cluster_chns = data['cluster_chns']
     register_track(cls.probe_id,
                    picks=cls.xyz_picks,
                    one=one,
                    overwrite=True,
                    channels=False)
     register_track(cls.probe_id2,
                    picks=cls.xyz_picks,
                    one=one,
                    overwrite=True,
                    channels=False)
示例#2
0
    def test_tracing_exists(self):
        register_track(self.probe00_id, picks=self.xyz_picks, one=one, overwrite=True,
                       channels=False)
        insertion = one.alyx.rest('insertions', 'read', id=self.probe00_id)

        assert (insertion['json']['qc'] == 'NOT_SET')
        assert (insertion['json']['extended_qc']['tracing_exists'] == 1)
示例#3
0
 def test_tracing_not_exists(self):
     register_track(self.probe01_id,
                    picks=None,
                    one=one,
                    overwrite=True,
                    channels=False)
     insertion = one.alyx.rest('insertions', 'read', id=self.probe01_id)
     assert (insertion['json']['qc'] == 'CRITICAL')
     assert (insertion['json']['extended_qc']['tracing_exists'] == 0)
示例#4
0
 def test_tracing_not_exists(self):
     register_track(self.probe01_id,
                    picks=None,
                    one=one,
                    overwrite=True,
                    channels=False,
                    brain_atlas=brain_atlas)
     insertion = one.alyx.get('/insertions/' + self.probe01_id,
                              clobber=True)
     assert (insertion['json']['qc'] == 'CRITICAL')
     assert (insertion['json']['extended_qc']['tracing_exists'] == 0)
示例#5
0
    def test_tracing_exists(self):
        register_track(self.probe00_id,
                       picks=self.xyz_picks,
                       one=one,
                       overwrite=True,
                       channels=False,
                       brain_atlas=brain_atlas)
        insertion = one.alyx.get('/insertions/' + self.probe00_id,
                                 clobber=True)

        assert (insertion['json']['qc'] == 'NOT_SET')
        assert (insertion['json']['extended_qc']['tracing_exists'] == 1)