Request to use file name for missing Field ID and Field Name in TRF

Hi Simon

We have noticed that some of the TRF has missing Field ID and Field Name inside the file. They can be easily identified as “Z .trf”. This happens randomly to all TRF generated. PyMedPhys stops when it encounters this problem.

May I suggest an easy workaround that PyMedPhys takes the information from the file name (user can append Field ID and Field Name to TRF filename) instead of editing the binary codes which may cause the file to corrupt.

Thank you.

regards,
LipTeck

Hi @LipTeck_Chew,

Unfortunately I am currently on sick leave, … I have attempted to get on the computer and try and be of use within PyMedPhys during this time… but all code that comes out of me when I’m sick is pretty atrocious …

I appreciate the bug/reports/feature requests, but, whether I am sick or not, do recognise that you would likely also need to find someone with the man-hours to implement them. If you have someone within your team who would be willing to make these changes that you propose, I would be more than happy to help them, and point them in the right direction. :slightly_smiling_face:

Hi @LipTeck_Chew,

Today I had need to decode to some TRF files that had this issue that you’ve described here. And as such I have created a fix. Would you be able to download the following and let me know if it fixes your issue?

pip install pymedphys[user]==0.37.0dev1

Hi Simon

Yes! This version works with “Z .trf”

regards,
LipTeck

Glad to hear it :slight_smile:

Cheers,
Simon

Hi Simon,
This is a very good fix! Well done!!!
This makes the whole set of TRF for a plan delivered is useful.

regards,
LipTeck