Skip to content

raviumadi/wingbeats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wingbeat-Call Asynchrony Simulation and Theory

This repository contains MATLAB code used to simulate and analyse temporal feasibility constraints on wingbeat-call coordination in echolocating bats.

This code supports the following manuscripts:

  1. Biosonar Responsivity Sets the Stage for the Terminal Buzz
  2. Temporal Feasibility Constraints on Wingbeat-Call Synchrony in Actively Echolocating Bats
  3. Probabilistic Sensory Constraints Shape Swarm Cohesion in Echolocating Bats

Repository Structure

init.m

  • Adds all subfolders under repo/ to the MATLAB path.

mat/ (main scripts)

  • wingbeat_sim_loop.m
    • Runs three deterministic scenario simulations:
      • fixed wingbeat frequency, fixed excursion
      • dynamic wingbeat frequency, fixed excursion
      • dynamic wingbeat frequency, dynamic excursion
    • Exports synchrony and waveform figures (PDF).
  • sim_rand_var_run.m
    • Runs Monte Carlo simulations with randomised parameter sampling.
    • Produces a results table and saves simulation_results.mat.
  • analyse_sim_results.m
    • Loads and analyses simulation output.
    • Computes descriptive summaries, effect sizes, and circular statistics.
    • Exports summary CSV files and analysis figures.

src/ (helper functions)

  • Core simulation and plotting helpers called by scripts in mat/.
  • Includes simulateEcholocationWings.m, generateVirtualBatCall.m, and formatting helpers (formatLatex*.m).

data/

  • Input and derived data files used by the analysis pipeline.
  • Includes simulation_results.mat and exported summary CSVs.

results/

  • Output artefacts from simulation and analysis runs.

doc/

  • Supplementary documentation and LaTeX assets.

Other files

  • citation.cff: citation metadata.
  • LICENSE.md: repository licence.

Requirements

  • MATLAB R2020b or newer.

Quick Start

From MATLAB, with the working directory set to repo/:

init

Then run scripts in this order:

  1. Deterministic scenario figures:
run('mat/wingbeat_sim_loop.m')
  1. Monte Carlo simulations:
run('mat/sim_rand_var_run.m')
  1. Analysis of Monte Carlo outputs:
run('mat/analyse_sim_results.m')

Notes:

  • sim_rand_var_run.m writes simulation_results.mat in the current working directory.
  • analyse_sim_results.m expects ../data/simulation_results.mat by default when results is not already in workspace. Update the path in the script if your output location differs.
  • Some scripts currently contain absolute output paths for figure export; adjust those paths for your local setup.

Reproducibility Notes

  • Monte Carlo runs use random sampling (rng('shuffle') in sim_rand_var_run.m), so outputs differ between runs unless you set a fixed RNG seed.
  • Analysis outputs are exported as CSV tables for direct manuscript reporting and cross-checking.

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0).

You are free to share and adapt the material for non-commercial use with appropriate credit.

Citation

If you use this codebase in part or in full, please cite the corresponding manuscripts or contact the author for further information.

Other Publications

Check my ResearchGate or ORCID for a full list of my research work.

Contact

Drop by my personal website biosonix.io and drop a message if you would like to collaborate or need assistance with the code and development.

About

The data, code and methods used in the paper - Temporal Feasibility Constraints on Wingbeat-Call Synchrony in Actively Echolocating Bats

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages