Update subtraction_arbitrary_pred authored by Kentaro Mogushi's avatar Kentaro Mogushi
\[\[ \TOC \]\]
# Sanity check of subtraction with an arbitrary predicted waveform. # Sanity check of subtraction with an arbitrary predicted waveform.
Because the subtraction is made by dividing the segments and find the amplitude and phase by the least square method,I am concern with what if I use an arbitrary predicted waveform. Do I get no subtraction as wished because the glitch waveform differs from the true glitch waveform? Because the subtraction is made by dividing the segments and find the amplitude and phase by the least square method,I am concern with what if I use an arbitrary predicted waveform. Do I get no subtraction as wished because the glitch waveform differs from the true glitch waveform?
# test waveform 0 ## test waveform 0
``` ```
t = np.linspace(0, 8, pred_test_ts.shape[-1]) t = np.linspace(0, 8, pred_test_ts.shape[-1])
...@@ -19,7 +21,7 @@ plt.close() ...@@ -19,7 +21,7 @@ plt.close()
![Screen_Shot_2021-03-16_at_6.57.16_PM](uploads/8992e1233454c7f6b69a4b569b470196/Screen_Shot_2021-03-16_at_6.57.16_PM.png) ![Screen_Shot_2021-03-16_at_6.57.16_PM](uploads/8992e1233454c7f6b69a4b569b470196/Screen_Shot_2021-03-16_at_6.57.16_PM.png)
# test waveform 1 ## test waveform 1
``` ```
t = np.linspace(0, 8, pred_test_ts.shape[-1]) t = np.linspace(0, 8, pred_test_ts.shape[-1])
...@@ -37,7 +39,6 @@ plt.close() ...@@ -37,7 +39,6 @@ plt.close()
# test waveform 2 (30 Hz) # test waveform 2 (30 Hz)
``` ```
#------------
t = np.linspace(0, 8, pred_test_ts.shape[-1]) t = np.linspace(0, 8, pred_test_ts.shape[-1])
a = np.sin(2*np.pi*30 *t) a = np.sin(2*np.pi*30 *t)
pred_test_ts[test_index] = a pred_test_ts[test_index] = a
...@@ -52,12 +53,12 @@ plt.close() ...@@ -52,12 +53,12 @@ plt.close()
![Screen_Shot_2021-03-16_at_7.03.00_PM](uploads/b8fa2f2898b95a5934eb9e9cb6ed33af/Screen_Shot_2021-03-16_at_7.03.00_PM.png) ![Screen_Shot_2021-03-16_at_7.03.00_PM](uploads/b8fa2f2898b95a5934eb9e9cb6ed33af/Screen_Shot_2021-03-16_at_7.03.00_PM.png)
# test waveform with 60 Hz ## test waveform with 60 Hz
- no subtraction - no subtraction
![Screen_Shot_2021-03-16_at_7.05.30_PM](uploads/83db15b2adbe93096f0b986b3226a9b4/Screen_Shot_2021-03-16_at_7.05.30_PM.png) ![Screen_Shot_2021-03-16_at_7.05.30_PM](uploads/83db15b2adbe93096f0b986b3226a9b4/Screen_Shot_2021-03-16_at_7.05.30_PM.png)
# test waveform with 100 Hz ## test waveform with 100 Hz
- no subtraction - no subtraction
... ...
......