-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stuart landau model C++ implementation added
- Loading branch information
Showing
14 changed files
with
458 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import vbi | ||
import numpy as np | ||
import networkx as nx | ||
import matplotlib.pyplot as plt | ||
from helpers import sl_visualize | ||
from vbi.models.cpp.sl import SL_sdde | ||
|
||
seed = 2 | ||
np.random.seed(seed) | ||
|
||
LABESSIZE = 14 | ||
plt.rcParams['axes.labelsize'] = LABESSIZE | ||
plt.rcParams['xtick.labelsize'] = LABESSIZE | ||
plt.rcParams['ytick.labelsize'] = LABESSIZE | ||
|
||
ds = vbi.Load_Data_Sample(nn=84) | ||
weights = ds.get_weights(normalize=True) | ||
distances = ds.get_lengths() / 1000 # [m] | ||
nn = weights.shape[0] | ||
|
||
params = { | ||
"G": 1000.0, | ||
"a": -5.0, | ||
"dt": 1e-4, | ||
"weights": weights, | ||
"distances": distances, # [m] | ||
"velocity": 6.0, # [m/s] | ||
"omega": 40*2*np.pi * np.ones(nn), | ||
'sigma_r': 1e-4, # noise strength | ||
'sigma_v': 1e-4, # noise strength | ||
"record_step": 2, | ||
"t_initial": 0.0, | ||
"t_transition": 2.0, | ||
"t_end": 10.0, | ||
"seed": 2, | ||
} | ||
|
||
obj = SL_sdde(params) | ||
data = obj.run() | ||
|
||
sl_visualize(data, params, color="k") | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
from .tests.all_tests import tests | ||
from .tests.all_tests import tests | ||
|
||
from .feature_extraction.utility import Load_Data_Sample |
Oops, something went wrong.