Added multi-thresh simulation to "full" and "short" (currently running).

Added complete "rect-lp" analysis except figure.
Added multiple appendix figs.
Overhauled normalization options across all condense scripts.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
j-hartling
2026-04-24 16:50:14 +02:00
parent 1a586848e8
commit 5411a309f7
48 changed files with 1549 additions and 300 deletions

View File

@@ -28,9 +28,18 @@ save_path = '../data/inv/full/condensed/'
# ANALYSIS SETTINGS:
normalization = [
'none',
'min',
'max',
'base',
'range'
'range',
][2]
suffix = dict(
none='_unnormed',
min='_norm-min',
max='_norm-max',
base='_norm-base',
range='_norm-range'
)[normalization]
# EXECUTION:
for i, species in enumerate(target_species):
@@ -69,7 +78,13 @@ for i, species in enumerate(target_species):
for stage in stages:
mkey = f'measure_{stage}'
if normalization == 'base':
if normalization == 'min':
# Minimum normalization:
data[mkey] /= data[mkey].min(axis=0, keepdims=True)
elif normalization == 'max':
# Maximum normalization:
data[mkey] /= data[mkey].max(axis=0, keepdims=True)
elif normalization == 'base':
# Noise baseline normalization:
data[mkey] /= data[mkey][0]
elif normalization == 'range':
@@ -86,16 +101,9 @@ for i, species in enumerate(target_species):
rec_sd[f'sd_{stage}'][..., j] = np.nanstd(file_data[stage], axis=-1)
# Save condensed recording data:
save_name = save_path + species
if normalization == 'none':
save_name += '_unnormed'
elif normalization == 'base':
save_name += '_norm-base'
elif normalization == 'range':
save_name += '_norm-range'
archive = dict(scales=data['scales'])
archive.update(rec_mean)
archive.update(rec_sd)
save_data(save_name, archive, config, overwrite=True)
save_data(save_path + species + suffix, archive, config, overwrite=True)
print('Done.')