Seriously, no idea. Wild amount of changes. Good luck.

This commit is contained in:
j-hartling
2026-04-17 17:19:30 +02:00
parent 36ac504efa
commit 3b4b7f2161
40 changed files with 2067 additions and 672 deletions

View File

@@ -7,7 +7,7 @@ from IPython import embed
## SETTINGS:
# General:
mode = ['log_hp', 'thresh_lp', 'full'][2]
mode = ['log_hp', 'thresh_lp', 'full', 'short'][3]
noise_path = '../data/processed/white_noise_sd-1.npz'
save_path = '../data/inv/'
pad = np.array([0.1, 0.9])
@@ -15,7 +15,8 @@ pad = np.array([0.1, 0.9])
stages = dict(
log_hp=['filt', 'env', 'log', 'inv'],
thresh_lp=['inv', 'conv', 'feat'],
full=['raw', 'filt', 'env', 'log', 'inv', 'conv', 'feat']
full=['raw', 'filt', 'env', 'log', 'inv', 'conv', 'feat'],
short=['raw', 'filt', 'env', 'conv', 'feat']
)[mode]
# PROCESSING:
@@ -49,6 +50,12 @@ elif mode == 'thresh_lp':
padtype='fixed', padlen=config['padlen'])
elif mode == 'full':
data = process_signal(config, stages, signal=starter, rate=config['rate'])[0]
elif mode == 'short':
data = process_signal(config, ['raw', 'filt', 'env'], signal=starter, rate=config['rate'])[0]
data['conv'] = convolve_kernels(data['env'], config['kernels'], config['k_specs'])
data['feat'] = sosfilter((data['conv'] > config['feat_thresh']).astype(float),
config['env_rate'], config['feat_fcut'], 'lp',
padtype='fixed', padlen=config['padlen'])
# Get measures:
measures = {}