Some checks failed
gitea-physics/tantri/pipeline/head There was a failure building this commit
15 lines
506 B
Python
Executable File
15 lines
506 B
Python
Executable File
from tantri.dipoles import Dipole, DipoleTimeSeries
|
|
import numpy
|
|
|
|
|
|
def test_dipoles_1(snapshot):
|
|
d1 = Dipole(numpy.array([0, 0, 10]), numpy.array([5, 3, 2]), 15)
|
|
d2 = Dipole(numpy.array([0, 0, 10]), numpy.array([-2, 3, 2]), 0.1)
|
|
d3 = Dipole(numpy.array([0, 0, 10]), numpy.array([2, 1, 2]), 6)
|
|
d4 = Dipole(numpy.array([0, 0, 10]), numpy.array([-5, -5, 2]), 50)
|
|
|
|
ts_gen = DipoleTimeSeries([d1, d2, d3, d4], 0.001)
|
|
time_series = [ts_gen.transition() for i in range(20)]
|
|
|
|
assert time_series == snapshot
|