123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- # -*- coding: utf-8 -*-
- """
- Created on Sun Apr 28 15:50:58 2019
- @author: aemdlabs
- """
- import deepdish as dd
- import matplotlib.pyplot as plt
- import numpy as np
- plt.close('all')
- MCSMapI={'SE1':'Ch03',
- 'SE2':'Ch05',
- 'SE3':'Ch01',
- 'SE4':'Ch02',
- 'SE5':'Ch22',
- 'SE6':'Ch06',
- 'SE7':'Ch16',
- 'SE8':'Ch37',
- 'SE9':'Ch20',
- 'SE10':'Ch10',
- 'SE11':'Ch24',
- 'SE12':'Ch08',
- 'SE13':'Ch14',
- 'SE14':'Ch04',
- 'SE15':'Ch18',
- 'SE16':'Ch33',
- 'SE17':'Ch34',
- 'SE18':'Ch60',
- 'SE19':'Ch38',
- 'SE20':'Ch64',
- 'SE21':'Ch40',
- 'SE22':'Ch56',
- 'SE23':'Ch42',
- 'SE24':'Ch70',
- 'SE25':'Ch66',
- 'SE26':'Ch65',
- 'SE27':'Ch68',
- 'SE28':'Ch67',
- 'SE29':'Ch55',
- 'SE30':'Ch62',
- 'SE31':'Ch58',
- 'SE32':'Ch69',
- 'ME1':'Ch57',
- 'ME2':'Ch61',
- 'ME3':'Ch53',
- 'ME4':'Ch63',
- 'ME5':'Ch52',
- 'ME6':'Ch41',
- 'ME7':'Ch49',
- 'ME8':'Ch51',
- 'ME9':'Ch46',
- 'ME10':'Ch45',
- 'ME11':'Ch44',
- 'ME12':'Ch39',
- 'ME13':'Ch54',
- 'ME14':'Ch43',
- 'ME15':'Ch50',
- 'ME16':'Ch47',
- 'ME17':'Ch32',
- 'ME18':'Ch27',
- 'ME19':'Ch30',
- 'ME20':'Ch29',
- 'ME21':'Ch28',
- 'ME22':'Ch25',
- 'ME23':'Ch26',
- 'ME24':'Ch07',
- 'ME25':'Ch21',
- 'ME26':'Ch11',
- 'ME27':'Ch17',
- 'ME28':'Ch15',
- 'ME29':'Ch13',
- 'ME30':'Ch31',
- 'ME31':'Ch19',
- 'ME32':'Ch09'}
- #Col, Row
- MCSMapFacingDown={'Ch58':(0,1),
- 'Ch57':(0,2),
- 'Ch56':(0,3),
- 'Ch55':(0,4),
- 'Ch54':(0,5),
- 'Ch53':(0,6),
- 'Ch52':(0,7),
- 'Ch51':(0,8),
- 'Ch50':(0,9),
- 'Ch49':(0,10),
- 'Ch60':(1,0),
- 'Ch61':(1,1),
- 'Ch62':(1,2),
- 'Ch63':(1,3),
- 'Ch64':(1,4),
- 'Ch65':(1,5),
- 'Ch43':(1,6),
- 'Ch44':(1,7),
- 'Ch45':(1,8),
- 'Ch46':(1,9),
- 'Ch47':(1,10),
- 'Ch70':(2,0),
- 'Ch69':(2,1),
- 'Ch68':(2,2),
- 'Ch67':(2,3),
- 'Ch66':(2,4),
- 'Ch42':(2,5),
- 'Ch41':(2,6),
- 'Ch40':(2,7),
- 'Ch39':(2,8),
- 'Ch38':(2,9),
- 'Ch37':(2,10),
- 'Ch01':(3,0),
- 'Ch02':(3,1),
- 'Ch03':(3,2),
- 'Ch04':(3,3),
- 'Ch05':(3,4),
- 'Ch06':(3,5),
- 'Ch30':(3,6),
- 'Ch31':(3,7),
- 'Ch32':(3,8),
- 'Ch33':(3,9),
- 'Ch34':(3,10),
- 'Ch11':(4,0),
- 'Ch10':(4,1),
- 'Ch09':(4,2),
- 'Ch08':(4,3),
- 'Ch07':(4,4),
- 'Ch29':(4,5),
- 'Ch28':(4,6),
- 'Ch27':(4,7),
- 'Ch26':(4,8),
- 'Ch25':(4,9),
- 'Ch24':(4,10),
- 'Ch12':None,
- 'Ch59':None,
- 'Ch13':(5,1),
- 'Ch14':(5,2),
- 'Ch15':(5,3),
- 'Ch16':(5,4),
- 'Ch17':(5,5),
- 'Ch18':(5,6),
- 'Ch19':(5,7),
- 'Ch20':(5,8),
- 'Ch21':(5,9),
- 'Ch22':(5,10)}
- Directory = '../Analyzed data/2019-08-01T15-46-48/'
- Fsigs,GmDict = dd.io.load(Directory+'GmChDict')
- for key in GmDict.keys():
- plt.figure(1)
- plt.loglog(Fsigs[:-2], GmDict[key])
- plt.xlabel('Frequency (Hz)')
- plt.ylabel('|Gm Vsig| (A)')
- plt.figure()
- A=np.log10(np.ones((11,6))*5e-14)
-
-
- for Trt in GmDict.keys():
- if Trt in ['M1','M2','S1','S2']:
- continue
- ch = MCSMapI[Trt]
- # if Trt in DCch:
- # continue
-
- A[MCSMapFacingDown[ch][1],MCSMapFacingDown[ch][0]] =np.log10(abs(GmDict[Trt][0]))
- plt.imshow(A, interpolation='nearest', vmin=-8.5, vmax=-7.5)
- plt.grid(True)
- cbar=plt.colorbar()
- plt.xlabel('column',fontsize=12)
- plt.ylabel('row',fontsize=12)
- cbar.set_label('I$_{ds-rms}$ (@1Hz)', rotation=270, labelpad=15,fontsize=13)
- plt.title('Response to bipolar current stimulation')
-
|