Log analyser question

Dear all,

I just have a quick question about how the pylinac los analyser module generates the fluence maps. I know the following from the documentation: “fluence calculation is done by adding fluence snapshot by snapshot, and leaf pair by leaf pair. Each leaf pair is analyzed separately. First, to optimize, it checks if the leaf is under the y-jaw. If so, the fluence is left at zero; if not, the leaf (or jaw) ends are determined and the MU fraction of that snapshot is added to the total fluence. All snapshots are iterated over for each leaf pair until the total fluence matrix is built”.

However, when I create the fluence maps from a VMAT plan (with typically around 800 MUs per treatment) I never get even a maximum of 1 MU in any point of the fluence map. I would expect some points to accumulate many MUs. Is pylinac doing some sort of nomalisation or I am misunderstanding the way it works? Many thanks.

Best wishes.

Are you analyzing dynalogs or trajectory logs? dynalogs will be normalized because the actual MU isn’t recorded, but will be for trajectory logs.

Trajectory logs from a Truebeam. I create the maps with pylinac and expert them to a txt file. I dont quite get what I am doing wrong.

You’re not doing anything wrong. The fluence wasn’t being converted to absolute dose for tlogs =/. I’ll fix this in the next release. In the meantime you can do one of two things. 1) you can add this line right here: fluence *= np.max(mu_matrix) in your installed pylinac package or 2) in your script don’t use .plot_map(), do this instead:

fluence = tlog.fluence.actual.calc_map()
fluence *= np.max(self._mu.actual)
plt.imshow(fluence)

Basically, you’re multiplying the MU by the current fluence, which is normalized.

Hi James,

thanks for your answer. What I have in my script is the following:

factual=log.fluence.actual.calc_map()
fexpected=log.fluence.expected.calc_map()
fgamma=log.fluence.gamma.calc_map()

numpy.array(factual.tolist())
numpy.savetxt(‘actualmap.txt’, factual)

numpy.array(fexpected.tolist())
numpy.savetxt(‘expectedmap.txt’, fexpected)

numpy.array(fgamma.tolist())
numpy.savetxt(‘calcmap.txt’, fgamma)

I do this so I can import the .txt files in another software to edit the expected, actual and gamma plots.
Like you said if I add this line fluence *= np.max(self._mu.actual) should it be ok?

factual=log.fluence.actual.calc_map()
factual *= numpy.max(self._mu.actual)
fexpected=log.fluence.expected.calc_map()
factual *= numpy.max(self._mu.expected)

and then the rest like above.

Another question. The gamma pass calculation and the average gamma should be still being calculated correctly by pylinac even without multiplying the MU by the fluence?.

Thanks
David