status of elekta log file decoding

160 views
Skip to first unread message

Garrett Baltz

unread,
Mar 10, 2020, 12:41:38 PM3/10/20
to PyMedPhys
Hi,
I am looking into starting a log file analysis program as part of imrt qa for our Unity. Is log-file decoding part of the PyMedPhys current release? Additionally do you know if it would work for Unity log files? Perhaps I would be able to utilize the current MuDensity module as well?

Thanks,
Garrett

Simon Biggs

unread,
Mar 10, 2020, 7:46:55 PM3/10/20
to PyMedPhys
Hi Garrett,

I was given a set of TRF log files from an Elekta Unity, and for that set I was able to make it decode and be readable. So, with the latest version of PyMedPhys you will be able to run `pymedphys trf to-csv *.trf` in a directory that contains Unity log files and they should decode.

I have been in need of someone with a Unity to verify that these decoded results are representative of reality. So, that's where it is up to. Ideally, what I need, is actually a reference set of DICOM plans and corresponding trf logfiles (really just one for each plan type) so that I can upload them to the PyMedPhys Zenodo (https://zenodo.org/communities/pymedphys/search?page=1&size=20). Then I can use that test data to then automatically verify for each PyMedPhys release that it can appropriately decode those Elekta Unity log files with a delivery that is equivalent to the DICOM plan file provided.

Once the TRF files have been verified to have been decoding appropriately then you can use the following workflow to read and compare files:

-----------------------------

import pymedphys

trf_file_path = 'path/to/trf/file'
dicom_plan_path = 'path/to/dicom/plan'

logfile_delivery = pymedphys.Delivery.from_logfile(trf_file_path)  
dicom_delivery = pymedphys.Delivery.from_dicom(dicom_plan_path)

logfile_mudensity = logfile_delivery.mudensity()
dicom_mudensity = dicom_delivery.mudensity()

GRID = pymedphys.mudensity.grid()
COORDS = (GRID["jaw"], GRID["mlc"])

GAMMA_OPTIONS = {
    'dose_percent_threshold': 2,  # Not actually comparing dose though
    'distance_mm_threshold': 0.5,
    'local_gamma': True,
    'quiet': True,
    'max_gamma': 2,
}

def to_tuple(array):
    return tuple(map(tuple, array))

gamma = pymedphys.gamma(
    COORDS,
    to_tuple(mudensity_tel),
    COORDS,
    to_tuple(mudensity_icom),
    **GAMMA_OPTIONS
)

--------------------------

For a more full example of using the Delivery object see http://simonbiggs.net/icom.

As an extra note, you are not limited to DICOM plan files or TRF log files. You can also, if you wish, set up an iCOM listener which will create iCOM logs live. These can then be also directly compared to Monaco's plan file format directly. For more on that see also that above link (http://simonbiggs.net/icom).

Let me know if you have any issues. Also happy to have a chat at some point if you think that'd help.

Cheers,
Simon

Garrett Baltz

unread,
Mar 11, 2020, 11:35:41 AM3/11/20
to PyMedPhys
Hi Simon,

Thanks a lot for the info, this looks promising and worth pursuing further. Once I get my hands on a log file, I can try to decode it and see if it looks representative. 

Right now we are only using step and shoot IMRT for treatments. I might be able to get you a corresponding RT Plan and log file, no promises though haha.

Thanks again,
Garrett

Simon Biggs

unread,
Mar 11, 2020, 9:09:15 PM3/11/20
to Garrett Baltz, PyMedPhys

Hi Garrett,

 

My pleasure. Keep me posted on how you go.

 

Cheers,

Simon

 

 

PS: Apologies for the double post you may be seeing Garrett, it appears my m...@simonbiggs.net email address is being blocked by the mailing list. I’ll need to figure that out.

--
You received this message because you are subscribed to the Google Groups "PyMedPhys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymedphys+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pymedphys/0e439e3b-a39f-4bb3-a209-8e82bb7f0c24%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages