Investigating cluster dynamics in models of patchy ecosystems This repository is organized as follows:
- Operational scripts in the root folder: terminal.py should be used for running jobs, compile_changes.py performs all the analysis and dumps data in a folder named "outputs" located in the root, and plot_changes.py generates graphs from the aforementioned data
- This project explores several models. Every model has different variations of scripts that return/save different data and are optimized for different purposes. The data generated by these scripts are dumped in the same folder and analyzed by the compile_changes.py file
- cluster_dynamics.py looks at two lattices that differ by a single update and returns (a) process undergone by the lattice (growth, decay, split, merge, appearance, disappearance), (b) sizes of the participating cluster(s), and (c) sizes of the resulting cluster(s)
- The "code_snippets" folder contains grouped lines of code for analyzing specific aspects of each model. These can be readily copied and modified in the terminal.py script
- The "consistency_checks" folder contains scripts that simulate the inferred stochastic differential equations from a realisation and compares the resultant distribution to the actual distribution
- The "fitters" folder contains Python and R scripts that fit (a) cluster size distribution and (b) cluster dynamics to power-law, truncated power-law and exponential distributions using an R package called spatialwarnings
- A folder named "outputs" is generated during runtime, for dumping .txt files (generated by compile_changes.py) and .png files (generated by plot_changes.py). Within this folder, organizer.py can be used to group files with same prefix into a single folder. These folders were then moved to the "results" section
- The "plotters" folder contains scripts uses data from the "results" folder to generate figures for thesis/publication