Page History
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
CreateCircularBuffers (NumberOfChannels, SamplesPerWindow, TotalNumberOfWindows) LoadFilters() ConfigureDataChannel() While IncomingData: LoadDatainBuffers() ApplyCrosstalkCorrection(All_Channels,CurrentWindow) EventMatrix = TagEvents(All_Channels) For each ActiveWindow : WindowIncrement=+1 Parfor each Channel: Switch (CheckEvents(EventMatrix)): Case No Event Before And After Energy = ApplyFilter(Filter00) Case Event Before And After Energy = ApplyFilter(Filter11) Case Event Before Only Energy = ApplyFilter(Filter10) Case Event After Only Energy = ApplyFilter(Filter00) SaveEnergyAndTimestamp(xtcFile) If WindowIncrement == SaveIncrement SaveWaveformtoXTC(xtcFile, TotalTimeWindow, AllChannels) Def TagEvents: Parfor each channel : If If Slope > MinimumSlope: CurrentWindowEvent=1 Else: CurrentWindowEvent=0 EventMatrix(channel, CurrentWindowEvent=True Else: CurrentWindowEvent=False EventMatrix(channel, currentWindowIndex) = CurrentWindowEvent Return EventMatrix Return EventMatrix Def ApplyFilter(Filter): For For each i, sample : Temp = linearFunction(sample) * sample Temp = temp* Filter(i) *Filter2(i) %More filters added Energy =+ linearFunction(sample) * sample * Filter(i) if necessary Energy = sum(temp) %Details on operations required for this step % Can we pipeline the linear function with the multiply and add? |
Benchmarks
...
Overview
Content Tools