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
| #!/usr/bin/env python3 | |
| from scipy.integrate import odeint | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from matplotlib import animation | |
| # phase space points y = (X, phi, X', phi') | |
| # length in units of l | |
| # time in units of 1 / \omega_P |
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
| #!/usr/bin/env python3 | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from matplotlib import animation | |
| # what to plot | |
| def y(x, t): | |
| return np.sin(x - t) |
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
| #!/usr/bin/env python3 | |
| import numpy as np | |
| from scipy.integrate import odeint | |
| import matplotlib as mpl | |
| import matplotlib.pyplot as plt | |
| from matplotlib import animation | |
| # define constants/units |