Pulse: Filter Response Figure

This commit is contained in:
Eric Teunis de Boone 2023-05-17 17:57:23 +02:00
parent 4e96342342
commit d1c89547b1

View file

@ -470,13 +470,13 @@ if __name__ == "__main__":
if True: # show interpolation template
fig, ax = plt.subplots()
ax.set_title("Deltapeak and Bandpassed Template")
ax.set_title("Filter Response")
ax.set_xlabel("Time [ns]")
ax.set_ylabel("Amplitude")
ax.plot(interp_template.t, max(interp_template.signal)*_deltapeak[0], label='Impulse Template')
ax.plot(interp_template.t, interp_template.signal, label='Filtered Template')
ax.plot(interp_template.t, max(interp_template.signal)*_deltapeak[0], label='Impulse')
ax.plot(interp_template.t, interp_template.signal, label='Filtered Signal')
ax.legend()
fig.savefig('figures/11_interpolation_deltapeak.pdf')
fig.savefig('figures/11_filter_response.pdf')
if True: # show filtering equivalence samplerates
_deltapeak = util.deltapeak(timelength=template_length, samplerate=1/antenna_dt, offset=0)
@ -492,7 +492,6 @@ if __name__ == "__main__":
if True:
plt.close(fig)
#
# Find time accuracies as a function of signal strength
#
@ -550,6 +549,11 @@ if __name__ == "__main__":
ax.set_xlabel("Time Residual [ns]")
ax.set_ylabel("#")
if True:
# indicate boxcar accuracy limits
for sign in [-1, 1]:
ax.axvline( sign*template_dt/np.sqrt(12), ls='--', alpha=0.5, color='green')
counts, bins, _patches = ax.hist(time_residuals, **hist_kwargs)
if True: # fit gaussian to histogram
min_x = min(time_residuals)