Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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