Skip to content

Commit

Permalink
codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
ddkohler committed Jul 31, 2024
1 parent ea1284d commit 693d798
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions tests/mixed/default.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""smokescreen checks of mixed domain default hamiltonian integration"""
import WrightSim as ws
import WrightTools as wt
import numpy as np
import matplotlib.pyplot as plt
import pytest


Expand Down Expand Up @@ -56,25 +54,6 @@ def test_windowed():
scan2 = exp2.run(ham, mp=False, windowed=True)
data2 = scan2.sig

if True:
fig, (ax1, ax2) = plt.subplots(nrows=2)
ax1.plot(data.time[:], data.channels[0][:].real)

wn = np.fft.fftfreq(n=data.time.size, d=exp.timestep) / 3e-5
sig_fft = np.abs(np.fft.fft(data.channels[0][:]))
ax2.plot(wn, sig_fft)

ax1.plot(data2.time[:], data2.channels[0][:].real)
# ax1.plot(data2.time[:], data2.channels[0][:].imag)

wn2 = np.fft.fftfreq(n=data.time.size, d=exp.timestep) / 3e-5
sig_fft2 = np.abs(np.fft.fft(data.channels[0][:]))
ax2.plot(wn2, sig_fft2)

ax2.set_xlim(-4000, -2000)

plt.show()

assert data2.time.size == data.time.size
assert data2.time.size == data2.channels[0].size
assert np.all(np.isclose(data2.channels[0][:], data.channels[0][:]))
Expand All @@ -101,11 +80,6 @@ def test_frequency():
wn = np.fft.fftfreq(n=data.time.size, d=exp.timestep) / 3e-5
sig_fft = np.abs(np.fft.fft(data.channels[0][:]))

if False:
fig, (ax1, ax2) = plt.subplots(nrows=2)
ax2.plot(wn, sig_fft)
plt.show()

assert np.abs(wn[np.argmax(sig_fft)] + w_central) < np.abs(wn[1] - wn[0])


Expand Down

0 comments on commit 693d798

Please sign in to comment.