Last active
February 19, 2019 07:41
-
-
Save CharlesLedger/7bb4c96caaff350405300c1ce29efed1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lascar import * | |
container = NpyContainer('test_leakages','test_values') # load data | |
class Synchronization: | |
def __init__(self, lref): | |
self.ref_peak_offset = ref.argmax() | |
def __call__(self, leakage): | |
#We need to find the peak in each leakage,and roll it to match the ref_peak | |
peak_offset = leakage.argmax() | |
return np.roll(leakage, self.ref_peak_offset-peak_offset ) | |
container.leakage_processing = Synchronisation(ref=container[0].leakage) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment