mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-12 17:43:33 +01:00
ZH: pre and append tracelengths
This commit is contained in:
parent
2c1fb0976b
commit
ff5b897042
1 changed files with 6 additions and 4 deletions
|
@ -306,16 +306,18 @@ if __name__ == "__main__":
|
|||
if False: # modify trace lengths
|
||||
N_samples = len(antenna.t)
|
||||
new_N = 2*N_samples
|
||||
new_N = 10000 # ns = 10us
|
||||
pre_N = 2000 # ns = 2us
|
||||
|
||||
dt = antenna.t[1] - antenna.t[0]
|
||||
new_t = np.arange(0, new_N)*dt + antenna.t[0]
|
||||
new_t = np.arange(-pre_N, new_N - pre_N)*dt + antenna.t[0]
|
||||
|
||||
antenna.t = new_t
|
||||
|
||||
# TODO:trace extrapolation?
|
||||
antenna.Ex = np.pad(antenna.Ex, (0, new_N-N_samples), mode='constant', constant_values=0)
|
||||
antenna.Ey = np.pad(antenna.Ey, (0, new_N-N_samples), mode='constant', constant_values=0)
|
||||
antenna.Ez = np.pad(antenna.Ez, (0, new_N-N_samples), mode='constant', constant_values=0)
|
||||
antenna.Ex = np.pad(antenna.Ex, (pre_N, new_N-N_samples-pre_N), mode='constant', constant_values=0)
|
||||
antenna.Ey = np.pad(antenna.Ey, (pre_N, new_N-N_samples-pre_N), mode='constant', constant_values=0)
|
||||
antenna.Ez = np.pad(antenna.Ez, (pre_N, new_N-N_samples-pre_N), mode='constant', constant_values=0)
|
||||
|
||||
t0 = 0
|
||||
c_light = 3e8*1e-9 # m/ns
|
||||
|
|
Loading…
Reference in a new issue