Square Light
Attributes Summary
Intensity of the light source ( |
|
Lengths of the sides of the light ( |
|
|
Corresponding C++ SquareLight object |
Position of the body ( |
|
Rotation of the body ( |
|
NAIF name or ID code for the body ( |
|
NAIF reference frame name for the body ( |
|
NAIF name or ID code for the reference frame origin ( |
|
NAIF reference frame name ( |
|
Aberration correction flag ( |
Methods Summary
Set a new |
|
Set a new |
|
Set new position for a given ephemeris time using SPICE |
|
Set new rotation for a given ephemeris time using SPICE |
|
Set both a new position and rotation for a given ephemeris time using SPICE |
- class crt.lights.SquareLight(intensity, size, **kwargs)[source]
The
SquareLight
class is the simplest area light model implemented- Parameters
intensity (float) – Intensity of the light source
size (ArrayLike) – Lengths of the sides of the light
- set_pose(position, rotation, cpp=True)
Set both a new
position
androtation
- Parameters
position (ArrayLike) – Position to be applied (xyz)
rotation (ArrayLike) – 3 by 3 Rotation matrix that must obey \(R^T = R^{-1}\) and \(\det(R)=1\)
cpp (bool, optional) – Flag for if the underlying C++ body should be updated
Default:True
- set_position(position, cpp=True)
Set a new
position
- Parameters
position (ArrayLike) – Position to be applied (xyz)
cpp (bool, optional) – Flag for if the underlying C++ body should be updated
Default:True
- set_rotation(rotation, cpp=True)
Set a new
rotation
- Parameters
rotation (ArrayLike) – 3 by 3 Rotation matrix that must obey \(R^T = R^{-1}\) and \(\det(R)=1\)
cpp (bool, optional) – Flag for if the underlying C++ body should be updated
Default:True
- set_scale(scale, cpp=True)
Set a new
scale
- Parameters
scale (float) – Scale to be applied
cpp (bool, optional) – Flag for if the underlying C++ body should be updated
Default:True
- spice_pose(et, cpp=True)
Set both a new position and rotation for a given ephemeris time using SPICE
The position is updated using
spiceypy.spkpos()
, where thename
is used as thetarg
argument,ref
is used as theref
argument,abcorr
is used as theabcorr
argument, andorigin
is used as theobs
argument.The rotation is updated using
spiceypy.pxform()
, where theref
is used as thefrom
argument, andframe
is used as theto
argumnet.Please refer to the spkpos or pxform documentation for more information.
- Parameters
et (float) – Ephemeris time (seconds since the J2000 epoch), also known as Barycentric Dynamical Time
cpp (bool, optional) – Flag for if the underlying C++ body should be updated
Default:True
- spice_position(et, cpp=True)
Set new position for a given ephemeris time using SPICE
This is done using
spiceypy.spkpos()
, where thename
is used as thetarg
argument,ref
is used as theref
argument,abcorr
is used as theabcorr
argument, andorigin
is used as theobs
argument. Please refer to the spkpos documentation for more information.- Parameters
et (float) – Ephemeris time (seconds since the J2000 epoch), also known as Barycentric Dynamical Time
cpp (bool, optional) – Flag for if the underlying C++ body should be updated
Default:True
- spice_rotation(et, cpp=True)
Set new rotation for a given ephemeris time using SPICE
This is done using
spiceypy.pxform()
, where theref
is used as thefrom
argument, andframe
is used as theto
argumnet. Please refer to the pxform documentation for more information.- Parameters
et (float) – Ephemeris time (seconds since the J2000 epoch), also known as Barycentric Dynamical Time
cpp (bool, optional) – Flag for if the underlying C++ body should be updated
Default:True
- scale
Scale of the body (
float
)This attribute is used by the subclass
Entity
and describes how theEntity
geometry is scaled. It can be modified directly usingset_scale()
.
- position
Position of the body (
numpy.ndarray
of shape(3,)
)This attribute is used by the subclass
Entity
, as well as allCamera
andLight
classes. It describes how the body is translated in space. It can be modified directly using eitherset_position()
orset_pose()
. Alternatively, it can be modified usingspice_position()
which uses predefined SPICE ephemerides to calculate a position for a given ephemeris time.
- rotation
Rotation of the body (
numpy.ndarray
of shape(3,3)
)This attribute is used by the subclasses
Entity
, as well as allCamera
andLight
classes. It describes how the body is translated in space. It can be modified directly using eitherset_rotation()
orset_pose()
. Alternatively, it can be modified usingspice_rotation()
which uses predefined SPICE ephemerides to calculate a rotation for a given ephemeris time.
- name
NAIF name or ID code for the body (
str
)This attribute can be used by the subclasses
Entity
, as well as allCamera
andLight
classes. It is used by the SPICE utility,spiceypy.spkpos()
, as the name for the celestial body whose position will be used as the position of the body. This corresponds to thetarg
argument tospiceypy.spkpos()
. Please refer to the spkpos documentation for more information.
- frame
NAIF reference frame name for the body (
str
)This attribute can be used by the subclasses
Entity
, as well as allCamera
andLight
classes. It is used by the SPICE utility,spiceypy.pxform()
, as the name for the reference frame whose orientation will be used as the rotation of the body. This corresponds to theto
argument tospiceypy.pxform()
. Please refer to the pxform documentation for more information.
- origin
NAIF name or ID code for the reference frame origin (
str
)This attribute can be used by the subclasses
Entity
, as well as allCamera
andLight
classes. It is used by the SPICE utility,spiceypy.spkpos()
, as the name for the celestial body whose position will be used as the origin of the reference frame. This corresponds to theobs
argument tospiceypy.spkpos()
. Please refer to the spkpos documentation for more information.
- ref
NAIF reference frame name (
str
)This attribute can be used by the subclasses
Entity
, as well as allCamera
andLight
classes. It is used by both the SPICE utilities,spiceypy.pxform()
andspiceypy.spkpos()
, as the name for the reference frame against in which positions and rotations will be calculated. This corresponds to theref
argument to bothspiceypy.spkpos()
andspiceypy.pxform()
. Please refer to the spkpos or pxform documentation for more information.
- abcorr
Aberration correction flag (
str
)This attribute is used by by the SPICE utility,
spiceypy.spkpos()
, as an indication of what light time correction should be used. This corresponds to theabcorr
argument tospiceypy.spkpos()
. Please refer to the spkpos documentation for more information.
- intensity: float
Intensity of the light source (
float
)
- size
Lengths of the sides of the light (
numpy.ndarray
or shape(2,)
)