irfpy.ica.geometry

Observation geometry related functions for ICA

Code author: Gabriella Stenberg Wieser

Module: irfpy.ica.geometry

Functions to test observation geometry related questions or observation geometry related properties.

irfpy.ica.geometry.get_sun_direction(sa_csox, sa_csoy, sa_csoz)[source]

The function gives the sun direction in spacecraft coordinates, both as a vector and as elevation-azimuth angles

AUTHOR: Gabriella Stenberg Wieser

INPUT PARAMETERS

sa_csox:

(float (3xlength)) Spacecraft x expressed in CSO or CSEQ

sa_csoy:

(float (3xlength)) Spacecraft y expressed in CSO or CSEQ

sa_csoz:

(float (3xlength)) Spacecraft z expressed in CSO or CSEQ

OUTPUT PARAMETERS

SUN_sc:

(float (3xlength)) Sun position in the spacecraft frame

elevangle:

(float) Sun elevation angle in the range -90 to +90 from spacecraft xz-plane

azimuthangle:

(float) Sun azimuthangle in the range 0-360 from spacecraft x towards z

EXAMPLES

SUN_sc,elevangle,azimuthangle=my.get_sun_directions(sa_csox,sa_csoy,sa_csoz)

irfpy.ica.geometry.get_comet_direction(sa_csox, sa_csoy, sa_csoz, sp_cso)[source]

The function gives the comet direction in spacecraft coordinates, both as a vector and as elevation-azimuth angles

AUTHOR: Gabriella Stenberg Wieser

INPUT PARAMETERS

sa_csox:

(float (3xlength)) Spacecraft x expressed in CSO or CSEQ

sa_csoy:

(float (3xlength)) Spacecraft y expressed in CSO or CSEQ

sa_csoz:

(float (3xlength)) Spacecraft z expressed in CSO or CSEQ

sp_cso:

(float (3Xlength)) Spacecraft position expressed in CSO or CSEQ

OUTPUT PARAMETERS

COMET_sc:

(float (3xlength)) Sun position in the spacecraft frame

elevangle:

(float) Comet elevation angle in the range -90 to +90 from spacecraft xz-plane

azimuthangle:

(float) Comet azimuthangle in the range 0-360 from spacecraft x towards z

EXAMPLES:

COMET_sc,elevangle,azimuthangle=my.get_sun_directions(sa_csox,sa_csoy,sa_csoz)
irfpy.ica.geometry.get_sun_and_comet_bin(bs_cso, sp_cso, energybin, printing=False)[source]

The function provides the sector and elevation bins, which are closest to the sun and comet directions.

AUTHOR: Gabriella Stenberg Wieser

INPUT PARAMETERS

bs_cso:

(float (3 x az x energy x length) the looking directions of all azimuthal sectors, all energies and all times/levations

sp_cso:

(float (3 x length)) the position of the spacecraft in the same coordinate system (ixcso,iycso,izcso)

energybin:

(int) an energybin. The looking directions vary with energy and hence the bin where the suns and comet appear is energy dependent

OUTPUT PARAMETERS

az_el_SUN:

(int (2 x length/16)) sector and elevation bin where sun appear for each elevation sweep

az_el_COMET:

(int (2 x length/16)) sector and elevation bin where comet appear for each elevation sweep

EXAMPLE:

sun,comet=my.get_sun_and_comet_bin(bs_cso,sp_cso,energybin)

sun[0,:] gives the sector where the sun appears, sun[1,:] is the elevation bin comet[0,:] gives the sector where the comet appears, comet[1,:] is the elevation bin

irfpy.ica.geometry.get_direction_from_bin(azimuth, elevation, energybin, bs_cso)[source]

The function provides the average direction (in cso or cseq depending on input matrix) of an azimuth-elevation-energy bin, over the time span in bs_cso. It aslo return a time series of the direction for the same time span

AUTHOR: Gabriella Stenberg Wieser

INPUT PARAMETERS

bs_cso:

(float (3 x az x energy x length) the looking directions of all azimuthal sectors, all energies and all times/levations

energybin:

(int) an energybin (0-95). The looking directions vary with energy and hence the bin where the suns and comet appear is energy dependent

azimuth:

(int) an azimuthal bin (sector) (0-15)

elevation:

(int) an elevation bin (0-15)

OUTPUT PARAMETERS

dirs: (3 x float) average direction in cso for given azimuth, elevation and energy

EXAMPLE:

dirs_ts, dirs_av=my.get_direction_from_bin(azimuth, elevation, energybin, bs_cso)