33 lines
749 B
Python
33 lines
749 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
Created on Tue Aug 25 09:39:03 2026
|
|
|
|
@author: jamesszalkie
|
|
"""
|
|
|
|
import pycatima as catima
|
|
|
|
water = catima.get_material(catima.material.Water)
|
|
water.thickness(1.0)
|
|
p = catima.Projectile(1,1)
|
|
p.T(1000) # set projectile energy to 1000MeV/u
|
|
|
|
res = catima.calculate(p,water) # now res contains results
|
|
d = res.get_dict() # get results as dictionary
|
|
|
|
p = catima.Projectile(12,6)
|
|
water = catima.get_material(catima.material.Water)
|
|
water.thickness(10.0)
|
|
graphite = catima.get_material(6)
|
|
graphite.thickness(1.0)
|
|
graphite.density(2.0)
|
|
|
|
mat = catima.Layers()
|
|
mat.add(water)
|
|
mat.add(graphite)
|
|
|
|
# now calculate results for projectile at 1000MeV/u
|
|
res = catima.calculate_layers(p(1000),mat)
|
|
|
|
print(res.sigma_E) |