mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
Pulse timing: trace_resamplers paramater change
This commit is contained in:
parent
bca924cdc2
commit
354ec93a79
1 changed files with 12 additions and 11 deletions
|
@ -106,7 +106,7 @@ def my_correlation(in1, template, lags=None):
|
|||
|
||||
return corrs, (in1, template, lags)
|
||||
|
||||
def trace_upsampler(template_signal, trace, template_t, trace_t):
|
||||
def trace_upsampler(trace, template_t, trace_t):
|
||||
template_dt = template.t[1] - template.t[0]
|
||||
trace_dt = trace_t[1] - trace_t[0]
|
||||
|
||||
|
@ -125,7 +125,7 @@ def trace_upsampler(template_signal, trace, template_t, trace_t):
|
|||
|
||||
return upsampled_trace, upsampled_t
|
||||
|
||||
def template_downsampler(template_signal, trace, template_t, trace_t, offset):
|
||||
def trace_downsampler(trace, template_t, trace_t, offset):
|
||||
pass
|
||||
|
||||
|
||||
|
@ -138,7 +138,7 @@ if __name__ == "__main__":
|
|||
|
||||
bp_freq = (30e-3, 80e-3) # GHz
|
||||
template_dt = 5e-2 # ns
|
||||
template_length = 100 # ns
|
||||
template_length = 500 # ns
|
||||
noise_sigma_factor = 1e0 # keep between 10 and 0.1
|
||||
|
||||
N_residuals = 50*3 if len(sys.argv) < 2 else int(sys.argv[1])
|
||||
|
@ -236,7 +236,7 @@ if __name__ == "__main__":
|
|||
|
||||
axs2 = None
|
||||
if True: # upsampled trace
|
||||
upsampled_trace, upsampled_t = trace_upsampler(template.signal, antenna.signal, template.t, antenna.t)
|
||||
upsampled_trace, upsampled_t = trace_upsampler(antenna.signal, template.t, antenna.t)
|
||||
|
||||
if do_plots: # Show upsampled traces
|
||||
fig2, axs2 = plt.subplots(1, sharex=True)
|
||||
|
@ -337,6 +337,7 @@ if __name__ == "__main__":
|
|||
plt.close(fig)
|
||||
|
||||
# Make a plot of the time residuals
|
||||
if len(time_residuals) > 1:
|
||||
fig, ax = plt.subplots()
|
||||
ax.set_title("Template Correlation Lag finding")
|
||||
ax.set_xlabel("Time Residual [ns]")
|
||||
|
|
Loading…
Reference in a new issue