This file contains hidden or 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
| import sys | |
| import numpy as np | |
| import plotly.graph_objects as go | |
| def sample_HOs(t, sigma, freq_HO, HO0): | |
| eta = np.random.normal(scale=sigma, size=len(t)) | |
| HOs = np.empty(shape=len(t)) | |
| HOs[0] = HO0 | |
| for i in range(0, len(t)-1): | |
| HOs[i+1] = 2 * np.pi * freq_HO * t[i] + eta[i] |
This file contains hidden or 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
| ''' Dumps a config file of the type readable by ConfigParser | |
| into a dictionary | |
| Ref: http://docs.python.org/library/configparser.html | |
| ''' | |
| import sys | |
| import ConfigParser | |
| class GetDict: | |