cherab.nagdis.inversion.create_raytransfer_boxΒΆ
-
cherab.nagdis.inversion.create_raytransfer_box(parent: _NodeBase, radius: float =
0.04, z_max: float =0.66, z_min: float =-0.5, dx: float =0.00125, dy: float | None =None, dz: float =0.02, step: float | None =None) RayTransferBoxSourceΒΆ Create a RayTransferBox object with the given parameters.
The z axis is aligned with the linear device magnetic axis.
Note
We need to avoid having the center of the voxel coincide with the origin. This is because when we set the gradient-based derivative matrices, the origin point will be singular.
- Parameters:
- parent: _NodeBaseΒΆ
Parent node of the RayTransferBox object.
- radius: float =
0.04ΒΆ Radius of the box, by default 40.0 mm.
- z_max: float =
0.66ΒΆ Maximum z-coordinate of the box, by default 0.66 m.
- z_min: float =
-0.5ΒΆ Minimum z-coordinate of the box, by default -0.5 m.
- dx: float =
0.00125ΒΆ Step size along the x-axis, by default 1.25 mm.
- dy: float | None =
NoneΒΆ Step size along the y-axis, by default None. If None, dy is set to dx.
- dz: float =
0.02ΒΆ Step size along the z-axis, by default 20 mm.
- step: float | None =
NoneΒΆ Step size for the ray-transfer calculation, by default None. If None, the step size is set to 10% of the minimum of dx, dy, and dz.
- Returns:
RayTransferBox β RayTransferBox object.
- Raises:
TypeError β If
parentis not a scene-graph object.ValueError β If
radius,z_max,z_min,dx,dy,dz, orstepare invalid.
Examples
>>> from raysect.optical import World >>> from cherab.nagdis.inversion.raytransfer import create_raytransfer_box >>> world = World() >>> box = create_raytransfer_box(world)