RayDrapeAnchor

class PlasmaCalcs.tools.sci_tools.ray_draping.RayDrapeAnchor(*, Asph_theta=0, Asph_phi=0, Abox_x=None, Abox_y=None)

Bases: object

representation of Anchor point for ray draping problem.

For many helpful quantities, consider using self.Asph.
(see help(type(self).Asph) for details.)
Currently assumes Asph_r=R0, Abox_z=0.
Asph_theta: scalar, default 0
Asph_θ, i.e. anchor polar angle θ in sph system, in radians.
This is the angle from +z to Asph, in the sph system.
(for T along sph z axis, θ=0 corresponds to center of disk)
Asph_phi: scalar, default 0
Asph_φ, i.e. anchor azimuthal angle φ in sph system, in radians.
This is the angle from +x to [Asph projected into x-y plane], in the sph system.
(for T along sph z axis and θ=0, φ=0 provides intuitive x-y sph-box alignment,
while φ=π/2 rotates box 90° clockwise as viewed from +z, thus “swapping” x and y)
Abox_x: None or scalar
Abox_x, i.e. anchor x position in box system
None –> mapping will assume Abox_x = X0 + XEXT/2
Abox_y: None or scalar
Abox_y, i.e. anchor y position in box system
None –> mapping will assume Abox_y = Y0 + YEXT/2

Methods

_Abox_display()

brief human-readable strings for Abox_x and Abox_y, excluding defaults (None).

_Asph_calcs()

compute various details related to Asph_theta and Asph_phi.

_Asph_display()

brief human-readable strings for Asph_θ and Asph_φ

_get_basis()

gets BasisXYZ object containing x,y,z basis info.

_repr_contents()

list of contents for self.__repr__

Attributes

Asph

various details related to Asph_theta and Asph_phi.

Asph_phi

Asph_φ, i.e. anchor azimuthal angle φ in sph system, in radians.

Asph_theta

Asph_θ, i.e. anchor polar angle θ in sph system, in radians.

property Asph

various details related to Asph_theta and Asph_phi.

self.Asph is a dict containing:

‘θ’: self.Asph_theta
‘cosθ’: cos(Asph_theta)
‘sinθ’: sin(Asph_theta)
‘φ’: self.Asph_phi
‘cosφ’: cos(Asph_phi)
‘sinφ’: sin(Asph_phi)
‘rhat’: rhat_Asph as xr.DataArray vector (along ‘component’ dim),
in sph system cartesian coords centered at r=0
‘θhat’: θhat_Asph as xr.DataArray vector (along ‘component’ dim),
in sph system cartesian coords centered at r=0
‘φhat’: φhat_Asph as xr.DataArray vector (along ‘component’ dim),
in sph system cartesian coords centered at r=0
as well as alternate spellings of keys, with same values:
‘theta’: alias to ‘θ’
‘cos_theta’: alias to ‘cosθ’
‘sin_theta’: alias to ‘sinθ’
‘phi’: alias to ‘φ’
‘cos_phi’: alias to ‘cosφ’
‘sin_phi’: alias to ‘sinφ’
‘thetahat’: alias to ‘θhat’
‘phihat’: alias to ‘φhat’
result is cached; only recomputed when Asph_theta or Asph_phi change.
property Asph_phi

Asph_φ, i.e. anchor azimuthal angle φ in sph system, in radians.

See help(type(self)) for details.
property Asph_theta

Asph_θ, i.e. anchor polar angle θ in sph system, in radians.

See help(type(self)) for details.
_Abox_display()

brief human-readable strings for Abox_x and Abox_y, excluding defaults (None).

_Asph_calcs()

compute various details related to Asph_theta and Asph_phi.

See help(type(self).Asph) for details
_Asph_display()

brief human-readable strings for Asph_θ and Asph_φ

_get_basis()

gets BasisXYZ object containing x,y,z basis info.

Here, just returns _get_basis() which provides _BASIS from tools.xarray_tools.xarray_vectors
(Component objects if imported the rest of PlasmaCalcs, strings if copy-pasted tools elsewhere.)
_repr_contents()

list of contents for self.__repr__