OpenGATE / opengate

Gate 10 (beta)
http://www.opengatecollaboration.org
GNU Lesser General Public License v3.0
42 stars 38 forks source link

Source with angles as histo #359

Closed dsarrut closed 5 months ago

dsarrut commented 6 months ago

Add an option to get angles from histogram for a source.

Warning : no test yet, no documentation yet.

https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/GettingStarted/generalParticleSource.html

 source.direction.type = "histogram"
 source.direction.histogram_theta_weight = [0, 0.2, 0.6, 0.3, 0.05]
 source.direction.histogram_theta_angle = [
        20 * deg,
        45 * deg,
        90 * deg,
        110 * deg,
        120 * deg,
    ]
source.direction.histogram_phi_weight = [0, 1]
source.direction.histogram_phi_angle = [0 * deg, 360 * deg]
dsarrut commented 5 months ago

See #369