Added newly processed species to fig_features_cross_species.pdf.
Wrote more of the results.
This commit is contained in:
@@ -14,9 +14,9 @@ from IPython import embed
|
||||
|
||||
# GENERAL SETTINGS:
|
||||
cross_species = [
|
||||
# 'Chorthippus_biguttulus',
|
||||
'Chorthippus_biguttulus',
|
||||
# 'Chorthippus_mollis',
|
||||
# 'Chrysochraon_dispar',
|
||||
'Chrysochraon_dispar',
|
||||
# 'Euchorthippus_declivus',
|
||||
'Gomphocerippus_rufus',
|
||||
'Omocestus_rufipes',
|
||||
@@ -45,7 +45,7 @@ save_path = '../figures/fig_features_cross_species.pdf'
|
||||
|
||||
|
||||
# ANALYSIS SETTINGS:
|
||||
thresh_rel = np.array([0, 0.5, 1, 1.5, 2, 2.5, 3])[4]
|
||||
thresh_rel = np.array([0, 0.5, 1, 1.5, 2, 2.5, 3])[5]
|
||||
single_spec_file = True # Only use example files for cross-species comparison
|
||||
equalize_spec_files = False # Prune to minimum available across species
|
||||
n_song = n_spec#None # Limit to n first songs of in-species dataset (None for all)
|
||||
@@ -121,7 +121,7 @@ ylab_up_kwargs = dict(
|
||||
ha='center',
|
||||
va='top',
|
||||
)
|
||||
loc = 0.5
|
||||
loc = 1
|
||||
dot_spec_kwargs = dict(
|
||||
ls='none',
|
||||
marker='o',
|
||||
@@ -171,7 +171,7 @@ text_song_kwargs = dict(
|
||||
text_spec_prefix = '$\\rho\\,=\\,$'
|
||||
text_song_prefix = ['$\\rho\\,=\\,$', ''][0]
|
||||
if test_regression:
|
||||
test_ax_side = 0.15
|
||||
test_ax_side = 0.1
|
||||
test_ax_bounds = [
|
||||
song_grid_kwargs['right'] - test_ax_side,
|
||||
spec_grid_kwargs['bottom'],
|
||||
@@ -179,7 +179,7 @@ if test_regression:
|
||||
test_ax_side
|
||||
]
|
||||
ylab_test = '$\\rho$'
|
||||
yloc_test = 0.5
|
||||
yloc_test = 1
|
||||
ylab_test_kwargs = dict(
|
||||
x=-0.3,
|
||||
fontsize=fs['lab_norm'],
|
||||
|
||||
@@ -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]):
|
||||
|
||||
Reference in New Issue
Block a user