irfpy.vels.fov¶

Field of view of ELS.

This module provides VEX/ELS field of view. Implementation is based on the information of SPICE Instrumet Kernel, while this module does not depend on SPICE. Thus, this module can be used without installing SpiceyPy.

The frame is in the instrument frame (“VEX_ASPERA4_ELS”). Converting to other frames can be done using irfpy.vexpvat.vexspice module.

Usage example

>>> from irfpy.vels import fov
>>> simplefov = fov.SimpleFOV()


The view vector of channel 5 (center direction) is obtained as

>>> vv = simplefov.viewvector_elsframe(5)    # ELS CH-5, viewing vector in ELS frame.
>>> print('{vv[0]:.3f} {vv[1]:.3f} {vv[2]:.3f}'.format(vv=vv))
0.000 -0.831 0.556


The corresponding velocity vector (centre direction) is obtained as

>>> vv = simplefov.velocityvector_elsframe(5)    # ELS CH-5, velocity vector in ELS frame.
>>> print('{vv[0]:.3f} {vv[1]:.3f} {vv[2]:.3f}'.format(vv=vv))
-0.000 0.831 -0.556


If one convert to the other frame, the vexspice module should be used.

>>> from irfpy.vexpvat import vexspice as vs
>>> vs.init()
>>> import datetime
>>> t0 = datetime.datetime(2009, 12, 3, 15, 30)
>>> conv_els2sc = vs.convert_matrix(t0, 'VEX_ASPERA4_ELS', 'VEX_SPACECRAFT')
>>> vv_sc = conv_els2sc.dot(vv)     # Apply the frame conversion.
>>> print('{vv[0]:.3f} {vv[1]:.3f} {vv[2]:.3f}'.format(vv=vv_sc))
0.831 0.556 0.000


Definition of frame

The ELS FOV is illustrated as (figure from SPICE kernel, “VEX_ASPERA4_V02.TI”):

This diagram illustrates ELS sector layout:

^ +Zels
|                        S# indicate the sector "#"
V7  |  V8                       position in the sensor
V6   ....|....   V9                        assembly.
.' S15 | S0  .
V5 .' S14   |    S1 . V10           V# indicate the sector "#"
. S13     |      S2 .                     view direction.
V4 .          |          . V11
.S12       |        S3.                 For example, for
.          o--------------> +Yels     Sector "1" the view
.S11      / +Xels   S4.              direction is the vector
V3 .        /            . V12            emanating from the
.S10   /          S5.               aperture center through
V2 .    /         S6 .  V13            the point designated
. / S8    S7  .'                         by "V1".
V1/ ......... ' V14
/   V0   V15
V
View direction
of sector "1"

class irfpy.vels.fov.SimpleFOV[source]

Bases: object

Simple field of view for VEX/ELS.

>>> simplefov = SimpleFOV()


The view vector of channel 5 (center direction) is obtained as

>>> vv = simplefov.viewvector_elsframe(15.5)    # ELS CH-15.5, viewing vector in ELS frame.
>>> print('{vv[0]:.3f} {vv[1]:.3f} {vv[2]:.3f}'.format(vv=vv))
0.000 0.000 -1.000


The corresponding velocity vector (centre direction) is obtained as

>>> vv = simplefov.velocityvector_elsframe(15.5)    # ELS CH-5, velocity vector in ELS frame.
>>> print('{vv[0]:.3f} {vv[1]:.3f} {vv[2]:.3f}'.format(vv=vv))
-0.000 -0.000 1.000
`
viewvector_elsframe(ch_nr)[source]

Return the viewing vector of the given channel in ELS frame.

Parameters

ch_nr – Channel number

Returns

A viewing vector in ELS frame.

velocityvector_elsframe(ch_nr)[source]

Return the velocity vector of the given channel in ELS frame.

Parameters

ch_nr – Channel number

Returns

A velocity vector in ELS frame.