ecpi.common.mission.attitude module

Section author: ECLAIRs GP team

Quaternion attitude exploitation:

  • Precise calculation of pointing and orientation with alignment bias

  • Convert FOV pointing to astronomical referential

  • Convert astronomical referential to FOV pointing

Summary

Classes:

AttitudeECLAIRs

Attitude for ECLAIRs instrument

AttitudeMXT

Attitude for MXT instrument

AttitudeVT

Attitude for VT instrument

Class diagram:

Functions:

compute_local_frame_on_sphere

Return base of tangent local frame of unit sphere for a given direction with astronomer orientation convention

direlev_to_xyz

Convert spherical coordinate with CNES convention to unit cartesian vector

ptgori_to_quaternion

Compute quaternion associated to rotation defined by a pointing direction and orientation

xyz_to_direlev

Convert unit cartesian vector in spherical coordinate with CNES convention

Reference

class AttitudeECLAIRs(p_frame_cat='gcrs', no_biais=False)[source]

Bases: ecpi.common.mission.attitude.AttitudeVT

Attitude for ECLAIRs instrument

class AttitudeMXT(p_frame_cat='gcrs', no_biais=False)[source]

Bases: ecpi.common.mission.attitude.AttitudeVT

Attitude for MXT instrument

class AttitudeVT(p_frame_cat='gcrs', no_biais=False)[source]

Bases: object

Attitude for VT instrument

cat_user_to_instru(p_ptg_catuf, deg=False)[source]

in : ra dec (n,2) [deg] out : xyz (n,3)

Parameters
  • p_ptg_catuf (numpy array with shape (n,2)) – ra ,dec

  • deg (boolean) – input angle in degree, else rad

Returns

pointing in unit cartesian

Return type

numpy array with shape (n,3)

instru_to_cat_user(p_ptg_instruf, deg=False)[source]

in : xyz (n,3) out : ra dec (n,2)

Parameters
  • p_ptg_instruf (numpy array with shape (n,3)) – input pointing in unit cartesian

  • deg (boolean) – output angle in degree, else rad

Returns

ra ,dec

Return type

numpy array with shape (n,2)

ori_instru(deg=False)[source]

return orientation of instrument in IAU/pol convention

Parameters

deg (boolean) – output angle in degree, else rad

Returns

angle orientation

Return type

float

ptg_instru(deg=False)[source]

Return pointing of instrument

Parameters

deg (boolean) – output angle in degree, else rad

Returns

pointing of instrument ra, dec

Return type

numpy array with shape (1,2)

set_attitude_instru_ptgori(p_ptg_ori)[source]

Set attitude instrument (no bias) with pointing vector and orientation

Parameters

p_ptg_ori (list) – ra, dec, ori in degree

set_attitude_instru_quater(p_quater)[source]
Set attitude instru (no biais) satellite with quaternion in the same convention

as the message AAV

Quaternion given by AAV bulletin: J2000->GRF

  1. with symbol ‘->’ convention CNES documentation “3.3 quaternion”
    • x [B] = M B->A x [A]

    where M is rotation matrix * Q R1->R3 = Q R1->R2 . Q R2->R3

  2. GRF = Guidance Reference Frame (which is VT sighting reference frame R VTlos as a

    baseline, see CSC-R-4.2-0150)

3) For SVOM applications, J2000 and GCRF can be considered as identical, J2000 is considered the baseline coordination frame.

M out->in

Parameters

p_quater (list/array) – unit quaternion

set_attitude_svom_ptgori(p_ptg_ori)[source]

Set attitude SVOM with pointing vector and orientation

Parameters

p_ptg_ori (list) – ra, dec, ori in degree

set_attitude_svom_quater(p_quater)[source]

Set attitude svom satellite with quatenion in the same convention as the message AAV

Quaternion given by AAV bulletin: J2000->GRF

  1. with symbol ‘->’ convention CNES documentation “3.3 quaternion”
    • x [B] = M B->A x [A]

    where M is rotation matrix * Q R1->R3 = Q R1->R2 . Q R2->R3

  2. GRF = Guidance Reference Frame (which is VT sighting reference frame R VTlos as a

    baseline, see CSC-R-4.2-0150)

3) For SVOM applications, J2000 and GCRF can be considered as identical, J2000 is considered the baseline coordination frame.

M out->in

Parameters

p_quater (list/array) – unit quaternion

compute_local_frame_on_sphere(p_ptg_radec, deg=False)[source]

Return base of tangent local frame of unit sphere for a given direction with astronomer orientation convention

Parameters
  • p_ptg_radec (numpy array float) – array ra, dec

  • deg (boolean) – input angle in degree, else rad

Returns

unit vectors of tangential frame in sphere

Return type

tuple of 3 numpy array 3D

direlev_to_xyz(p_direlev, deg=False)[source]

Convert spherical coordinate with CNES convention to unit cartesian vector

CNES convention :
  • elevation angle is the angle between vector and plane (y,z)

  • direction is angle between y axis and projection vector in plane (y,z)

Parameters
  • p_direlev (numpy array with shape (n,2)) – array of spherical coordinate direction and elevation

  • deg (boolean) – input angle in degree, else rad

Returns

array of unit cartesian vector

Return type

numpy array with shape (n,3)

ptgori_to_quaternion(p_ptg_radec, p_ori, deg=False)[source]

Compute quaternion associated to rotation defined by a pointing direction and orientation

X instru axis is the pointing axis , ** CNES choice ** Z instru axis determine orientation in sky, not clear in CNES document, so it’s my choice Orientation of Z instru axis follow IAU recommandation to measure polarisation angle .. rubric:: Example

  1. orientation is 0 so Z instru axis pointed to celestial North pole

  2. orientation is 90 deg so Z instru axis pointed following a parallel of celestial sphere with East direction

Parameters
  • p_ptg_radec (list) – ra, dec

  • p_ori (number) – orientation angle with convention defined above

  • deg (boolean) – input angle in degree, default rad

Returns

unit quaternion

Return type

list/array of float

xyz_to_direlev(p_xyz, deg=False)[source]

Convert unit cartesian vector in spherical coordinate with CNES convention

CNES convention :
  • elevation angle (like latitude) is the angle between vector and plane (y,z)

  • direction is angle between y axis and projection vector in plane (y,z)

Parameters
  • p_xyz (numpy array with shape (n,3)) – array of unit cartesian vector

  • deg (boolean) – output angle in degree, else rad

Returns

array of spherical coordinate direction and elevation

:rtype:numpy array with shape (n,2)