figshare
Browse
TEXT
xtract.f (24.82 kB)
TEXT
xtract-clean.f (11.17 kB)
.GNUPLOT
pl-2f.gnuplot (1.4 kB)
TEXT
2hemigr.dat (3.1 MB)
TEXT
2zebraf.dat (2.42 MB)
TEXT
readme.md (2.42 kB)
1/0
6 files

Xtract -- FORTRAN code for the extraction of social interaction functions in a simple case

software
posted on 2020-02-03, 22:56 authored by Ramón EscobedoRamón Escobedo, Valentin Lecheval, Vaios Papaspyros, Frank Bonnet, Francesco Mondada, Clement SireClement Sire, Guy TheraulazGuy Theraulaz
This program implements the method presented in the article
"A data-driven method for modelling and reconstructing social interactions in moving animal groups", with authors
R. Escobedo, V. Lecheval, V. Papaspyros, F. Bonnet, F. Mondada, C. Sire and G. Theraulaz.

We include four files:
- xtract.f: the main program;
- pl-2f.gnuplot: a script for gnuplot to visualize the results;
- 2hemigr.dat: the data from real fish experiments with pairs of H. rhodostomus,
- 2zebraf.dat: the data from real fish experiments with pairs of D. rerio.

The program extracts the functions f(x) and g(y) from the equation f(x)g(y) = a(x,y), where a(x,y) is given by data in three different cases:
- Case 1.1. For data homogeneously distributed (eps = 1; see the main program and the article of reference)
- Case 1.2. For data distributed as in real fish experiments (data borrowed from the experiments used in the article and in [Calovi2018]).
- Case 2. From real data of fish experiments, H. rhodostomus (2hemigr.dat) or D. rerio (2zebraf.dat).

Data files have 5 columns structured in events (Ne = number of events):
event_id || fish_id || time || x(t) || y(t)
1 --> Ne || 1 or 2 || (sec) || (m) || (m)

To select an option, edit the file xtract.f and choose the corresponding value of the variable IOP (lines 93--95):
- IOP = 1: Case 1.1: analytical & homogeneous,
- IOP = 2: Case 1.2: analytical & real distribution,
- IOP = 3: Case 2: from experimental data.

[Calovi2018]: Disentangling and modeling interactions in fish with burst-and-coast swimming reveal distinct alignment and attraction behaviors, Calovi DS, Litchinko A, Lecheval V, Lopez U, Pérez Escudero A, et al. (2018). PLOS Computational Biology 14(1): e1005933. https://doi.org/10.1371/journal.pcbi.1005933

## Getting Started
### Prerequisites
A fortran compiler supporting Fortran 90 and gnuplot for visualisation.

### Installing
Download all files in the same directory.Compile with:
> gfortran -O2 xtract.f -o dale

## Running the tests
Run with:
> dale
Plot the result (i.e., the interaction functions) with:
> gnuplot
gnuplot> load "pl-2f.gnuplot"

## Authors
- Ramón Escobedo - escobedor@gmail.com
- Valentin Lecheval
- Vaios Papaspyros
- Frank Bonnet
- Francesco Mondada
- Clément Sire
- Guy Theraulaz

## License
The five files xtract.f, xtract-clean.f, pl-2f.gnuplot, 2hemigr.dat, and 2zebraf.dat are licensed under the Creative Commons Attribution-ShareAlike 4.0 International license (CC BY-SA 4.0).
https://creativecommons.org/licenses/by-sa/4.0/


Funding

Marie Curie Core/Program Grant Fund- ing, Grant No. 655235–SmartMass

Germaine de Staël project No. 2019-17

Swiss National Science Foundation project “Self-Adaptive Mixed Societies of Animals and Robots”, Grant No. 175731

Scientific council of the Université Paul Sabatier

History