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 Case Event Before And After Energy Energy = ApplyFilter(Filter11) Case Event Before Only Energy Energy = ApplyFilter(Filter10) Case Event After Only Energy Energy = ApplyFilter(Filter00) SaveEnergyAndTimestamp(xtcFile) If WindowIncrement == SaveIncrement SaveIncrement SaveWaveformtoXTC(xtcFile, TotalTimeWindow, AllChannels) Def TagEvents: Parfor Parfor each channel : If Slope > MinimumSlope: CurrentWindowEvent=1 Else: CurrentWindowEvent=0 EventMatrix(channel, currentWindowIndex) = CurrentWindowEvent Return EventMatrix Def ApplyFilter(Filter): For each i, sample : Energy =+ linearFunction(sample) * sample * Filter(i) %Details on operations required for this step % Can we pipeline the linear function with the multiply and add? |
...
Overview
Content Tools