Trajectory log: snapshots by subbeam

Hi:

With get_snapshot_values, we can obtain the positions of each leaf for each snapshot in the trajectory log. However, when the fields/arcs are auto-sequenced, only one trajectory log is generated including all the fields/arcs. I am trying to obtain the snapshots corresponding to each subbeam in the log, but I can’t find an easy way.

Is there any function to do so?

Thanks and kind regards,

Marcelino Hermida

Hi Marcelino,
I’m more interested in what your ultimate goal is. E.g. there is a way to plot the fluence of each subbeam easily:

log.subbeams[0].fluence.actual.calc_map()
log.subbeams[0].fluence.actual.plot_map()

However, to do exactly what you’re asking you can do the following:

subbeam_0_snapshots = log.subbeams[0]._snapshots

Let me know how it turns out.

Hi:

I finally could find some time to retake this topic. What I trying to do is to obtain MLC metrics (RMS and percentiles) for the leafs of each subbeam in the log (I am working with auto-sequenced logs). To do so, for instante, to get the max RMS of bank A for the first subbeam, I first tried:

`
subbeams[0]._axis_data.mlc.get_RMS_max(bank=‘A’)

`

However, I realized that this is not the rigth way, as I am obtaining the same values for each subbeam, which is not obviusly correct.

So, is it possible to use the functions defined to get RMS and percentile values so you can specify what snapshots should be used to perform the calculation?

Thanks and regards,
Marcelino

Hi Marcelino:

The problem is that the subbeam instance pointed to the snapshot index of MLC instance of the file, Not the beam.

The RMS is calculated in the _RMS_array_all_leaves. The dirty fix is to write a function to calculate the RMS of your own with a parameter of snapshot_idx to calculate the RMS of corresponding beam.

Best regards,

Ruoxi