ELIFE-ASU / Neet

Simulating and analyzing dynamical network models
https://neet.readthedocs.io/en/stable
Other
4 stars 10 forks source link

Basins and Attractors in different orders #48

Closed dglmoore closed 6 years ago

dglmoore commented 7 years ago

The neet.synchronous.basins and neet.synchronous.attractors produce results in different orders. That is, the attractors that are generated by attractors correspond to the basins generated by basins, but they are not in the same order. There is no way to know which attractor goes with which basin.

hbsmith commented 7 years ago

After the open pull requests are merged I'm going to make a change to the attractors function to address this issue.

it'll look something like this:

def attractors(net, size=None, with_basins=False):
    if with_basins:
        return [(nx.simple_cycles(basin),basin) for basin in basins(graph,size=size)]
    else:
        return nx.simple_cycles(graph)