1
1
"""smokescreen checks of mixed domain default hamiltonian integration"""
2
2
import WrightSim as ws
3
- import WrightTools as wt
4
3
import numpy as np
5
- import matplotlib .pyplot as plt
6
4
import pytest
7
5
8
6
@@ -56,25 +54,6 @@ def test_windowed():
56
54
scan2 = exp2 .run (ham , mp = False , windowed = True )
57
55
data2 = scan2 .sig
58
56
59
- if True :
60
- fig , (ax1 , ax2 ) = plt .subplots (nrows = 2 )
61
- ax1 .plot (data .time [:], data .channels [0 ][:].real )
62
-
63
- wn = np .fft .fftfreq (n = data .time .size , d = exp .timestep ) / 3e-5
64
- sig_fft = np .abs (np .fft .fft (data .channels [0 ][:]))
65
- ax2 .plot (wn , sig_fft )
66
-
67
- ax1 .plot (data2 .time [:], data2 .channels [0 ][:].real )
68
- # ax1.plot(data2.time[:], data2.channels[0][:].imag)
69
-
70
- wn2 = np .fft .fftfreq (n = data .time .size , d = exp .timestep ) / 3e-5
71
- sig_fft2 = np .abs (np .fft .fft (data .channels [0 ][:]))
72
- ax2 .plot (wn2 , sig_fft2 )
73
-
74
- ax2 .set_xlim (- 4000 , - 2000 )
75
-
76
- plt .show ()
77
-
78
57
assert data2 .time .size == data .time .size
79
58
assert data2 .time .size == data2 .channels [0 ].size
80
59
assert np .all (np .isclose (data2 .channels [0 ][:], data .channels [0 ][:]))
@@ -101,11 +80,6 @@ def test_frequency():
101
80
wn = np .fft .fftfreq (n = data .time .size , d = exp .timestep ) / 3e-5
102
81
sig_fft = np .abs (np .fft .fft (data .channels [0 ][:]))
103
82
104
- if False :
105
- fig , (ax1 , ax2 ) = plt .subplots (nrows = 2 )
106
- ax2 .plot (wn , sig_fft )
107
- plt .show ()
108
-
109
83
assert np .abs (wn [np .argmax (sig_fft )] + w_central ) < np .abs (wn [1 ] - wn [0 ])
110
84
111
85
0 commit comments