[Gate-users] Gate-users Digest, Vol 171, Issue 11

David Boersma david.boersma at acmit.at
Mon Aug 17 18:16:23 CEST 2020


Hi Steven,


I'm glad we're booking some progress.


I have tried to reproduce the error messages that you report when adding "MeV" before the polynomial of the energy spread and running with Gate v8.2. When I run with the attached source file, it actually seems to run normally for me. The unit specification (MeV or percent) should be given in the content line immediately before the order of the energy spread polynomial. Since you write that you tried to insert in many places, I assume that you actually already tried to add it in the correct place. But I could reproduce your error message (complaining about line 16 in the source props file) if I misspell MeV, e.g. as MEV.

For percent, the code allows different spellings (PERCENT, percent or %) but for MeV it's very picky, it only recognizes "MeV", with exactly that capitalization. "MEV" is not accepted, nor is "mev". Could it be that you actually inserted one of those "wrong" spellings? If you think you did already write it correctly, could you check with 'diff' or send me your source props file that includes the MeV line?

I guess we can improve the parsing code by:

  *   ignoring upper/lower case completely
  *   recognize when the user tries to specify the name of a unit (not a number) in that particular line, and throw an informative error with a list of which names would be recognized and accepted.


Thanks for reporting!

/David


PS: BTW, if you use a Windows mail client (I do, unfortunately) then the attached text file will probably be saved with DOS style line endings. In Linux you can detect this with the "file" command, like "file sourceprops.txt" and if it says "ASCII text, with CRLF line terminators" then you know that it was jinxed by Microsoft. It can be unjinxed with "dos2unix sourceprops.txt". I think every major Linux distribution has the "dos2unix" utility in their package repository.

________________________________
Von: COURT, Steven (UNIVERSITY COLLEGE LONDON HOSPITALS NHS FOUNDATION TRUST) <steven.court at nhs.net>
Gesendet: Montag, 17. August 2020 16:53:57
An: gate-users at lists.opengatecollaboration.org
Cc: David Boersma
Betreff: Re: Gate-users Digest, Vol 171, Issue 11

That's great, thank you David.

It was indeed an issue with the "MeV" declaration in the source description file, which I had omitted. Adding it in my simulation now looks fine. I have attached the files you requested without the fix (though there is no error message raised, it just continues parsing incorrectly).

I then tried to use that corrected source description file in my v8.2 simulation, and no matter where I placed the "MeV" line I was getting an error stating that it was expecting an integer: "wrong number of values (0) on line 16 of data/SourceDescFile_Field1.txt, expected 1 value(s) of type i". Looking at the source code for the 8.2 release I'm not sure why that is the case, I believe it should be fine. I can now run on both versions, so thanks again!

Regards,
Steve


________________________________________
From: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> on behalf of gate-users-request at lists.opengatecollaboration.org <gate-users-request at lists.opengatecollaboration.org>
Sent: 17 August 2020 11:00
To: gate-users at lists.opengatecollaboration.org
Subject: Gate-users Digest, Vol 171, Issue 11

Send Gate-users mailing list submissions to
        gate-users at lists.opengatecollaboration.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
or, via email, send a message with subject or body 'help' to
        gate-users-request at lists.opengatecollaboration.org

You can reach the person managing the list at
        gate-users-owner at lists.opengatecollaboration.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gate-users digest..."


Today's Topics:

   1. Re: Version 8.1 and 8.2 differences, PBT (David Boersma)


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

Message: 1
Date: Mon, 17 Aug 2020 09:44:45 +0000
From: David Boersma <david.boersma at acmit.at>
To: "gate-users at lists.opengatecollaboration.org"
        <gate-users at lists.opengatecollaboration.org>
Subject: Re: [Gate-users] Version 8.1 and 8.2 differences, PBT
Message-ID: <fe0592ae2bb04e2fbd32b10f05d35eb4 at acmit.at>
Content-Type: text/plain; charset="iso-8859-1"

Hi Steve,


Sorry for the long wait. You can use "git" to check differences between different releases. On the command line, for instance, you could list all tags (releases):


git tag -l


And then you could run:


git diff v8.1.p01 v8.2 -- ./source/physics/src/GateSourceTPSPencilBeam.cc


(I hope that this command line does not get mangled in your email client...)


This shows the differences in the GateSourceTPSPencilBeam.cc source file between the releases 8.1.p01 and 8.2. You can also look at the diffs in github, for instance:

  *   go to https://github.com/OpenGATE/Gate
  *   click on "tags"
  *   select the newest release tag for which you would like to do the comparison (8.2)
  *   click "compare" and select the older release tag (8.1.p01)
  *   you may have to wait a little bit while the server generates the diffs
  *   select the "files changed" tab
  *   find the file you're interested in and click "load diff"

This should result in something like this:

https://github.com/OpenGATE/Gate/compare/v8.1.p01...v8.2#diff-8f950e0d41b247abb5f0a77d4f0b2832L324


<https://github.com/OpenGATE/Gate/compare/v8.1.p01...v8.2#diff-8f950e0d41b247abb5f0a77d4f0b2832L324>As you can see in the diff, nothing changed in the parsing of the optical part of the source properties file, but there were changes in the parsing of the energy spread (MEV versus PCT). The 8.1 code has the number of  lines to skip hardcoded, while in later releases it just skips whatever number of non-content lines (empty or comments) you have inserted. If some of the previously skipped lines could be construed as a "content line" (not empty, no comment) then it's possible that all lines after that will be misinterpreted, including the divergence polynomials. Maybe that's what happened with your source properties file.


We have made an effort to detect such mishaps in the parsing so that you'll get a crash with an informative error message in such cases. But I've noticed that this error detection is not yet fool proof: it is still possible to give it incorrect source properties input which is then read silently, with bogus results.


In short: could you please send us your source properties file (and maybe also the main macro and the plan file) so that we can see where the parsing goes wrong?


HTH,

David Boersma

________________________________
Von: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> im Auftrag von COURT, Steven (UNIVERSITY COLLEGE LONDON HOSPITALS NHS FOUNDATION TRUST) <steven.court at nhs.net>
Gesendet: Donnerstag, 6. August 2020 16:25:39
An: gate-users at lists.opengatecollaboration.org
Betreff: [Gate-users] Version 8.1 and 8.2 differences, PBT


Hi all,


I've been simulating some proton treatments in virtual Gate 8.2 and all looks good, but when I run the same simulation in 8.1 (to be in line with Gate-RTIon) the beam has a ridiculous divergence. I suspect some change to the source description file, perhaps between rads / mrads, or in the ordering of the polynomials, I'm not sure yet.


Can anyone tell me what's up, or point me to a document where I can see all changes made between versions 8.1 and 8.2?


Thanks a lot,

Steve


********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in relation to its contents. To do so is strictly prohibited and may be unlawful. Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.

For more information and to find out how you can switch, https://portal.nhs.net/help/joiningnhsmail

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200817/d74033d3/attachment-0001.html>

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

Subject: Digest Footer

_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

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

End of Gate-users Digest, Vol 171, Issue 11
*******************************************


********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in relation to its contents. To do so is strictly prohibited and may be unlawful. Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.

For more information and to find out how you can switch, https://portal.nhs.net/help/joiningnhsmail

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200817/19107ad9/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SourceDescFile_Field1_MeV.txt
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200817/19107ad9/attachment.txt>


More information about the Gate-users mailing list