Closed kloppstock closed 4 years ago
Since no further feedback was given, I assume that the main
branch outputs the desired result. If there are any unexpected outputs from this code, feel free to create a new issue for these problems.
Cheers, Jonas
I managed to identify and fix the bug mentioned in issue #34. I uploaded the current code to the reference branch in the reference directory. There seemed to be two problems in the singlePhotonDetector.h file:
for some reason it crashed when allocating the variable
double var[ny][nx]
on the stack. The current workaround is to allocate this matrix on the heap like this (lines 336-338):and free this at the end (lines 460 - 462) like this:
The loops beginning in line 362 iterated over the full detector. In addition to this some inner loops iterate from
-(clusterSizeY / 2)
to(clusterSizeY / 2) + 1
and are added onto the main index resulting into indices which are outside of the frame by(clusterSizeY / 2)
. This was fixed by taking these cluster sizes into account in the outer loops like this (lines 362, 363):Additionally, it seems that no frame numbers were stored which was fixed by changing lines 555 to 560 to:
To adapt the program to take pedestal input, we also modified moench03ClusterFinder.cpp (see all parts annotated with
//NOTE: modified
).Now the program compiles and runs. But generates a very large cluster file with your ordered data set. It was executed like this:
./moenchClusterFinderReordered ../../../ordered outdir e17050_1_00018_00000_image 1 2 ../../../../moench_data/1000_frames_pede_e17050_1_00018_00000.dat
Could you verify that this program still works as intended and if it doesn't give some hints on what went wrong?
Cheers, Jonas