[projects] fixed data export for vector strength
This commit is contained in:
parent
a397443ae2
commit
0de095539b
@ -46,7 +46,7 @@ def get_zero_crossings(trace, threshold=0.0, rising_flank=True):
|
||||
|
||||
def has_cell_type(cell, cell_type):
|
||||
if not os.path.exists(cell + '/info.dat'):
|
||||
return false
|
||||
return False
|
||||
else:
|
||||
info = read_info_file(cell + '/info.dat')
|
||||
return info[0]['Cell']['CellType'].lower() == cell_type.lower()
|
||||
@ -76,7 +76,7 @@ def load_spike_data(cell, max_time):
|
||||
if data[0][2][-1]/1000 < max_time:
|
||||
return None
|
||||
else:
|
||||
return data[0][2][data[0][2] <= max_time]/1000
|
||||
return data[0][2][data[0][2] <= max_time*1000]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
@ -103,11 +103,11 @@ if __name__ == '__main__':
|
||||
index += 1
|
||||
continue
|
||||
spikes = load_spike_data(cell, 20)
|
||||
|
||||
if spikes is None:
|
||||
print 'not enough baseline spikes'
|
||||
index += 1
|
||||
continue
|
||||
|
||||
eod_data = load_eod_data(cell, 20, 200000)
|
||||
name = cell.split('/')[-1] + '_baseline.mat'
|
||||
sp.savemat(name, {'spike_times':spikes, 'eod':eod_data})
|
||||
|
Reference in New Issue
Block a user