Added newly processed species to fig_features_cross_species.pdf.

Wrote more of the results.
This commit is contained in:
j-hartling
2026-05-05 14:44:57 +02:00
parent 16014c02a0
commit 05e808ba30
10 changed files with 270 additions and 274 deletions

View File

@@ -18,7 +18,7 @@ target_species = [
# 'Gomphocerippus_rufus',
# 'Omocestus_rufipes',
# 'Pseudochorthippus_parallelus',
][0]
][1]
example_file = {
'Chorthippus_biguttulus': 'Chorthippus_biguttulus_GBC_94-17s73.1ms-19s977ms',
'Chorthippus_mollis': 'Chorthippus_mollis_DJN_41_T28C-46s4.58ms-1m15s697ms',
@@ -28,7 +28,7 @@ example_file = {
'Omocestus_rufipes': 'Omocestus_rufipes_DJN_32-40s724ms-48s779ms',
'Pseudochorthippus_parallelus': 'Pseudochorthippus_parallelus_GBC_88-6s678ms-9s32.3ms'
}[target_species]
data_paths = search_files(target_species, dir='../data/processed/')
data_paths = search_files(target_species, incl='GBC', dir='../data/processed/')
noise_path = '../data/processed/white_noise_sd-1.npz'
thresh_path = '../data/inv/full/thresholds.npz'
stages = ['filt', 'env', 'log', 'inv', 'conv', 'feat']
@@ -55,10 +55,13 @@ thresh_abs = thresh_rel[:, None] * thresh_data['sds'][None, :]
for data_path, name in zip(data_paths, crop_paths(data_paths)):
save_detailed = example_file in name
print(f'Processing {name}')
if 'BM04' in name:
continue
# Get song recording (prior to anything):
data, config = load_data(data_path, files='raw')
song, rate = data['raw'], config['rate']
print(song.shape, song.size)
# Reduce to kernel subset:
if any(var is not None for var in [kernels, types, sigmas]):