-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting accolinearity with back to back source #381
Comments
Hi, thank a lot! We will study and probably contact you in the future to resolve this issue. |
Greetings, The following is a kind of MWE to observe the issue. At the end, you will obtain an image that should be simular to All the file needed are inside the following: mwe.tar.gz To generate the data, you need to modify the Gate code. See modifToCode.txt. Note that this test was made with Gate v8.0. Do not forget to compile Gate after the modification. Then, launch the simulations of F18 positron (acoF18.mac) and BTB source (acoBTB.mac). From there, you should only need to launch |
Doc has been updated. Accolinearity does not work in the current version |
Mirjam is on it ;) |
@MaxTousss If I redo the same as you in GateBacktoBack, ie compute angle between particle1 and particle, I find the right distribution. I think the problem in your python code, is that you do not divide |v1||v2| by the product of the norm of v1 and v2 before taking the arcosinus. I used
|
@wrzof Yup, it seems I made some false assumptions. For Positron sources, the vectors "Direction" and "DirectionPhoton" are both normalized to 1.0. Thus, my code, which assumed that the variables were normalized, gave the wrong conclusion and acolinearity seems to work with BTB sources! However, is it possible that the difference in vector norm between the two type of sources might cause other problems? |
Good catch, thanks a lot @wrzof ! I still keep that issue open for the meeting dedicated to PET e+ range (21/10/2021) for reference, but I will probably close the issue then. |
@dsarrut The macro + python code are already in the mwe.tar.gz file. Is there something missing or you simply want me to update the python code with wrzof correction? For the documentation, you want me to add a warning about the back-to-back acolinearity norm behavior? If yes, I will do it sometime this week. |
@dsarrut I am attaching updated files (for code modification and a python evaluation script), the GATE macros are still the ones from Maxime. The file for code modification (modifToCode.cc) includes the missing normalisation of I double-checked the angle calculations from momentum vectors by making use of the Some aspects we could add to the documentation:
@MaxTousss
In the back-to-back source, the direction vector is parsed as the full momentum vector of a
|
Hi, should be ok now: see this example: https://github.com/OpenGATE/GateBenchmarks/tree/master/t19_acollinearity |
Currently, the example use the command "/gate/source/setDebugPositronAnnihilationFlag True" which seems to not be available in Gate9.2*. As such, it can't be tested with the currently available stable versions of Gate. However, I have no objection to claim the issue closed since the benchmark exist.
|
right, the debug flag has been added after, it will be in 9.2.1 ;) |
Greetings,
If one looks into the mailing list or in the Gate code, one can find that there is an option to simulate accolinearity from back to back source. The commands to use are as follow:
/gate/source/NAME/setAccolinearityFlag true
/gate/source/NAME/setAccoValue 0.5 deg
In short, is this feature validated and still supported?
In the following, I detail what I found from my search on that feature.
This feature is not mentioned in the current openGate wiki (or at least, it was not found with the wiki search tool). I did a quick "cntrl+f" search of "setAccolinearityFlag" for the userguides available from v6.0 to the last available and I did not found a single mention of that keyword. However, if we look at the mailing list, we can find the following:
A possible bug was found in 2011 for which the resulting thread does not provide a clear conclusion about if the bug was corrected or if it was a real bug [1].
Around two years later, the feature was proposed to a user [4].
This feature seems to be still used currently [2], [3]. In [3], the user asked for some tips on the feature which were not answered.
From Gate v5.0 to v6.0, a bug was found and corrected [5], [6], [7].
I did try to look into the available release note of Gate and the Gate github but I did not find a mention about that feature.
Currently, the option to test Gate with accolinearity validation does not work out-of-the-box with that feature. When I tried to activate the accollinearity error graph creation, the resulting graph indicated pure back-to-back events. I have built some tests by hand[*] and it showed that a Gaussian angular error was indeed simulated which is good. However, when I compared the accolinearity error resulting from that feature to when using a positron source[**], the profile were clearly different. The latter being Gaussian-like, as expected. It would seems that something unexpected happens when the angular error is applied to the gamma pairs momentum with that feature. While I did try to make sense of the code in the method "GenerateVertex" of GateBacktoBack.cc, I must admit I fail to comprehend all the steps it does.
Thus, it seems that this feature might have some problems or that it is not completely supported. If it is indeed the case, I will propose a modification to the wiki such that it mention the existence of that feature but warns the users that it might not work as intended. If it should work, I will try to make a MWE of my tests and ask for validation.
Best,
Maxime Toussaint
[*] Outputting the "dev" variable from the file GateBacktoBack.cc
[**] Outputting the momentum from the file GateBacktoBack.cc and GatePositronAnnihilation.cc, and extracting the photon pairs accolinearity.
The text was updated successfully, but these errors were encountered: