Documentation
BiologicalOscillations.calculate_amplitude — Methodcalculate_amplitude(ode_solution::ODESolution)Calculate the amplitude of each signal in ode_solution and the relative peak/trough variation.
Arguments
ode_solution::ODESolution: The full output of thesolve()function fromDifferentialEquations.jl
Returns
amplitude_data::Dict: Dictionary containing the amplitude for each signal and the peak/trough variation. The output is encoded as:
amplitude_data = Dict('amplitude' => [amp_signal_1, ..., amp_signal_N], 
                      'peak_variation' => [peak_var_signal_1, ..., peak_var_signal_N], 
                      'trough_variation' => [trough_var_signal_1, ..., trough_var_signal_N])Notes
- Variation of peaks and troughs is calculated as the standard deviation of all the peaks/troughs in the signal divided by the amplitude. This quantity allows to distinguish stable oscillatory solution from dampened ones.
 - To find the most relevant peaks/troughs, we discard any peak/trough that has a prominence less than 1/3 of the total amplitude of the signal (calculated as the maximum - minimum of the signal). Therefore, it is better to use this function with a signal that has little to none transient behavior.
 
BiologicalOscillations.calculate_main_frequency — Method    calculate_main_frequency(ode_solution::ODESolution, sampling::Int, fft_points::Int)Obtains the dominant frequencies and their powers for each signal on ode_solution via the fast fourier transform
Arguments
ode_solution::ODESolution: The full output of thesolve()function fromDifferentialEquations.jlsampling::Int: Number of points to be used for uniform re-sampling ofode_solution. The same sampling is used for all signalsfft_points::Int: Number of points in the frequency spectrum
Returns
frequency_data::Dict: Dictionary containing the dominant frequencies and their powers for each signal. Here power means the amplitude of that frequency on the FFT spectrum. The output is encoded as:
frequency_data = Dict('frequency' => [freq_signal_1, ..., freq_signal_N], 
                      'power' => [power_signal_1, ..., power_signal_N])Note
- The provided 
ode_solutionhas to be solved with thedense = truesetting to be suitable for this function since uniform re-sampling is performed. 
BiologicalOscillations.is_ODE_oscillatory — Methodis_ODE_oscillatory(frequency_data::Dict, amplitude_data::Dict, freq_variation_threshold=0.05, power_threshold=1e-7, amp_variation_threshold=0.05)Returns true if an ODESolution is oscillatory based on the calculated frequency and amplitude. False otherwise.
Arguments (Required)
frequency_data::Dict: The output fromcalculate_main_frequencyamplitude_data::Dict: The output fromcalculate_amplitude
Arguments (Optional)
freq_variation_threhsold::Real: Maximum tolerated variation in frequency between species in the solution to be declared oscillatory. Default value 0.05.power_threshold::Real: Minimum spectral power that the main peak has to have to be declared oscillatory. Default value 1e-7.amp_variation_threhsold::Real: Maximum tolerated value for peak/trough variation to be declared oscillatory. Default value 0.05.