MCPcopy Create free account
hub / github.com/NanoComp/meep / rect

Method rect

python/adjoint/filter_source.py:112–118  ·  view source on GitHub ↗
(self, t, f0)

Source from the content-addressed store, hash-verified

110 return num / den
111
112 def rect(self, t, f0):
113 n = np.rint((t) / self.dt)
114 return np.where(
115 n.any() < 0.0 or n.any() > self.N,
116 0,
117 np.exp(-1j * 2 * np.pi * f0 * t),
118 )
119
120 def hann(self, t, f0):
121 a = [0.5, 0.5]

Callers

nothing calls this directly

Calls 1

whereMethod · 0.80

Tested by

no test coverage detected