little things

This commit is contained in:
2025-05-28 10:52:50 +02:00
parent 635a320974
commit 6e0098a273
5 changed files with 75 additions and 22 deletions

View File

@@ -111,11 +111,17 @@ def plot_summary_contrasts(axs, s, cells):
cdata = data[data['contrast'] == 0, :]
nli_split = cdata['dsinorm']
print(f' mean SI = {np.mean(nli_split):.2f}, stdev = {np.std(nli_split):.2f}')
print(f' triangle cells have SI >= {np.min(nli_split[cdata["triangle"] > 0.5]):.2f}')
ntriangle = np.sum(cdata['triangle'] > 0.5)
print(f' triangle cells: {ntriangle:2d} ({100*ntriangle/len(cdata):.1f}%)')
nborder = np.sum(cdata['border'] > 0.5)
print(f' border cells: {nborder:2d} ({100*nborder/len(cdata):.1f}%)')
nother = len(cdata) - ntriangle - nborder
print(f' other cells: {nother:2d} ({100*nother/len(cdata):.1f}%)')
n = np.sum(nli_split > nli_thresh)
print(f' {n} cells ({100*n/len(nli_split):.1f}%) have SI > {nli_thresh:.1f}:')
for name, cv in cdata[nli_split > nli_thresh, ['cell', 'cvbase']].row_data():
print(f' {name:<22} CV={cv:4.2f}')
print(f' triangle cells have SI >= {np.min(nli_split[cdata["triangle"] > 0.5]):.2f}')
print()
for i, a in enumerate([0.01, 0.03, 0.1]):
plot_si_cv(axs[1 + i], s, data, a, cells)
@@ -126,12 +132,12 @@ def plot_summary_contrasts(axs, s, cells):
print(f' correlation with split: r={r:.2f}, p={p:.1e}')
print(f' mean SI = {np.mean(nli):.2f}, stdev = {np.std(nli):.2f}')
n = np.sum(nli > nli_thresh)
print(f' triangle cells have SI >= {np.min(nli[cdata["triangle"] > 0.5]):.2f}')
print(f' {n} cells ({100*n/len(nli):.1f}%) have SI > {nli_thresh:.1f}:')
for name, cv, respmod in cdata[nli > nli_thresh,
['cell', 'cvbase', 'respmod2']].row_data():
print(f' {name:<22} CV={cv:4.2f} '
f'response modulation={respmod:4.0f}Hz')
print(f' triangle cells have SI >= {np.min(nli[cdata["triangle"] > 0.5]):.2f}')
print()
print('overall lowest baseline CV:',
' '.join([f'{cv:.2f}' for cv in np.unique(data['cvbase'])[:5]]))