competition_experiments/code
2024-01-19 11:52:03 +01:00
..
__pycache__ stuff with figures and videos 2023-12-05 15:15:09 +01:00
figures added figures ... could kill the whale :D 2024-01-19 11:52:03 +01:00
complete_analysis.py example trials reworked 2023-12-04 11:23:33 +01:00
ethogram.py stuff with figures and videos 2023-12-05 15:15:09 +01:00
eval_LED.py created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
event_time_analysis.py reworked code to make nice plots for my presentation 2023-11-28 14:50:57 +01:00
event_time_correlations.py plotting and video stuff 2023-12-04 12:21:18 +01:00
event_videos.py stuff with figures and videos 2023-12-05 15:15:09 +01:00
id_meta.csv created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
LED_detect.py created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
order_meta.csv created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
README.md created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
trail_analysis.py created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
trial_summary_bu.csv created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
trial_summary_eval.py created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00
trial_summary.csv created tex file and moved code and figures to different folder 2023-08-14 07:29:57 +02:00

How to competition experiment

Workflow (Python-scripts/applications):

  1. wavetracker.trackingGUI
  2. wavetracker.EODsorter
  3. LED_detect.py
  4. eval_LED.py
  5. trial_analysis.py
  6. event_videos.py (optional)

Raw data analysis using the wavetracker-modul

trackingGUI.py

Frequency extraction and tracking

  • open Raw-file (traces-grid1.raw)
  • 'Spectrogram'-settings:
    • overlap fraction: 0.8
    • frequency resolution: 1
  • check 'Auto-save'; press 'Run'

Fine spectrogram

  • repeat steps above but press 'Calc. fine spec' instead of Run
    • fine spec data saved in /home/"user"/analysis/"filename"

EODsorter.py

  • load dataset/folder
  • correct tracked EOD traces
  • fill EOD traces
    • fine spec data needs to be manually added to the dataset-folder

Competition trial analysis

trail_analysis.py

  • Detection of winners, their EODf traces, rises, etc. Results stored in "data-path"/analysis.
  • (optional) Meta.csv file in base-path of analyzed data. Creates entries for each analyzed recording (index = file names) and stores Meta-data. Manual competation suggested.

Video analysis

LED_detect.py

  • Detect blinking LED (emitted by electric recording setup). Used for synchronization.
  • "-c" argument to identify correct detection area for LED
  • '-x' (tuple) borders of LED detection window on X-axis (in pixels)
  • '-y' (tuple) borders of LED detection window on Y-axis (in pixels)

eval_LED.py

  • creates time vector to synchronize electric and video recording
  • for each frame contains a time-point (in s) that corresponds to the electric recordings.

Rise videos (optional)

  • generates for each detected rise a short video showing the fish's behavior around the rise event.
  • sorted in 'base-path'/rise_video.