Pulse: Hilbert Envelope: available for SNR-TimeAccuracy plot

This commit is contained in:
Eric Teunis de Boone 2023-05-19 00:58:23 +02:00
parent 01237a7386
commit b833bfa580

View file

@ -562,7 +562,7 @@ if __name__ == "__main__":
for a, template_dt in tqdm(enumerate(template_dts)):
time_residuals_data.append(np.zeros( (len(snr_factors), 3, N_residuals)))# res, snr, masked
time_residuals_data.append(np.zeros( (len(snr_factors), 4, N_residuals)))# res, snr, masked, hilber_res
# Create the template
# This is sampled at a lower samplerate than the interpolation template
@ -584,7 +584,7 @@ if __name__ == "__main__":
mask = wrong_peak_condition(time_residuals)
# Save directly to large data array
time_residuals_data[a][k] = time_residuals, snrs, ~mask
time_residuals_data[a][k] = time_residuals, snrs, ~mask, hilbert_time_residuals
# Make a plot of the time residuals <<<
if True and N_residuals > 1:
@ -696,7 +696,7 @@ if __name__ == "__main__":
template_dt_colors = [None]*len(template_dts)
for a, template_dt in enumerate(template_dts):
for k, snr_sigma_factor in enumerate(snr_factors):
time_residuals, snrs, valid_mask = time_residuals_data[a][k]
time_residuals, snrs, valid_mask, hilbert_time_residuals = time_residuals_data[a][k]
valid_mask = np.array(valid_mask, dtype=bool)