ToFuProject / tofu

Project for an open-source python library for synthetic diagnostics and tomography for Fusion devices
https://tofuproject.github.io/tofu/index.html
MIT License
72 stars 11 forks source link

Take into account non-parallel crystal mesh for Crystal class #494

Closed Didou09 closed 2 years ago

Didou09 commented 3 years ago

Objective:

Necessary steps:

Didou09 commented 3 years ago

@adriendaros , the commands you're looking for are:

In [44]: det = dict(np.load('inputs_temp/det37_CTVD_incC4_New.npz', allow_pickle=True))

In [45]: cryst = tf.load('inputs_temp/TFG_CrystalBragg_ExpWEST_DgXICS_ArXVII_sh00000_Vers1.4.9-315-gc93fa7a3.npz')
Loaded from:
    /home/didier/Documents/Projects/tofu/inputs_temp/TFG_CrystalBragg_ExpWEST_DgXICS_ArXVII_sh00000_Vers1.4.9-315-gc93fa7a3.npz

In [46]: pts0, vect = cryst.get_rays_from_cryst(phi=np.pi, returnas='(pts, vect)')

In [47]: pts = pts0 + np.r_[1, 3,5, 7][None, :]*vect[:, :, 0]

In [48]: cryst.plot(pts=pts, det=det)

image