DIDSR / MCGPU

GPU-accelerated Monte Carlo x-ray transport code to simulate medical x-ray imaging devices.
55 stars 20 forks source link

Generate material #3

Open jinglu00 opened 1 year ago

jinglu00 commented 1 year ago

Hi, Is any one know how to use _MC-GPU_create_materialdata.f to generate new material file? I got some compile errors of: undefined reference to 'ritai0', undefined reference to 'simpsu', undefined reference to 'peinit_'... and I noticed that this source code is based on PENELOPE's "tables.f". If you know any dependency file that helps to run _MC-GPU_create_materialdata.f , I will be very grateful for your sharing.

z0gSh1u commented 1 year ago

It requires PENELOPE 2006 to compile.

jinglu00 commented 1 year ago

It requires PENELOPE 2006 to compile.

Thank you, so do you have the Fortran version of PENELOPE? I have only found pyPenelopy and already generated '. mat' files, which is the input file of _MC-GPU_create_materialdata.f. However, it still requires other files like 'tables.f'. If you have the complete Fortran version PENELOPE code, that will be no problem.

z0gSh1u commented 1 year ago

Older version of pyPENELOPE integrates older PENELOPE from 2008 to 2011 as compiled binaries. However, no 2006. And the .mat file format generated by 2008 is not compatible with 2006 (see https://code.google.com/archive/p/mcgpu/issues/7), so _MC-GPU_create_materialdata.f won't work. It might be possible to request for PENELOPE 2006 by contacting OECD-NEA.

jinglu00 commented 1 year ago

Older version of pyPENELOPE integrates older PENELOPE from 2008 to 2011 as compiled binaries. However, no 2006. And the .mat file format generated by 2008 is not compatible with 2006 (see https://code.google.com/archive/p/mcgpu/issues/7), so _MC-GPU_create_materialdata.f won't work. It might be possible to request for PENELOPE 2006 by contacting OECD-NEA.

Thank you so much for your information!

andreubs commented 1 year ago

Hi,

The MC-GPU_create_material_data.f file has to be compiled with the Fortran code from PENELOPE 2006. But that is only the first step, then you need the large PENELOPE 2006 cross section database to generate a PENELOPE material file to be used as input. Unfortunately, this old version of PENELOPE is not available anymore.

I have distributed some material files for MCGPU, as mentioned in a previous Issue: https://github.com/DIDSR/MCGPU/issues/2

What material do you need?

jinglu00 commented 1 year ago

Hi,

The MC-GPU_create_material_data.f file has to be compiled with the Fortran code from PENELOPE 2006. But that is only the first step, then you need the large PENELOPE 2006 cross section database to generate a PENELOPE material file to be used as input. Unfortunately, this old version of PENELOPE is not available anymore.

I have distributed some material files for MCGPU, as mentioned in a previous Issue: #2

What material do you need?

Thank you so much! I was trying to generate the material data for CT detector, unfortunately it didn't work. The VICTRE_MCGPU needs to input the mean free path of the detector, however, the value I calculated according to the physical formula and the data of Penelope2011 is different from the given value (e.g Se detector). So please help me with the following materials: Gd2O2S (density 7.32 g/cm3) TiO2 (density 4 g/cm3) Best regards.

andreubs commented 1 year ago

If you only need an estimation of the mean free path at the average beam energy, PENELOPE's "tables.f" program can provide that (the result should be very similar for any version of PENELOPE).

Another useful resource is the NIST Standard Reference Database 126, available online at: https://www.nist.gov/pml/x-ray-mass-attenuation-coefficients Table 4 in that link contains the energy spectrum for Gadolinium Oxysulfide.

Note that MCGPU defines a flat-panel detector and not a regular CT curved detector. And it expects a direct detector without optical spread. It also uses a single attenuation value for all x-rays regardless of energy inside the detector layer. These simplification limit the accuracy of the detector model. Therefore some uncertainty in the detector attenuation might be within the other range of errors, particularly if almost all photons are absorbed in these dense scintillators.