-
Hello. I am trying to simulate the behavior of an x-ray source in an x-ray vault. To do so, I need to construct the x-ray source in EGSnrc. Is it possible for me to "package" the geometry / source definitions for such an object as a single object that I can easily reference, geometrically transform, change parameters for, etc. in a separate .egsinp file? Basically, I want to build a digital twin of the following device and use it when needed: https://xray.comet.tech/en/products/mxc-450-mf. CT scanners sometimes revolve the x-ray source around the target, hence why I'd like to be able to geometrically transform an object like this as a whole. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There's not an easy way to do this how you are imagining, unfortunately. This is particularly because the geometry and source are fundamentally separate - the source location isn't really tied to a particular geometry. You'll have to create transformations for both of them, using It's possible to define a geometry in an external file: https://nrc-cnrc.github.io/EGSnrc/doc/pirs898/group__Geometry.html#ga5bc12ceac1e65f64b3c7d3b62e4ce4ff One option could be to have a python script that inserts both the geometry and source, copying from your "x-ray source" input file into another input file. |
Beta Was this translation helpful? Give feedback.
There's not an easy way to do this how you are imagining, unfortunately. This is particularly because the geometry and source are fundamentally separate - the source location isn't really tied to a particular geometry. You'll have to create transformations for both of them, using
egs_transformedGeometry
andegs_transformedSource
, but at least the transformations will be the same.It's possible to define a geometry in an external file: https://nrc-cnrc.github.io/EGSnrc/doc/pirs898/group__Geometry.html#ga5bc12ceac1e65f64b3c7d3b62e4ce4ff
One option could be to have a python script that inserts both the geometry and source, copying from your "x-ray source" input file into another input file.