This is a Sage module which calculates phase diagrams using Sturm chains from Graph-facilitated resonant mode counting in stochastic interaction networks

Oscillations in dynamical systems are widely reported in multiple branches of physics. Critically, even a non-oscillatory deterministic system can produce cyclic trajectories when it is in a low copy number, stochastic, regime. Common methods of finding parameter ranges for stochastically driven resonances, such as direct calculation, are cumbersome for any but the smallest networks. In this paper, we provide a systematic framework to efficiently determine the number of resonant modes and parameter ranges for stochastic oscillations relying on real root counting algorithms and graph theoretic methods. We argue that stochastic resonance is a network property by showing that resonant modes only depend on the squared Jacobian matrix <i>J</i><sup>2</sup>, unlike deterministic oscillations which are determined by <i>J</i>. By using graph theoretic tools, analysis of stochastic behaviour for larger interaction networks is simplified and stochastic dynamical systems with multiple resonant modes can be identified easily.