def testStas(self): a=addrPhysicalExtract(\ self.stasStim_ifslwta,addrPhysicalConstruct(\ self.stasStim_ifslwta,addrLogicalExtract(\ self.stasStim_ifslwta,addrLogicalConstruct(\ self.stasStim_ifslwta,[list(range(5)),[15]]\ )))) self.assertTrue(np.all(a == np.array([list(range(5)), [15] * 5])))
def testStas(self): a=addrPhysicalExtract(\ self.stasStim_ifslwta,addrPhysicalConstruct(\ self.stasStim_ifslwta,addrLogicalExtract(\ self.stasStim_ifslwta,addrLogicalConstruct(\ self.stasStim_ifslwta,[range(5),[15]]\ )))) self.assertTrue(np.all(a==np.array([range(5),[15]*5])))
def testSTCS(self): addrHR = [range(10), 5, 1] addr = addrLogicalConstruct(self.STcsMon[0], addrHR) addr_out = self.STcsMon.addrLogicalConstruct( self.STcsMon.addrPhysicalExtract( self.STcsMon.addrPhysicalConstruct(self.STcsMon.addrLogicalExtract({0: addr})) ) )[0] self.assertTrue(np.all(addr == addr_out))
def testStasSAC(self): # Test 2D chip stim addrHR = [range(10, 20), range(10, 15), 0] addr = addrLogicalConstruct(self.stasStim_sac, addrHR) addr_out = self.stasStim_sac.addrLogicalConstruct( self.stasStim_sac.addrPhysicalExtract( self.stasStim_sac.addrPhysicalConstruct(self.stasStim_sac.addrLogicalExtract(addr)) ) ) self.assertTrue(np.all(addr == addr_out))
def testSTCSChannel2(self): # Test 2D chip stim addrHR = [range(10, 20), 2, 1] addr = addrLogicalConstruct(self.STcsSeq[2], addrHR) addr_out = self.STcsSeq.addrLogicalConstruct( self.STcsSeq.addrPhysicalExtract( self.STcsSeq.addrPhysicalConstruct(self.STcsSeq.addrLogicalExtract({2: addr})) ) )[2] self.assertTrue(np.all(addr == addr_out))
def testSTCS(self): addrHR = [list(range(10)), 5, 1] addr = addrLogicalConstruct(self.STcsMon[0], addrHR) addr_out=\ self.STcsMon.addrLogicalConstruct(\ self.STcsMon.addrPhysicalExtract(\ self.STcsMon.addrPhysicalConstruct(\ self.STcsMon.addrLogicalExtract(\ {0:addr}\ ))))[0] self.assertTrue(np.all(addr == addr_out))
def testSTCSChannel3(self): # Test 2D chip stim addrHR = [range(30, 60), 2, 2] addr = addrLogicalConstruct(self.STcsSeq[3], addrHR) addr_out = self.STcsSeq.addrLogicalConstruct( self.STcsSeq.addrPhysicalExtract( self.STcsSeq.addrPhysicalConstruct(self.STcsSeq.addrLogicalExtract({3: addr})) ) )[3] self.assertTrue(np.all(addr == addr_out)) # Test 2D chip mon addrHR = [range(30, 60), 2] addr = addrLogicalConstruct(self.STcsMon[3], addrHR) addr_out = self.STcsMon.addrLogicalConstruct( self.STcsMon.addrPhysicalExtract( self.STcsMon.addrPhysicalConstruct(self.STcsMon.addrLogicalExtract({3: addr})) ) )[3] self.assertTrue(np.all(addr == addr_out))
def testStasSAC(self): #Test 2D chip stim addrHR = [list(range(10, 20)), list(range(10, 15)), 0] addr = addrLogicalConstruct(self.stasStim_sac, addrHR) addr_out=\ self.stasStim_sac.addrLogicalConstruct(\ self.stasStim_sac.addrPhysicalExtract(\ self.stasStim_sac.addrPhysicalConstruct(\ self.stasStim_sac.addrLogicalExtract(\ addr\ )))) self.assertTrue(np.all(addr == addr_out))
def testSTCSChannel2(self): #Test 2D chip stim addrHR = [list(range(10, 20)), 2, 1] addr = addrLogicalConstruct(self.STcsSeq[2], addrHR) addr_out=\ self.STcsSeq.addrLogicalConstruct(\ self.STcsSeq.addrPhysicalExtract(\ self.STcsSeq.addrPhysicalConstruct(\ self.STcsSeq.addrLogicalExtract(\ {2:addr}\ ))))[2] self.assertTrue(np.all(addr == addr_out))
def testSTCSChannel3(self): #Test 2D chip stim addrHR = [list(range(30, 60)), 2, 2] addr = addrLogicalConstruct(self.STcsSeq[3], addrHR) addr_out=\ self.STcsSeq.addrLogicalConstruct(\ self.STcsSeq.addrPhysicalExtract(\ self.STcsSeq.addrPhysicalConstruct(\ self.STcsSeq.addrLogicalExtract(\ {3:addr}\ ))))[3] self.assertTrue(np.all(addr == addr_out)) #Test 2D chip mon addrHR = [list(range(30, 60)), 2] addr = addrLogicalConstruct(self.STcsMon[3], addrHR) addr_out=\ self.STcsMon.addrLogicalConstruct(\ self.STcsMon.addrPhysicalExtract(\ self.STcsMon.addrPhysicalConstruct(\ self.STcsMon.addrLogicalExtract(\ {3:addr}\ ))))[3] self.assertTrue(np.all(addr == addr_out))