123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import numpy as np
- from rotational_path import PairRotationalPath, PathEnergyPlot
- import expansion
- from parameters import ModelParams
- import patch_size
- from pathlib import Path
- import matplotlib.pyplot as plt
- zero_to_pi_half = np.linspace(0, np.pi/2, 100, endpoint=True)
- pi_half_to_pi = np.linspace(np.pi/2, np.pi, 100, endpoint=True)
- QuadPath = PairRotationalPath()
- QuadPath.set_default_x_axis(zero_to_pi_half)
- QuadPath.add_euler(beta1=np.pi/2, beta2=zero_to_pi_half)
- QuadPath.add_euler(beta1=zero_to_pi_half[::-1], beta2=zero_to_pi_half[::-1])
- QuadPath.add_euler(beta1=zero_to_pi_half)
- QuadPath.add_euler(beta1=zero_to_pi_half[::-1], beta2=zero_to_pi_half)
- QuadPath.add_euler(beta1=np.pi/2, beta2=zero_to_pi_half, alpha2=np.pi/2)
- QuadPath.add_euler(beta1=np.pi/2, beta2=np.pi/2, alpha1=zero_to_pi_half[::-1])
- DipolePath = PairRotationalPath()
- DipolePath.set_default_x_axis(zero_to_pi_half)
- DipolePath.add_euler(beta2=pi_half_to_pi[::-1])
- DipolePath.add_euler(beta2=zero_to_pi_half[::-1])
- DipolePath.add_euler(beta2=zero_to_pi_half, beta1=zero_to_pi_half)
- DipolePath.add_euler(beta2=np.pi/2, beta1=np.pi/2, alpha2=zero_to_pi_half)
- DipolePath.add_euler(beta2=np.pi/2, alpha2=np.pi/2, beta1=pi_half_to_pi)
- DipolePath.add_euler(beta2=np.pi/2, beta1=pi_half_to_pi[::-1], alpha1=np.pi)
- DipolePath.add_euler(beta2=zero_to_pi_half[::-1], beta1=pi_half_to_pi, alpha1=np.pi)
- DipolePath.add_euler(beta2=zero_to_pi_half, beta1=pi_half_to_pi[::-1], alpha1=np.pi)
- DipolePath.add_euler(beta2=pi_half_to_pi, beta1=zero_to_pi_half[::-1], alpha1=np.pi)
- DipolePath2 = PairRotationalPath()
- DipolePath2.set_default_x_axis(zero_to_pi_half)
- DipolePath2.add_euler(beta2=pi_half_to_pi[::-1])
- DipolePath2.add_euler(beta2=zero_to_pi_half[::-1])
- DipolePath2.add_euler(beta2=zero_to_pi_half, beta1=zero_to_pi_half)
- DipolePath2.add_euler(beta2=np.pi/2, beta1=np.pi/2, alpha2=zero_to_pi_half)
- DipolePath2.add_euler(beta2=np.pi/2, alpha2=np.pi/2, beta1=pi_half_to_pi)
- DipolePath2.add_euler(beta2=zero_to_pi_half[::-1], beta1=pi_half_to_pi[::-1])
- DipolePath2.add_euler(beta2=zero_to_pi_half[::-1], beta1=np.pi)
- DipolePath2.add_euler(beta2=zero_to_pi_half, beta1=pi_half_to_pi[::-1], alpha1=np.pi)
- DipolePath2.add_euler(beta2=pi_half_to_pi, beta1=zero_to_pi_half[::-1], alpha1=np.pi)
- if __name__ == '__main__':
-
- params = ModelParams(R=150, kappaR=3)
-
-
-
-
-
- ex1 = expansion.SphericalCap(np.array([[0, 0], [np.pi, 0]]), np.array([0.3, 0.5, 1]), 0.001, 30)
- ex2 = ex1.clone()
-
-
-
- expansion.plot_theta_profile(ex1, num=1000, theta_end=np.pi, phi=0)
- ps = patch_size.potential_patch_size(ex1, params, theta1=np.pi / 2,
-
- )
- print(ps)
-
-
-
-
-
-
-
-
-
-
|