You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

\This page provides an overview of the status and inner workings of the TES Readout development and eventual implementation.

Description of TES

 

 

PseudoCode

TES Algorithm
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 Slope > MinimumSlope:
			CurrentWindowEvent=True
		Else:
			CurrentWindowEvent=False
	
		EventMatrix(channel, currentWindowIndex) = CurrentWindowEvent
	Return EventMatrix

Def ApplyFilter(Filter):
	For each i, sample :
		Temp = linearFunction(sample) * sample 
		Temp = temp* Filter(i) *Filter2(i) %More filters added if necessary
		Energy = sum(temp)
		%Details on operations required for this step
		% Can we pipeline the linear function with the multiply and add?

 

 

Benchmarks

This table lists the latest benchmarks.

Currently, it evaluates the average time (over 1e6 iterations) to complete the number of products indicated as well as the sum of the resulting vector. The length of the vector varies according to the number of samples.

The code currently uses a simple decision tree which directly indicates how many filters to use. In the future this tree will determine the case to use depending on which windows have a hit.

These benchmarks were obtained os psanagpu116, using O3 and vectored optimization.

Compile flags
g++ -std=c++11 -O3 -DNDEBUG -march=native -IEigen main.cpp

 

All values are in μs.

Number of products

Number of samples

12345
1000.0610.0740.0910.108 
2000.1130.1450.1760.210 
3000.1500.1900.2410.296 
4000.2000.2660.3290.397 
5000.2390.3210.4020.486 
6000.2790.3780.4760.576 
7000.3180.4350.5490.667 

 

 

Tasks

TaskStatusComment
Create fake data vectorsNOT STARTED 
Implement event detection algorithmNOT STARTED 
Program arguments for benchmarkingIN PROGRESSArguments for the size of the vectors and the number of array products used
Decision tree for event casesIN PROGRESSSwitch case tree for given number of filters - reusable for different cases
Input data from simulationNOT STARTED 
   
   
  • No labels