Merge branch 'master' into alex
This commit is contained in:
commit
41b75f1a68
@ -187,22 +187,9 @@ def main(datapath: str) -> None:
|
||||
# start_index = t0 * data.samplerate
|
||||
# stop_index = (t0 + dt) * data.samplerate
|
||||
|
||||
fig, axs = plt.subplots(
|
||||
7,
|
||||
2,
|
||||
figsize=(20 / 2.54, 12 / 2.54),
|
||||
constrained_layout=True,
|
||||
sharex=True,
|
||||
sharey='row',
|
||||
)
|
||||
|
||||
# iterate through all fish
|
||||
for i, track_id in enumerate(np.unique(ident[~np.isnan(ident)])[:2]):
|
||||
|
||||
# load region of interest of raw data file
|
||||
data_oi = data[start_index:stop_index, :]
|
||||
time_oi = raw_time[start_index:stop_index]
|
||||
|
||||
# get indices for time array in time window
|
||||
window_index = np.arange(len(idx))[
|
||||
(ident == track_id) & (time[idx] >= t0) & (
|
||||
@ -220,10 +207,25 @@ def main(datapath: str) -> None:
|
||||
if len(freq_temp) < expected_duration * 0.9:
|
||||
continue
|
||||
|
||||
fig, axs = plt.subplots(
|
||||
7,
|
||||
config.electrodes,
|
||||
figsize=(20 / 2.54, 12 / 2.54),
|
||||
constrained_layout=True,
|
||||
sharex=True,
|
||||
sharey='row',
|
||||
)
|
||||
# get best electrode
|
||||
electrode = np.argsort(np.nanmean(powers_temp, axis=0))[-1]
|
||||
best_electrodes = np.argsort(np.nanmean(
|
||||
powers_temp, axis=0))[-config.electrodes:]
|
||||
# <------------------------------------------ Iterate through electrodes
|
||||
|
||||
for i, electrode in enumerate(best_electrodes):
|
||||
|
||||
# load region of interest of raw data file
|
||||
data_oi = data[start_index:stop_index, :]
|
||||
time_oi = raw_time[start_index:stop_index]
|
||||
|
||||
# plot wavetracker tracks to spectrogram
|
||||
# for track_id in np.unique(ident): # <---------- Find freq gaps later
|
||||
# here
|
||||
@ -424,7 +426,8 @@ def main(datapath: str) -> None:
|
||||
axs[3, i].set_title("Fitered above")
|
||||
axs[4, i].set_title("Filtered envelope of baseline envelope")
|
||||
axs[5, i].set_title("Search envelope")
|
||||
axs[6, i].set_title("Filtered absolute instantaneous frequency")
|
||||
axs[6, i].set_title(
|
||||
"Filtered absolute instantaneous frequency")
|
||||
|
||||
plt.show()
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Duration and overlap of the analysis window in seconds
|
||||
window: 5
|
||||
overlap: 0.5
|
||||
overlap: 1
|
||||
edges: 0.25
|
||||
|
||||
# Number of electrodes to go over
|
||||
electrodes: 3
|
||||
|
Loading…
Reference in New Issue
Block a user