-
Notifications
You must be signed in to change notification settings - Fork 6
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
Trying to understand how to get kernel for matrad #7
Comments
I have not fully familiar with this code, since it was written by @markbangert and @mingersming, but here's my guesswork at the first part of the code: photonPencilBeamKernelCalc/ppbkc.m Lines 42 to 51 in c2296dd
Note that in the paper it say that the determination of the beta values is not critical. The fmincon performs a fit, and I think these fits are somewhat heuristic to get to similar magnitudes in the paper, but I could be wrong. photonPencilBeamKernelCalc/ppbkc.m Lines 53 to 56 in c2296dd
The weights are obtained not directly by a least squares fit, but by building a linear system. A matrix of all pairwise multiplications of D_i is built (mx1) together with a matrix containing the products of D_i with the measured TPRs. Solving this with Matlab’s backslash operator fits a set of weights for each TPR so it is closely reproduced by multiplication with the weights. |
The equation you showed, which is Eq. 18 in the paper, is handled later directly together with the kernel part from Eq. 19. https://github.com/e0404/photonPencilBeamKernelCalc/blob/master/ppbkc.m#L105-116 Regarding the determination of the beta, it is really purely heuristic. The maxPos_fun describes the maximum position of a depth dose component. The betas are chosen to create depth dose components with (1) a maximum close to the one averaged of all TPR measurments, (3) a deep maximum at 1/mu, and (2) a maximum in-between. |
Thanks for reply. So what are the physical considerations and aspects of choosing to create depth dose components with (1) a maximum close to the one averaged of all TPR measurments, (3) a deep maximum at 1/mu, and (2) a maximum in-between? |
For the exact values, there is none afaik. These values are chosen to "mimic" what isolation of primary and small/large field scatter would give according to the paper. Sorry that I can't give a more satisfying answer here. But note that the decomposition does not need a physical motivation, you could also choose a purely mathematical one, or, as in our case, a heuristic. If you want to choose different values, do it. |
Hi Mark,
I am new to TPS calculation algorithms. I have trouble in reading your code in ppbkc.m as to generate kernel.
I don't quite understand this algorithm. I can't find any detailed formulas in Bortfeld et al.(1993) article. Can you help me get through this that I can understand the whole algorithm better. If I learn more, I have more capabilities to join the open source team for TPS algorithms. Thanks.
Tonio
The text was updated successfully, but these errors were encountered: