observePhaseCoherence

network.observe(fileName, edgeType = edge)
Adds the complex sum of the phases of all nodes to the list of observed features. Whenever net.snapshot or net.evolve is called, observed features of the network will be written to the respective files. The file format is a space delimited matrix in which columns are observed features in the order in which they are added to the network.

Parameters

fileName : string
The name of the file to which data is written
edgeType : edgeTemplate
Nodes are observed via an edge, which is a copy of this template.

r =  \frac {1}{|N|}  \sum\limits_{i \in N} e^{-2 \pi \phi_n}

Example (python-conedy)

import conedy as co

N = co.network()


N.cycle(10,1,co.kuramoto())


N.observePhaseCoherence("output/observePhaseCoherence.py.1")
N.evolve(0.0,10.0)
N.removeObserver()


for i in range (0, 10):
      N.setState(i, i/10.0)


N.observePhaseCoherence("output/observePhaseCoherence.py.0")
N.evolve(10.0,20.0)

Example (conedy)

network N;

N.cycle(10,1,kuramoto());


N.observePhaseCoherence("output/observePhaseCoherence.co.1");
N.evolve(0.0,10.0);
N.removeObserver();

int i;

for (i = 0 ; i < 10; i = i + 1)
      N.setState(i, i/10.0);


N.observePhaseCoherence("output/observePhaseCoherence.co.0");
N.evolve(10.0,20.0);

Table Of Contents

Previous topic

observeComponents

Next topic

observeSum