resolving master merge
This commit is contained in:
commit
bbff7fd80c
@ -173,13 +173,15 @@ def main(datapath: str):
|
|||||||
|
|
||||||
size_winners = []
|
size_winners = []
|
||||||
for l in ['l1', 'l2', 'l3']:
|
for l in ['l1', 'l2', 'l3']:
|
||||||
size_winner = size_rows[size_rows['fish']== winner_fish1][l].values[0]
|
size_winner = size_rows[size_rows['fish']
|
||||||
|
== winner_fish1][l].values[0]
|
||||||
size_winners.append(size_winner)
|
size_winners.append(size_winner)
|
||||||
mean_size_winner = np.nanmean(size_winners)
|
mean_size_winner = np.nanmean(size_winners)
|
||||||
|
|
||||||
size_losers = []
|
size_losers = []
|
||||||
for l in ['l1', 'l2', 'l3']:
|
for l in ['l1', 'l2', 'l3']:
|
||||||
size_loser = size_rows[size_rows['fish']== winner_fish2][l].values[0]
|
size_loser = size_rows[size_rows['fish']
|
||||||
|
== winner_fish2][l].values[0]
|
||||||
size_losers.append(size_loser)
|
size_losers.append(size_loser)
|
||||||
mean_size_loser = np.nanmean(size_losers)
|
mean_size_loser = np.nanmean(size_losers)
|
||||||
|
|
||||||
@ -191,13 +193,15 @@ def main(datapath: str):
|
|||||||
|
|
||||||
size_winners = []
|
size_winners = []
|
||||||
for l in ['l1', 'l2', 'l3']:
|
for l in ['l1', 'l2', 'l3']:
|
||||||
size_winner = size_rows[size_rows['fish']== winner_fish2][l].values[0]
|
size_winner = size_rows[size_rows['fish']
|
||||||
|
== winner_fish2][l].values[0]
|
||||||
size_winners.append(size_winner)
|
size_winners.append(size_winner)
|
||||||
mean_size_winner = np.nanmean(size_winners)
|
mean_size_winner = np.nanmean(size_winners)
|
||||||
|
|
||||||
size_losers = []
|
size_losers = []
|
||||||
for l in ['l1', 'l2', 'l3']:
|
for l in ['l1', 'l2', 'l3']:
|
||||||
size_loser = size_rows[size_rows['fish']== winner_fish1][l].values[0]
|
size_loser = size_rows[size_rows['fish']
|
||||||
|
== winner_fish1][l].values[0]
|
||||||
size_losers.append(size_loser)
|
size_losers.append(size_loser)
|
||||||
mean_size_loser = np.nanmean(size_losers)
|
mean_size_loser = np.nanmean(size_losers)
|
||||||
|
|
||||||
@ -210,8 +214,8 @@ def main(datapath: str):
|
|||||||
chirp_winner = len(bh.chirps[bh.chirps_ids == winner_fish_id])
|
chirp_winner = len(bh.chirps[bh.chirps_ids == winner_fish_id])
|
||||||
chirp_loser = len(bh.chirps[bh.chirps_ids == loser_fish_id])
|
chirp_loser = len(bh.chirps[bh.chirps_ids == loser_fish_id])
|
||||||
|
|
||||||
freq_winner = np.nanmedian(bh.freq[bh.ident==winner_fish_id])
|
freq_winner = np.nanmedian(bh.freq[bh.ident == winner_fish_id])
|
||||||
freq_loser = np.nanmedian(bh.freq[bh.ident==loser_fish_id])
|
freq_loser = np.nanmedian(bh.freq[bh.ident == loser_fish_id])
|
||||||
|
|
||||||
chirps_winner.append(chirp_winner)
|
chirps_winner.append(chirp_winner)
|
||||||
chirps_loser.append(chirp_loser)
|
chirps_loser.append(chirp_loser)
|
||||||
@ -219,7 +223,8 @@ def main(datapath: str):
|
|||||||
size_chirps_diffs.append(chirp_winner - chirp_loser)
|
size_chirps_diffs.append(chirp_winner - chirp_loser)
|
||||||
freq_diffs.append(freq_winner - freq_loser)
|
freq_diffs.append(freq_winner - freq_loser)
|
||||||
|
|
||||||
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(10, 5))
|
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(22*ps.cm, 12*ps.cm), width_ratios=[1.5, 1,1])
|
||||||
|
plt.subplots_adjust(left=0.098, right=0.945, top=0.94, wspace=0.343)
|
||||||
scatterwinner = 1.15
|
scatterwinner = 1.15
|
||||||
scatterloser = 1.85
|
scatterloser = 1.85
|
||||||
chirps_winner = np.asarray(chirps_winner)[~np.isnan(chirps_winner)]
|
chirps_winner = np.asarray(chirps_winner)[~np.isnan(chirps_winner)]
|
||||||
@ -234,24 +239,24 @@ def main(datapath: str):
|
|||||||
ax1.scatter(np.ones(len(chirps_loser)) *
|
ax1.scatter(np.ones(len(chirps_loser)) *
|
||||||
scatterloser, chirps_loser, color='r')
|
scatterloser, chirps_loser, color='r')
|
||||||
ax1.set_xticklabels(['winner', 'loser'])
|
ax1.set_xticklabels(['winner', 'loser'])
|
||||||
ax1.text(0.9, 0.9, f'n = {len(chirps_winner)}',
|
ax1.text(0.1, 0.9, f'n = {len(chirps_winner)}',
|
||||||
transform=ax1.transAxes, color=ps.white)
|
transform=ax1.transAxes, color=ps.white)
|
||||||
|
|
||||||
for w, l in zip(chirps_winner, chirps_loser):
|
for w, l in zip(chirps_winner, chirps_loser):
|
||||||
ax1.plot([scatterwinner, scatterloser], [w, l],
|
ax1.plot([scatterwinner, scatterloser], [w, l],
|
||||||
color='r', alpha=0.5, linewidth=0.5)
|
color='r', alpha=0.5, linewidth=0.5)
|
||||||
|
ax1.set_ylabel('Chirps [n]', color=ps.white)
|
||||||
|
|
||||||
colors1 = ps.red
|
colors1 = ps.red
|
||||||
ps.set_boxplot_color(bplot1, colors1)
|
ps.set_boxplot_color(bplot1, colors1)
|
||||||
colors1 = ps.orange
|
colors1 = ps.orange
|
||||||
ps.set_boxplot_color(bplot2, colors1)
|
ps.set_boxplot_color(bplot2, colors1)
|
||||||
ax1.set_ylabel('Chirpscounts [n]')
|
|
||||||
embed()
|
|
||||||
ax2.scatter(size_diffs, size_chirps_diffs, color='r')
|
ax2.scatter(size_diffs, size_chirps_diffs, color='r')
|
||||||
ax2.set_xlabel('Size difference [mm]')
|
ax2.set_xlabel('Size difference [mm]')
|
||||||
ax2.set_ylabel('Chirps difference [n]')
|
ax2.set_ylabel('Chirps difference [n]')
|
||||||
|
|
||||||
ax3.scatter(freq_diffs, freq_chirps_diffs, color='r')
|
ax3.scatter(freq_diffs, size_chirps_diffs, color='r')
|
||||||
|
# ax3.scatter(freq_diffs, freq_chirps_diffs, color='r')
|
||||||
ax3.set_xlabel('Frequency difference [Hz]')
|
ax3.set_xlabel('Frequency difference [Hz]')
|
||||||
ax3.set_yticklabels([])
|
ax3.set_yticklabels([])
|
||||||
ax3.set
|
ax3.set
|
||||||
|
211
code/plot_chirp_size.py
Normal file
211
code/plot_chirp_size.py
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
import numpy as np
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
from thunderfish.powerspectrum import decibel
|
||||||
|
|
||||||
|
from IPython import embed
|
||||||
|
from pandas import read_csv
|
||||||
|
from modules.logger import makeLogger
|
||||||
|
from modules.plotstyle import PlotStyle
|
||||||
|
from modules.behaviour_handling import Behavior, correct_chasing_events
|
||||||
|
|
||||||
|
ps = PlotStyle()
|
||||||
|
|
||||||
|
logger = makeLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def get_chirp_winner_loser(folder_name, Behavior, order_meta_df):
|
||||||
|
|
||||||
|
foldername = folder_name.split('/')[-2]
|
||||||
|
winner_row = order_meta_df[order_meta_df['recording'] == foldername]
|
||||||
|
winner = winner_row['winner'].values[0].astype(int)
|
||||||
|
winner_fish1 = winner_row['fish1'].values[0].astype(int)
|
||||||
|
winner_fish2 = winner_row['fish2'].values[0].astype(int)
|
||||||
|
|
||||||
|
if winner > 0:
|
||||||
|
if winner == winner_fish1:
|
||||||
|
winner_fish_id = winner_row['rec_id1'].values[0]
|
||||||
|
loser_fish_id = winner_row['rec_id2'].values[0]
|
||||||
|
|
||||||
|
elif winner == winner_fish2:
|
||||||
|
winner_fish_id = winner_row['rec_id2'].values[0]
|
||||||
|
loser_fish_id = winner_row['rec_id1'].values[0]
|
||||||
|
|
||||||
|
chirp_winner = len(
|
||||||
|
Behavior.chirps[Behavior.chirps_ids == winner_fish_id])
|
||||||
|
chirp_loser = len(
|
||||||
|
Behavior.chirps[Behavior.chirps_ids == loser_fish_id])
|
||||||
|
|
||||||
|
return chirp_winner, chirp_loser
|
||||||
|
else:
|
||||||
|
return np.nan, np.nan
|
||||||
|
|
||||||
|
|
||||||
|
def get_chirp_size(folder_name, Behavior, order_meta_df, id_meta_df):
|
||||||
|
|
||||||
|
foldername = folder_name.split('/')[-2]
|
||||||
|
folder_row = order_meta_df[order_meta_df['recording'] == foldername]
|
||||||
|
fish1 = folder_row['fish1'].values[0].astype(int)
|
||||||
|
fish2 = folder_row['fish2'].values[0].astype(int)
|
||||||
|
|
||||||
|
groub = folder_row['group'].values[0].astype(int)
|
||||||
|
size_fish1_row = id_meta_df[(id_meta_df['group'] == groub) & (
|
||||||
|
id_meta_df['fish'] == fish1)]
|
||||||
|
size_fish2_row = id_meta_df[(id_meta_df['group'] == groub) & (
|
||||||
|
id_meta_df['fish'] == fish2)]
|
||||||
|
|
||||||
|
size_winners = [size_fish1_row[col].values[0]
|
||||||
|
for col in ['l1', 'l2', 'l3']]
|
||||||
|
mean_size_winner = np.nanmean(size_winners)
|
||||||
|
|
||||||
|
size_losers = [size_fish2_row[col].values[0] for col in ['l1', 'l2', 'l3']]
|
||||||
|
mean_size_loser = np.nanmean(size_losers)
|
||||||
|
|
||||||
|
if mean_size_winner > mean_size_loser:
|
||||||
|
size_diff_bigger = mean_size_winner - mean_size_loser
|
||||||
|
size_diff_smaller = mean_size_loser - mean_size_winner
|
||||||
|
winner_fish_id = folder_row['rec_id1'].values[0]
|
||||||
|
loser_fish_id = folder_row['rec_id2'].values[0]
|
||||||
|
|
||||||
|
elif mean_size_winner < mean_size_loser:
|
||||||
|
size_diff_bigger = mean_size_loser - mean_size_winner
|
||||||
|
size_diff_smaller = mean_size_winner - mean_size_loser
|
||||||
|
winner_fish_id = folder_row['rec_id2'].values[0]
|
||||||
|
loser_fish_id = folder_row['rec_id1'].values[0]
|
||||||
|
else:
|
||||||
|
size_diff = np.nan
|
||||||
|
winner_fish_id = np.nan
|
||||||
|
loser_fish_id = np.nan
|
||||||
|
|
||||||
|
chirp_winner = len(
|
||||||
|
Behavior.chirps[Behavior.chirps_ids == winner_fish_id])
|
||||||
|
chirp_loser = len(
|
||||||
|
Behavior.chirps[Behavior.chirps_ids == loser_fish_id])
|
||||||
|
|
||||||
|
return size_diff_bigger, chirp_winner, size_diff_smaller, chirp_loser
|
||||||
|
|
||||||
|
|
||||||
|
def get_chirp_freq(folder_name, Behavior, order_meta_df):
|
||||||
|
|
||||||
|
foldername = folder_name.split('/')[-2]
|
||||||
|
folder_row = order_meta_df[order_meta_df['recording'] == foldername]
|
||||||
|
fish1 = folder_row['rec_id1'].values[0].astype(int)
|
||||||
|
fish2 = folder_row['rec_id2'].values[0].astype(int)
|
||||||
|
chirp_freq_fish1 = np.nanmedian(
|
||||||
|
Behavior.freq[Behavior.ident == fish1])
|
||||||
|
chirp_freq_fish2 = np.nanmedian(
|
||||||
|
Behavior.freq[Behavior.ident == fish2])
|
||||||
|
|
||||||
|
if chirp_freq_fish1 > chirp_freq_fish2:
|
||||||
|
freq_diff = chirp_freq_fish1 - chirp_freq_fish2
|
||||||
|
winner_fish_id = folder_row['rec_id1'].values[0]
|
||||||
|
loser_fish_id = folder_row['rec_id2'].values[0]
|
||||||
|
|
||||||
|
elif chirp_freq_fish1 < chirp_freq_fish2:
|
||||||
|
freq_diff = chirp_freq_fish2 - chirp_freq_fish1
|
||||||
|
winner_fish_id = folder_row['rec_id2'].values[0]
|
||||||
|
loser_fish_id = folder_row['rec_id1'].values[0]
|
||||||
|
|
||||||
|
chirp_diff = len(Behavior.chirps[Behavior.chirps_ids == winner_fish_id]) - len(
|
||||||
|
Behavior.chirps[Behavior.chirps_ids == loser_fish_id])
|
||||||
|
|
||||||
|
return freq_diff, chirp_diff
|
||||||
|
|
||||||
|
|
||||||
|
def main(datapath: str):
|
||||||
|
|
||||||
|
foldernames = [
|
||||||
|
datapath + x + '/' for x in os.listdir(datapath) if os.path.isdir(datapath+x)]
|
||||||
|
path_order_meta = (
|
||||||
|
'/').join(foldernames[0].split('/')[:-2]) + '/order_meta.csv'
|
||||||
|
order_meta_df = read_csv(path_order_meta)
|
||||||
|
order_meta_df['recording'] = order_meta_df['recording'].str[1:-1]
|
||||||
|
path_id_meta = (
|
||||||
|
'/').join(foldernames[0].split('/')[:-2]) + '/id_meta.csv'
|
||||||
|
id_meta_df = read_csv(path_id_meta)
|
||||||
|
|
||||||
|
chirps_winner = []
|
||||||
|
size_diffs = []
|
||||||
|
size_chirps_diffs = []
|
||||||
|
chirps_loser = []
|
||||||
|
freq_diffs = []
|
||||||
|
freq_chirps_diffs = []
|
||||||
|
|
||||||
|
for foldername in foldernames:
|
||||||
|
# behabvior is pandas dataframe with all the data
|
||||||
|
if foldername == '../data/mount_data/2020-05-12-10_00/':
|
||||||
|
continue
|
||||||
|
bh = Behavior(foldername)
|
||||||
|
# chirps are not sorted in time (presumably due to prior groupings)
|
||||||
|
# get and sort chirps and corresponding fish_ids of the chirps
|
||||||
|
category = bh.behavior
|
||||||
|
timestamps = bh.start_s
|
||||||
|
# Correct for doubles in chasing on- and offsets to get the right on-/offset pairs
|
||||||
|
# Get rid of tracking faults (two onsets or two offsets after another)
|
||||||
|
category, timestamps = correct_chasing_events(category, timestamps)
|
||||||
|
|
||||||
|
winner_chirp, loser_chirp = get_chirp_winner_loser(
|
||||||
|
foldername, bh, order_meta_df)
|
||||||
|
chirps_winner.append(winner_chirp)
|
||||||
|
chirps_loser.append(loser_chirp)
|
||||||
|
size_diff, chirp_diff = get_chirp_size(
|
||||||
|
foldername, bh, order_meta_df, id_meta_df)
|
||||||
|
size_diffs.append(size_diff)
|
||||||
|
size_chirps_diffs.append(chirp_diff)
|
||||||
|
|
||||||
|
freq_diff, freq_chirps_diff = get_chirp_freq(
|
||||||
|
foldername, bh, order_meta_df)
|
||||||
|
freq_diffs.append(freq_diff)
|
||||||
|
freq_chirps_diffs.append(freq_chirps_diff)
|
||||||
|
|
||||||
|
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(22*ps.cm, 12*ps.cm), width_ratios=[1.5, 1,1])
|
||||||
|
plt.subplots_adjust(left=0.098, right=0.945, top=0.94, wspace=0.343)
|
||||||
|
scatterwinner = 1.15
|
||||||
|
scatterloser = 1.85
|
||||||
|
chirps_winner = np.asarray(chirps_winner)[~np.isnan(chirps_winner)]
|
||||||
|
chirps_loser = np.asarray(chirps_loser)[~np.isnan(chirps_loser)]
|
||||||
|
|
||||||
|
bplot1 = ax1.boxplot(chirps_winner, positions=[
|
||||||
|
1], showfliers=False, patch_artist=True)
|
||||||
|
bplot2 = ax1.boxplot(chirps_loser, positions=[
|
||||||
|
2], showfliers=False, patch_artist=True)
|
||||||
|
ax1.scatter(np.ones(len(chirps_winner)) *
|
||||||
|
scatterwinner, chirps_winner, color='r')
|
||||||
|
ax1.scatter(np.ones(len(chirps_loser)) *
|
||||||
|
scatterloser, chirps_loser, color='r')
|
||||||
|
ax1.set_xticklabels(['winner', 'loser'])
|
||||||
|
ax1.text(0.1, 0.9, f'n = {len(chirps_winner)}',
|
||||||
|
transform=ax1.transAxes, color=ps.white)
|
||||||
|
|
||||||
|
for w, l in zip(chirps_winner, chirps_loser):
|
||||||
|
ax1.plot([scatterwinner, scatterloser], [w, l],
|
||||||
|
color='r', alpha=0.5, linewidth=0.5)
|
||||||
|
ax1.set_ylabel('Chirps [n]', color=ps.white)
|
||||||
|
|
||||||
|
colors1 = ps.red
|
||||||
|
ps.set_boxplot_color(bplot1, colors1)
|
||||||
|
colors1 = ps.orange
|
||||||
|
ps.set_boxplot_color(bplot2, colors1)
|
||||||
|
ax2.scatter(size_diffs, size_chirps_diffs, color='r')
|
||||||
|
ax2.set_xlabel('Size difference [mm]')
|
||||||
|
ax2.set_ylabel('Chirps difference [n]')
|
||||||
|
|
||||||
|
#ax3.scatter(freq_diffs, size_chirps_diffs, color='r')
|
||||||
|
# ax3.scatter(freq_diffs, freq_chirps_diffs, color='r')
|
||||||
|
ax3.set_xlabel('Frequency difference [Hz]')
|
||||||
|
ax3.set_yticklabels([])
|
||||||
|
ax3.set
|
||||||
|
|
||||||
|
#plt.savefig('../poster/figs/chirps_winner_loser.pdf')
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
# Path to the data
|
||||||
|
datapath = '../data/mount_data/'
|
||||||
|
|
||||||
|
main(datapath)
|
@ -20,89 +20,90 @@ logger = makeLogger(__name__)
|
|||||||
def main(datapath: str):
|
def main(datapath: str):
|
||||||
|
|
||||||
foldernames = [datapath + x + '/' for x in os.listdir(datapath) if os.path.isdir(datapath+x)]
|
foldernames = [datapath + x + '/' for x in os.listdir(datapath) if os.path.isdir(datapath+x)]
|
||||||
#for foldername in foldernames:
|
for foldername in foldernames:
|
||||||
foldername = foldernames[0]
|
#foldername = foldernames[0]
|
||||||
# if foldername == '../data/mount_data/2020-05-12-10_00/':
|
if foldername == '../data/mount_data/2020-05-12-10_00/':
|
||||||
# continue
|
continue
|
||||||
# behabvior is pandas dataframe with all the data
|
#behabvior is pandas dataframe with all the data
|
||||||
bh = Behavior(foldername)
|
bh = Behavior(foldername)
|
||||||
|
#2020-06-11-10
|
||||||
category = bh.behavior
|
category = bh.behavior
|
||||||
timestamps = bh.start_s
|
timestamps = bh.start_s
|
||||||
# Correct for doubles in chasing on- and offsets to get the right on-/offset pairs
|
# Correct for doubles in chasing on- and offsets to get the right on-/offset pairs
|
||||||
# Get rid of tracking faults (two onsets or two offsets after another)
|
# Get rid of tracking faults (two onsets or two offsets after another)
|
||||||
category, timestamps = correct_chasing_events(category, timestamps)
|
category, timestamps = correct_chasing_events(category, timestamps)
|
||||||
|
|
||||||
# split categories
|
# split categories
|
||||||
chasing_onset = (timestamps[category == 0]/ 60) /60
|
chasing_onset = (timestamps[category == 0]/ 60) /60
|
||||||
chasing_offset = (timestamps[category == 1]/ 60) /60
|
chasing_offset = (timestamps[category == 1]/ 60) /60
|
||||||
physical_contact = (timestamps[category == 2] / 60) /60
|
physical_contact = (timestamps[category == 2] / 60) /60
|
||||||
|
|
||||||
all_fish_ids = np.unique(bh.chirps_ids)
|
all_fish_ids = np.unique(bh.chirps_ids)
|
||||||
fish1_id = all_fish_ids[0]
|
fish1_id = all_fish_ids[0]
|
||||||
fish2_id = all_fish_ids[1]
|
fish2_id = all_fish_ids[1]
|
||||||
# Associate chirps to inidividual fish
|
# Associate chirps to inidividual fish
|
||||||
fish1 = (bh.chirps[bh.chirps_ids == fish1_id] / 60) /60
|
fish1 = (bh.chirps[bh.chirps_ids == fish1_id] / 60) /60
|
||||||
fish2 = (bh.chirps[bh.chirps_ids == fish2_id] / 60) /60
|
fish2 = (bh.chirps[bh.chirps_ids == fish2_id] / 60) /60
|
||||||
fish1_color = ps.red
|
fish1_color = ps.red
|
||||||
fish2_color = ps.orange
|
fish2_color = ps.orange
|
||||||
|
|
||||||
fig, ax = plt.subplots(4, 1, figsize=(28*ps.cm, 13*ps.cm), height_ratios=[0.5, 0.5, 0.5, 6], sharex=True)
|
fig, ax = plt.subplots(4, 1, figsize=(21*ps.cm, 13*ps.cm), height_ratios=[0.5, 0.5, 0.5, 6], sharex=True)
|
||||||
# marker size
|
# marker size
|
||||||
s = 200
|
s = 200
|
||||||
ax[0].scatter(physical_contact, np.ones(len(physical_contact)), color='firebrick', marker='|', s=s)
|
ax[0].scatter(physical_contact, np.ones(len(physical_contact)), color='firebrick', marker='|', s=s)
|
||||||
ax[1].scatter(chasing_onset, np.ones(len(chasing_onset)), color='green', marker='|', s=s )
|
ax[1].scatter(chasing_onset, np.ones(len(chasing_onset)), color='green', marker='|', s=s )
|
||||||
ax[2].scatter(fish1, np.ones(len(fish1))-0.25, color=fish1_color, marker='|', s=s)
|
ax[2].scatter(fish1, np.ones(len(fish1))-0.25, color=fish1_color, marker='|', s=s)
|
||||||
ax[2].scatter(fish2, np.zeros(len(fish2))+0.25, color=fish2_color, marker='|', s=s)
|
ax[2].scatter(fish2, np.zeros(len(fish2))+0.25, color=fish2_color, marker='|', s=s)
|
||||||
|
|
||||||
|
|
||||||
freq_temp = bh.freq[bh.ident==fish1_id]
|
freq_temp = bh.freq[bh.ident==fish1_id]
|
||||||
time_temp = bh.time[bh.idx[bh.ident==fish1_id]]
|
time_temp = bh.time[bh.idx[bh.ident==fish1_id]]
|
||||||
ax[3].plot((time_temp/ 60) /60, freq_temp, color=fish1_color)
|
ax[3].plot((time_temp/ 60) /60, freq_temp, color=fish1_color)
|
||||||
|
|
||||||
freq_temp = bh.freq[bh.ident==fish2_id]
|
freq_temp = bh.freq[bh.ident==fish2_id]
|
||||||
time_temp = bh.time[bh.idx[bh.ident==fish2_id]]
|
time_temp = bh.time[bh.idx[bh.ident==fish2_id]]
|
||||||
ax[3].plot((time_temp/ 60) /60, freq_temp, color=fish2_color)
|
ax[3].plot((time_temp/ 60) /60, freq_temp, color=fish2_color)
|
||||||
|
|
||||||
#ax[3].imshow(decibel(bh.spec), extent=[bh.time[0]/60/60, bh.time[-1]/60/60, 0, 2000], aspect='auto', origin='lower')
|
#ax[3].imshow(decibel(bh.spec), extent=[bh.time[0]/60/60, bh.time[-1]/60/60, 0, 2000], aspect='auto', origin='lower')
|
||||||
|
|
||||||
# Hide grid lines
|
# Hide grid lines
|
||||||
ax[0].grid(False)
|
ax[0].grid(False)
|
||||||
ax[0].set_frame_on(False)
|
ax[0].set_frame_on(False)
|
||||||
ax[0].set_xticks([])
|
ax[0].set_xticks([])
|
||||||
ax[0].set_yticks([])
|
ax[0].set_yticks([])
|
||||||
ps.hide_ax(ax[0])
|
ps.hide_ax(ax[0])
|
||||||
|
|
||||||
|
|
||||||
ax[1].grid(False)
|
ax[1].grid(False)
|
||||||
ax[1].set_frame_on(False)
|
ax[1].set_frame_on(False)
|
||||||
ax[1].set_xticks([])
|
ax[1].set_xticks([])
|
||||||
ax[1].set_yticks([])
|
ax[1].set_yticks([])
|
||||||
ps.hide_ax(ax[1])
|
ps.hide_ax(ax[1])
|
||||||
|
|
||||||
ax[2].grid(False)
|
ax[2].grid(False)
|
||||||
ax[2].set_frame_on(False)
|
ax[2].set_frame_on(False)
|
||||||
ax[2].set_yticks([])
|
ax[2].set_yticks([])
|
||||||
ax[2].set_xticks([])
|
ax[2].set_xticks([])
|
||||||
ps.hide_ax(ax[2])
|
ps.hide_ax(ax[2])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ax[3].axvspan(3, 6, 0, 5, facecolor='grey', alpha=0.5)
|
ax[3].axvspan(3, 6, 0, 5, facecolor='grey', alpha=0.5)
|
||||||
ax[3].set_xticks(np.arange(0, 6.1, 0.5))
|
ax[3].set_xticks(np.arange(0, 6.1, 0.5))
|
||||||
|
|
||||||
labelpad = 40
|
labelpad = 40
|
||||||
ax[0].set_ylabel('Physical contact', rotation=0, labelpad=labelpad)
|
fsize = 12
|
||||||
ax[1].set_ylabel('Chasing events', rotation=0, labelpad=labelpad)
|
ax[0].set_ylabel('Physical contact', rotation=0, labelpad=labelpad, fontsize=fsize)
|
||||||
ax[2].set_ylabel('Chirps', rotation=0, labelpad=labelpad)
|
ax[1].set_ylabel('Chasing events', rotation=0, labelpad=labelpad, fontsize=fsize)
|
||||||
ax[3].set_ylabel('EODf')
|
ax[2].set_ylabel('Chirps', rotation=0, labelpad=labelpad, fontsize=fsize)
|
||||||
|
ax[3].set_ylabel('EODf')
|
||||||
ax[3].set_xlabel('Time [h]')
|
|
||||||
#ax[0].set_title(foldername.split('/')[-2])
|
ax[3].set_xlabel('Time [h]')
|
||||||
# 2020-03-31-9_59
|
ax[0].set_title(foldername.split('/')[-2])
|
||||||
plt.subplots_adjust(left=0.13, right=0.987, top=0.97)
|
# 2020-03-31-9_59
|
||||||
plt.savefig('../poster/figs/timeline.pdf')
|
plt.subplots_adjust(left=0.158, right=0.987, top=0.918)
|
||||||
plt.show()
|
#plt.savefig('../poster/figs/timeline.pdf')
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
|
||||||
# plot chirps
|
# plot chirps
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -23,7 +23,10 @@ blockverticalspace=2mm, colspace=20mm, subcolspace=0mm]{tikzposter} %Default val
|
|||||||
with single - or physically separated - individuals.
|
with single - or physically separated - individuals.
|
||||||
\begin{tikzfigure}[]
|
\begin{tikzfigure}[]
|
||||||
\label{griddrawing}
|
\label{griddrawing}
|
||||||
\includegraphics[width=1\linewidth]{figs/introplot}
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
\includegraphics[width=0.8\linewidth]{figs/introplot}
|
||||||
|
>>>>>>> cdcf9564df07914cf57225de5a8bdaa642fbad0e
|
||||||
\end{tikzfigure}
|
\end{tikzfigure}
|
||||||
}
|
}
|
||||||
\myblock[TranspBlock]{Chirp detection}{
|
\myblock[TranspBlock]{Chirp detection}{
|
||||||
@ -41,11 +44,26 @@ blockverticalspace=2mm, colspace=20mm, subcolspace=0mm]{tikzposter} %Default val
|
|||||||
\includegraphics[width=\linewidth]{figs/timeline.pdf}
|
\includegraphics[width=\linewidth]{figs/timeline.pdf}
|
||||||
\end{tikzfigure}
|
\end{tikzfigure}
|
||||||
\noindent
|
\noindent
|
||||||
\begin{tikzfigure}[]
|
\begin{itemize}
|
||||||
\label{fig:example_b}
|
\setlength\itemsep{0.5em}
|
||||||
\includegraphics[width=\linewidth]{figs/chirps_winner_loser.pdf}
|
\item Two fish compete for one hidding place in one tank,
|
||||||
\end{tikzfigure}
|
\item Experiment had a 3 hour long darkphase and a 3 hour long light phase.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
\noindent
|
\noindent
|
||||||
|
\begin{minipage}[c]{0.7\linewidth}
|
||||||
|
\begin{tikzfigure}[]
|
||||||
|
\label{fig:example_b}
|
||||||
|
\includegraphics[width=\linewidth]{figs/chirps_winner_loser.pdf}
|
||||||
|
\end{tikzfigure}
|
||||||
|
\end{minipage} % no space if you would like to put them side by side
|
||||||
|
\begin{minipage}[c]{0.2\linewidth}
|
||||||
|
\begin{itemize}
|
||||||
|
\setlength\itemsep{0.5em}
|
||||||
|
\item Fish who won the competition chirped more often than the fish who lost.
|
||||||
|
\item
|
||||||
|
\end{itemize}
|
||||||
|
\end{minipage}
|
||||||
}
|
}
|
||||||
|
|
||||||
\myblock[TranspBlock]{Interactions at modulations}{
|
\myblock[TranspBlock]{Interactions at modulations}{
|
||||||
@ -55,19 +73,7 @@ blockverticalspace=2mm, colspace=20mm, subcolspace=0mm]{tikzposter} %Default val
|
|||||||
\includegraphics[width=0.5\linewidth]{example-image-c}
|
\includegraphics[width=0.5\linewidth]{example-image-c}
|
||||||
\end{tikzfigure}
|
\end{tikzfigure}
|
||||||
|
|
||||||
\begin{multicols}{2}
|
|
||||||
\begin{itemize}
|
|
||||||
\setlength\itemsep{0.5em}
|
|
||||||
\item $\Delta$EOD$f$ does not appear to decrease during synchronous modulations ().
|
|
||||||
\item Individuals that rise their EOD$f$ first appear to rise their frequency higher compared to reactors (\textbf{B}).
|
|
||||||
\vfill
|
|
||||||
\null
|
|
||||||
\columnbreak
|
|
||||||
\item Synchronized fish keep distances below 1 m (\textbf{C}) but distances over 3 m also occur (see \textbf{movie}).
|
|
||||||
\item Spatial interactions increase \textbf{after} the start of a synchronous modulation (\textbf{D}).
|
|
||||||
\end{itemize}
|
|
||||||
\end{multicols}
|
|
||||||
\vspace{-1cm}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\myblock[GrayBlock]{Conclusion}{
|
\myblock[GrayBlock]{Conclusion}{
|
||||||
|
Loading…
Reference in New Issue
Block a user