WebGeoCalc calculations
For now only these geometry/time calculations are implemented:
GFAngularSeparationSearch(not implemented)GFDistanceSearch(not implemented)GFSubPointSearch(not implemented)GFOccultationSearch(not implemented)GFSurfaceInterceptPointSearch(not implemented)GFTargetInInstrumentFovSearch(not implemented)GFRayInFovSearch(not implemented)GFRangeRateSearch(not implemented)GFPhaseAngleSearch(not implemented)GFIlluminationAnglesSearch(not implemented)
Import generic WebGeoCalc calculation object:
>>> from webgeocalc import Calculation
or import specific WebGeoCalc calculation object:
>>> from webgeocalc import StateVector, AngularSeparation
Inputs examples and payloads
All WebGeoCalc calculation objects take their input attributes in
snakecase format.
>>> calc = Calculation(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... calculation_type = 'STATE_VECTOR',
... target = 'CASSINI',
... observer = 'SATURN',
... reference_frame = 'IAU_SATURN',
... aberration_correction = 'NONE',
... state_representation = 'PLANETOGRAPHIC',
... )
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Calculation default parameters:
time_system:UTCtime_format:CALENDAR
Note
By default, if no api option is provided,
the query is sent to the WGC_URL API
(if set in the global environment variables) or JPL API (if not).
See API docs for details.
To query on the ESA WGC API, you need to add the ESA key
to the any Calculation parameters:
>>> Calculation(
... api = 'ESA',
... kernels = 6,
... times = '2014-01-01T01:23:45.000',
... calculation_type = 'STATE_VECTOR',
... target = '67P/CHURYUMOV-GERASIMENKO (1969 R1)',
... observer = 'ROSETTA ORBITER',
... reference_frame = '67P/C-G_CK',
... aberration_correction = 'NONE',
... state_representation = 'LATITUDINAL',
... ).api
<Api> http://spice.esac.esa.int/webgeocalc/api
3-rd party WGC are also supported, either set WGC_URL
on your system (as mention before), or you can provide directly
its URL to the api parameter:
>>> Calculation(
... api = 'https://wgc.obspm.fr/webgeocalc/api',
... kernels = 6,
... times = '2014-01-01T01:23:45.000',
... calculation_type = 'STATE_VECTOR',
... target = '67P/CHURYUMOV-GERASIMENKO (1969 R1)',
... observer = 'ROSETTA ORBITER',
... reference_frame = '67P/C-G_CK',
... aberration_correction = 'NONE',
... state_representation = 'LATITUDINAL',
... ).api
<Api> https://wgc.obspm.fr/webgeocalc/api
In each cases, every new API is cached to improve the kernels loading performances.
The payload that will be submitted to
the WebGeoCalc API can be retrieve with the
payload attribute:
>>> calc.payload
{'kernels': [{'type': 'KERNEL_SET', 'id': 5}],
'times': ['2012-10-19T08:24:00.000'],
'calculationType': 'STATE_VECTOR',
'target': 'CASSINI',
'observer': 'SATURN',
'referenceFrame': 'IAU_SATURN',
'aberrationCorrection': 'NONE',
'stateRepresentation': 'PLANETOGRAPHIC',
'timeSystem': 'UTC',
'timeFormat': 'CALENDAR'}
Example of StateVector calculation with multi kernels
inputs (requested by name in this case), with multiple times
inputs for target, observer and
reference_frame requested by id:
>>> StateVector(
... kernels = ['Solar System Kernels', 'Cassini Huygens'],
... times = ['2012-10-19T07:00:00', '2012-10-19T09:00:00'],
... target = -82, # CASSINI
... observer = 699, # SATURN
... reference_frame = 10016, # IAU_SATURN
... ).payload
{'kernels': [{'type': 'KERNEL_SET', 'id': 1},
{'type': 'KERNEL_SET', 'id': 5}],
'times': ['2012-10-19T07:00:00', '2012-10-19T09:00:00'],
'target': -82,
'observer': 699,
'referenceFrame': 10016,
'calculationType': 'STATE_VECTOR',
'aberrationCorrection': 'CN',
'stateRepresentation': 'RECTANGULAR',
'timeSystem': 'UTC',
'timeFormat': 'CALENDAR'}
Example of AngularSeparation calculation
with specific kernel_paths and multiple intervals:
>>> AngularSeparation(
... kernel_paths = [
... 'pds/wgc/kernels/lsk/naif0012.tls',
... 'pds/wgc/kernels/spk/de430.bsp'
... ],
... intervals = [
... ['2000-01-01', '2000-01-03'],
... ['2000-02-01', '2000-02-03']
... ],
... time_step = 1,
... time_step_units = 'DAYS',
... target_1 = 'VENUS',
... target_2 = 'MERCURY',
... observer = 'SUN',
... ).payload
{'kernels': [{'type': 'KERNEL', 'path': 'pds/wgc/kernels/lsk/naif0012.tls'},
{'type': 'KERNEL', 'path': 'pds/wgc/kernels/spk/de430.bsp'}],
'intervals': [{'startTime': '2000-01-01', 'endTime': '2000-01-03'},
{'startTime': '2000-02-01', 'endTime': '2000-02-03'}],
'timeStep': 1,
'timeStepUnits': 'DAYS',
'target1': 'VENUS',
'target2': 'MERCURY',
'observer': 'SUN',
'calculationType': 'ANGULAR_SEPARATION',
'shape1': 'POINT',
'shape2': 'POINT',
'aberrationCorrection': 'CN',
'timeSystem': 'UTC',
'timeFormat': 'CALENDAR'}
Submit payload and retrieve results
Calculation requests to the WebGeoCalc API are made in three steps:
1. The payload is submitted to the API with
Calculation.submit() method, and a
calculation-id is retrieved:
>>> calc.submit()
[Calculation submit] Status: LOADING_KERNELS (id: 8750344d-645d-4e43-b159-c8d88d28aac6)
2. If the calculation status is COMPLETE, the results can
be directly retrieved. Otherwise, you need to update the
calculation status with Calculation.update() method:
>>> calc.update()
[Calculation update] Status: COMPLETE (id: 8750344d-645d-4e43-b159-c8d88d28aac6)
3. When the calculation status is COMPLETE, the
results are retrieved by the results attribute:
>>> calc.results
{
'DATE': '2012-10-19 09:00:00.000000 UTC',
'DISTANCE': 764142.63776247,
'SPEED': 111.54765899,
'X': 298292.85744169,
'Y': -651606.58468976,
'Z': 265224.81187627,
'D_X_DT': -98.8032491,
'D_Y_DT': -51.73211296,
'D_Z_DT': -2.1416539,
'TIME_AT_TARGET': '2012-10-19 08:59:57.451094 UTC',
'LIGHT_TIME': 2.54890548
}
Tip
It is possible to submit, update and retrieve the results at once
with Calculation.run() method:
>>> calc.run()
[Calculation submit] Status: LOADING_KERNELS (id: 8750344d-645d-4e43-b159-c8d88d28aac6)
[Calculation update] Status: COMPLETE (id: 8750344d-645d-4e43-b159-c8d88d28aac6)
{'DATE': '2012-10-19 09:00:00.000000 UTC',
'DISTANCE': 764142.63776247,
'SPEED': 111.54765899,
'X': 298292.85744169,
'Y': -651606.58468976,
'Z': 265224.81187627,
'D_X_DT': -98.8032491,
'D_Y_DT': -51.73211296,
'D_Z_DT': -2.1416539,
'TIME_AT_TARGET': '2012-10-19 08:59:57.451094 UTC',
'LIGHT_TIME': 2.54890548}
Calculation names
The Webgeocalc API calculation names slightly differ from the
calculation feature names accessible from the Webgeocalc GUI
web portals.
python-webgeocalc
API classes
|
Webgeocalc API
calculation types
|
Webgeocalc GUI
features
|
|---|---|---|
|
State Vector |
|
|
Angular Separation |
|
|
Angular Size |
|
|
Frame Transformation |
|
|
Illumination Angles |
|
|
Phase Angle |
|
|
Pointing Direction |
|
|
Sub-solar Point |
|
|
Sub-observer Point |
|
|
Surface Intercept Point |
|
|
Orbital Elements |
|
|
Time Conversion |
|
|
Position Event Finder |
Generic calculation
- class webgeocalc.Calculation(api='', time_system='UTC', time_format='CALENDAR', verbose=True, **kwargs)[source]
Bases:
PayloadWebgeocalc calculation object.
- Parameters:
api (str or webgeocalc.Api, optional) – WebGeoCalc API endpoint. By default, if no
apioption is provided, the query is sent to theWGC_URLAPI (if set in the global environment variables) orJPL_API(if not). Keyword are also accepted (JPLandESA). Custom 3-rd party endpoints can be used (with theirURLor as a customwebgeocalc.api.Api).time_system (str, optional) – See:
time_systemtime_format (str, optional) – See:
time_formatverbose (bool, optional) – Verbose calculation phase during
submit(),update()andrun().calculation_type (str) – See:
calculation_typekernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitssclk_id (int) – See:
sclk_idoutput_time_system (str) – See:
output_time_systemoutput_time_format (str) – See:
output_time_formatoutput_time_custom_format (str) – See:
output_time_custom_formatoutput_sclk_id (int) – See:
output_sclk_idtarget (str or int) – See:
targettarget_frame (str) – See:
target_frametarget_1 (str) – See:
target_1target_2 (str) – See:
target_2shape_1 (str) – See:
shape_1shape_2 (str) – See:
shape_2observer (str or int) – See:
observerilluminator (str) – See:
illuminatorreference_frame (str or int) – See:
reference_frameframe_1 (str ot int) – See:
frame_1frame_2 (str or int) – See:
frame_2orbiting_body (str) – See:
orbiting_bodycenter_body (str) – See:
center_bodyaberration_correction (str) – See:
aberration_correctionvector_ab_corr (str) – See:
vector_ab_corrcorrection_locus (str) – See:
correction_locusspec_type (str) – See:
spec_typedirection_1 (dict or Direction) – See:
direction_1direction_2 (dict or Direction) – See:
direction_2vector_magnitude (str) – See:
vector_magnitudecomputation_method (str) – See:
computation_methodstate_representation (str) – See:
state_representationtime_location (str) – See:
time_locationorientation_representation (str) – See:
orientation_representationaxis_1 (str) – See:
axis_1axis_2 (str) – See:
axis_2axis_3 (str) – See:
axis_3angular_units (str) – See:
angular_unitsangular_velocity_representation (str) – See:
angular_velocity_representationangular_velocity_units (str) – See:
angular_velocity_unitscoordinate_representation (str) – See:
coordinate_representationlatitude (float) – See:
latitudelongitude (float) – See:
longitudesub_point_type (str) – See:
sub_point_typedirection_vector_type (str or int) – See:
direction_vector_typedirection_object (str) – See:
direction_objectdirection_instrument (str or int) – See:
direction_instrumentdirection_frame (str) – See:
direction_framedirection_frame_axis (str) – See:
direction_frame_axisdirection_vector_x (float) – See:
direction_vector_xdirection_vector_y (float) – See:
direction_vector_ydirection_vector_z (float) – See:
direction_vector_zdirection_vector_ra (float) – See:
direction_vector_radirection_vector_dec (float) – See:
direction_vector_decdirection_vector_az (float) – See
direction_vector_azdirection_vector_el (float) – See
direction_vector_elazccw_flag (bool or str) – See
azccw_flagelplsz_flag (bool or str) – See
elplsz_flagoutput_duration_units (float) – See
output_duration_unitsshould_complement_window (bool) – See
should_complement_windowinterval_adjustment (str) – See
interval_adjustmentinterval_adjustment_amount (float) – See
interval_adjustment_amountinterval_adjustment_units (str) – See
interval_adjustment_unitsinterval_filtering (str) – See
interval_filteringinterval_filtering_threshold (float) – See
interval_filtering_thresholdinterval_filtering_threshold_units (str) – See
interval_filtering_threshold_unitscoordinate_system (str) – See
coordinate_systemcoordinate (str) – See
coordinaterelational_condition (str) – See
relational_conditionreference_value (float) – See
reference_valueupper_limit (float) – See
upper_limitadjustment_value (float) – See
adjustment_value
- Raises:
CalculationRequiredAttr – If
calculation_type,time_systemandtime_formatare not provided.CalculationRequiredAttr – If neither
kernelsnorkernel_pathsis not provided.CalculationRequiredAttr – If neither
timesnorintervalsis not provided.
- submit()[source]
Submit calculation parameters and get calculation
idandphase.- Raises:
CalculationAlreadySubmitted – If the calculation was already submitted (to avoid duplicated submissions).
Example
>>> calc.submit() # noqa: E501 [Calculation submit] Phase: QUEUED | POSITION: 6 (id: 8750344d-645d-4e43-b159-c8d88d28aac6) >>> calc.id '8750344d-645d-4e43-b159-c8d88d28aac6' >>> calc.phase 'QUEUED | POSITION: 6'
- update()[source]
Update calculation phase
phase.Example
>>> calc.update() # noqa: E501 [Calculation update] Phase: QUEUED | POSITION: 3 (id: 8750344d-645d-4e43-b159-c8d88d28aac6) >>> calc.update() # noqa: E501 [Calculation update] Phase: STARTING (id: 8750344d-645d-4e43-b159-c8d88d28aac6) >>> calc.update() # noqa: E501 [Calculation update] Phase: LOADING_KERNELS (id: 8750344d-645d-4e43-b159-c8d88d28aac6) >>> calc.update() # noqa: E501 [Calculation update] Phase: CALCULATING (id: 8750344d-645d-4e43-b159-c8d88d28aac6) >>> calc.update() [Calculation update] Phase: COMPLETE (id: 8750344d-645d-4e43-b159-c8d88d28aac6)
- property results
Gets the results of a calculation, if its phase is COMPLETE.
- Returns:
Calculation results as dict based on output columns. If multiple
timesorintervalsare used, the value of the dict will be an array. See examples.- Return type:
dict
- Raises:
CalculationNotCompleted – If calculation phase is not COMPLETE.
Examples
>>> calc.results {'DATE': '2012-10-19 09:00:00.000000 UTC', 'DISTANCE': 764142.63776247, 'SPEED': 111.54765899, 'X': 298292.85744169, 'Y': -651606.58468976, 'Z': 265224.81187627, 'D_X_DT': -98.8032491, 'D_Y_DT': -51.73211296, 'D_Z_DT': -2.1416539, 'TIME_AT_TARGET': '2012-10-19 08:59:57.451094 UTC', 'LIGHT_TIME': 2.54890548}
>>> ang_sep = AngularSeparation( ... kernel_paths = ['pds/wgc/kernels/lsk/naif0012.tls', 'pds/wgc/kernels/spk/de430.bsp'], ... times = ['2012-10-19T08:24:00.000', '2012-10-19T09:00:00.000'], ... target_1 = 'VENUS', ... target_2 = 'MERCURY', ... observer = 'SUN', ... verbose = False, ... ) # noqa: E501 >>> ang_sep.submit() >>> ang_sep.results {'DATE': ['2012-10-19 08:24:00.000000 UTC', '2012-10-19 09:00:00.000000 UTC'], 'ANGULAR_SEPARATION': [175.17072258, 175.18555938]}
- run(timeout=30, sleep=1)[source]
Submit, update and retrieve calculation results at once.
See:
submit(),update()andresults.- Parameters:
timeout (int, optional) – Auto-update time out (in seconds).
sleep (int, optional) – Sleep duration (in seconds) between each update.
- Raises:
CalculationTimeOut – If calculation reach the timeout duration.
- property calculation_type
The type of calculation to perform.
- Parameters:
calculation_type (str) –
One of the following:
STATE_VECTOR
ANGULAR_SEPARATION
ANGULAR_SIZE
SUB_OBSERVER_POINT
SUB_SOLAR_POINT
ILLUMINATION_ANGLES
SURFACE_INTERCEPT_POINT
OSCULATING_ELEMENTS
FRAME_TRANSFORMATION
TIME_CONVERSION
GF_COORDINATE_SEARCH
GF_ANGULAR_SEPARATION_SEARCH
GF_DISTANCE_SEARCH
GF_SUB_POINT_SEARCH
GF_OCCULTATION_SEARCH
GF_TARGET_IN_INSTRUMENT_FOV_SEARCH
GF_SURFACE_INTERCEPT_POINT_SEARCH
GF_RAY_IN_FOV_SEARCH
Note
This parameters will be auto-filled for specific calculation sub-classes.
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property kernels
Add kernel sets.
- Parameters:
kernels (str, int, [str or/and int]) –
Kernel set(s) to be used for the calculation:
[{'type': 'KERNEL_SET', 'id': 5}, ...]
- property kernel_paths
Add path for individual kernel paths.
- Parameters:
kernel_paths (str, [str]) –
Kernel path(s) to be used for the calculation:
[{'type': 'KERNEL', 'path': 'pds/wgc/kernels/lsk/naif0012.tls'}, ...]
- property times
Calculation input times.
- Parameters:
times (str or [str]) – String or array of strings representing the time points that should be used in the calculation.
- Raises:
CalculationConflictAttr – Either this parameter or the py:attr:intervals parameter must be supplied.
- property intervals
Calculation input intervals.
- Parameters:
intervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) –
An array of objects with startTime and endTime parameters, representing the time intervals used for the calculation.
Warning
Either this parameter or the
timesparameter must be supplied.- Raises:
CalculationInvalidAttr – If :py:attr:intervals` input format is invalid. For example, if :py:attr:intervals` is provided an dict,
startTimeandendTimemust be present.CalculationUndefinedAttr – If this parameter is used,
time_stepmust also be supplied.
- property time_step
Time step for intervals.
- Parameters:
time_step (int) – Number of steps parameter used for time series or geometry finder calculations.
- Raises:
CalculationConflictAttr – If
timesattribute is supplied.CalculationUndefinedAttr – If
time_step_unitsis not supplied.
- property time_step_units
Time step units.
- property time_system
Time System.
- Parameters:
time_system (str) –
One of the following:
UTC
TDB
TDT
SPACECRAFT_CLOCK
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr – If
SPACECRAFT_CLOCKis selected, butsclk_idattribute is not provided.
- property time_format
Time format input.
- Parameters:
time_format (str) –
One of the following:
CALENDAR
JULIAN
SECONDS_PAST_J2000
SPACECRAFT_CLOCK_TICKS
SPACECRAFT_CLOCK_STRING
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationRequiredAttr – If
time_systemis not provided.CalculationIncompatibleAttr – If
CALENDAR,JULIANorSECONDS_PAST_J2000is selected buttime_systemattribute is not inUTC,TDBorTDT, orSPACECRAFT_CLOCK_STRINGorSPACECRAFT_CLOCK_TICKSis selected buttime_systemattribute is notSPACECRAFT_CLOCK.
- property sclk_id
Spacecraft clock kernel id.
- Parameters:
sclk_id (int) – Spacecraft clock kernel id.
- Raises:
CalculationRequiredAttr – If
time_systemis not provided.CalculationIncompatibleAttr – If
time_systemis notSPACECRAFT_CLOCK.
- property output_time_system
The time system for results output times.
- Parameters:
output_time_system (str) –
One of the following:
UTC
TDB
TDT
SPACECRAFT_CLOCK
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr – If
SPACECRAFT_CLOCKis selected, butoutput_sclk_idattribute is not provided.
- property output_time_format
The time format for the result output times.
- Parameters:
output_time_format (str) –
One of the following:
CALENDAR
CALENDAR_YMD
CALENDAR_DOY
JULIAN
SECONDS_PAST_J2000
SPACECRAFT_CLOCK_STRING
SPACECRAFT_CLOCK_TICKS
CUSTOM
Warning
If
CUSTOMis selected, thenoutput_time_custom_formatmust also be provided.- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationRequiredAttr – If
output_time_systemis not provided.CalculationIncompatibleAttr – If
CALENDAR_YMD,CALENDAR_DOY,JULIAN,SECONDS_PAST_J2000orCUSTOMis selected butoutputTimeSystemis not inTDB,TDTorUTC, orSPACECRAFT_CLOCK_STRINGorSPACECRAFT_CLOCK_TICKSis selected butoutput_time_systemis notSPACECRAFT_CLOCK.
- property output_time_custom_format
A SPICE
timout()format string.- Parameters:
output_time_custom_format (str) – A SPICE
timout()format string.- Raises:
CalculationRequiredAttr – If
output_time_formatis not provided.CalculationIncompatibleAttr – If
output_time_formatis notCUSTOM.
- property output_sclk_id
The output spacecraft clock kernel id.
- Parameters:
output_sclk_id (int) – Spacecraft clock kernel id.
- Raises:
CalculationRequiredAttr – If
output_time_systemis not provided.CalculationIncompatibleAttr – If
output_time_systemis notSPACECRAFT_CLOCK.
- property target
Target body.
- Parameters:
target (str or int) – The target body
nameoridfromAPI.bodies().
- property target_frame
The target body-fixed reference frame name.
- Parameters:
target_frame (str) – Reference frame
name.
- property target_1
The target body the first body.
- Parameters:
target_1 (str) – Target body
nameorid.
- property target_2
The target body the second body.
- Parameters:
target_2 (str) – Target body
nameorid.
- property shape_1
The shape to use for the first body.
- Parameters:
shape_1 (str) –
One of:
POINT
SPHERE
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property shape_2
The shape to use for the second body.
- Parameters:
shape_2 (str) –
One of:
POINT
SPHERE
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property observer
The observing body.
- Parameters:
observer (str or int) – The observing body
nameoridfromAPI.bodies().
- property illuminator
The illumination source.
Often, the illumination source is the Sun, but it could be any other ephemeris object.
- Parameters:
illuminator (str or int) – The illumination body
nameoridfromAPI.bodies().
- property reference_frame
The reference frame.
- Parameters:
reference_frame (str or int) – The reference frame
nameoridfromAPI.frames().
- property frame_1
The first reference frame.
- Parameters:
frame_1 (str or int) – The reference frame
nameoridfromAPI.frames().
- property frame_2
The second reference frame.
- Parameters:
frame_2 (str or int) – The reference frame
nameoridfromAPI.frames().
- property orbiting_body
The SPICE orbiting body.
- Parameters:
orbiting_body (str or int) – SPICE body
nameoridfor the orbiting body.
- property center_body
The SPICE body center of motion.
- Parameters:
center_body (str or int) – SPICE body
nameoridfor the body that is the center of motion.
- property aberration_correction
SPICE aberration correction.
- Parameters:
aberration_correction (str) –
The SPICE aberration correction string. One of:
NONELTLT+SCNCN+SXLTXLT+SXCNXCN+S
Warning
In
TANGENT_POINTcalculation, the selected aberration correction applies both to the point set bycorrection_locusand the direction vector ifdirection_vector_typeisDIRECTION_TO_OBJECT. For any otherdirection_vector_type, the selected aberration correction only applies to the point set bycorrection_locus.- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property vector_ab_corr
Type of aberration correction.
- Parameters:
vector_ab_corr (str) –
Type of aberration correction to be applied to the specified vector. Only required if
directionVectorTypeisVECTOR_IN_REFERENCE_FRAME. One of:NONESTELLAR_ABERRATION_VECTOR
Note
Use
NONEto compute geometry without aberration corrections, andSTELLAR_ABERRATION_VECTORto correct the vector’s direction for stellar aberration, taking into account the velocity of the observer with respect to the solar system barycenter. The direction of stellar aberration correction is determined by the light time direction selected in :py:attr:aberration_correction.For backward compatibility, if not provided, it is assumed to be
NONE.- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr – If
direction_vector_typeis not supplied.CalculationIncompatibleAttr – If
direction_vector_typeis notVECTOR_IN_REFERENCE_FRAME.
- property correction_locus
Aberration correction locus.
- Parameters:
correction_locus (str) –
Aberration correction locus, which is the fixed point in the reference frame for which light time and stellar aberration corrections are computed. One of:
TANGENT_POINTSURFACE_POINT
Required only when
aberration_correctionis notNONE.Differential aberration effects across the surface of the target body are not considered. When aberration corrections are used, the effective positions of the observer and target, and the orientation of the target, are computed according to the corrections determined for the aberration correction locus.
The light time used to determine the position and orientation of the target body is that between the aberration correction locus and the observer.
The stellar aberration correction applied to the position of the target is that computed for the aberration correction locus.
Use
TANGENT_POINTto compute corrections at the “tangent point.” UseSURFACE_POINTto compute corrections at the point on the target’s surface nearest to the tangent point.When
aberration_correctionisNONE, the illumination angles, time, local true solar time and light time are computed with respect to the tangent point.- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property spec_type
Angular separation computation type.
Method used to specify the directions between which the angular separation is computed.
- Parameters:
spec_type (str) –
One of the following:
TWO_TARGETS
TWO_DIRECTIONS
- property direction
The direction specification object.
- Parameters:
direction (dict or Direction) – Direction position/velocity/vector. See:
Direction.
- property direction_1
The first direction object.
Definition of first direction for two-directions angular separation calculation.
- Parameters:
direction_1 (dict or Direction) – Direction position/velocity/vector. See:
Direction.
- property direction_2
The second direction object.
Definition of second direction for two-directions angular separation calculation.
- Parameters:
direction_2 (dict or Direction) – Direction position/velocity/vector. See:
Direction.
- property vector_magnitude
Magnitude of the output vector representation.
One of:
UNITPRESERVE_ORIGINAL
Use
UNITto represent the output direction vector as a unit vector, andPRESERVE_ORIGINALto output the direction vector with its computed magnitude.
- property computation_method
The computation method for TANGENT_POINT calculation.
Only:
ELLIPSOID
Currently, it is restricted to ELLIPSOID. This value indicates that the target shape is modeled as a triaxial ellipsoid.
- property state_representation
State representation.
- Parameters:
state_representation (str) –
One of:
RECTANGULAR
RA_DEC
LATITUDINAL (planetocentric)
PLANETODETIC
PLANETOGRAPHIC
CYLINDRICAL
SPHERICAL
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property time_location
The frame for the input times.
- Parameters:
time_location (str) –
One of:
FRAME1
FRAME2
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
Warning
NAIF API docs:
`Only needed if aberrationCorrection is not NONE.`
Required even when
aberration_correctionisNONE.
- property orientation_representation
The representation of the result transformation.
- Parameters:
orientation_representation (str) –
Orientation result transformation. One of:
EULER_ANGLES
ANGLE_AND_AXIS
SPICE_QUATERNION
OTHER_QUATERNION
MATRIX_ROW_BY_ROW
MATRIX_FLAGGED
MATRIX_ALL_ONE_ROW
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property axis_1
The first axis for Euler angle rotation.
- Parameters:
axis_1 (str) – Axis name. See:
axis().
- property axis_2
The second axis for Euler angle rotation.
- Parameters:
axis_3 (str) – Axis name. See:
axis().
- property axis_3
The third axis for Euler angle rotation.
- Parameters:
axis_3 (str) – Axis name. See:
axis().
- axis(name, val)[source]
Axis for Euler angle rotation.
- Parameters:
name (str) –
Axis name. One of:
X
Y
Z
val (float) – Value on the axis.
- Returns:
Value on the axis.
- Return type:
float
- Raises:
CalculationInvalidAttr – If the
nameprovided is invalid.CalculationUndefinedAttr – If
orientation_representationis not supplied.CalculationIncompatibleAttr – If
orientation_representationis notEULER_ANGLES.
- property angular_units
The angular units.
- Parameters:
angular_units (str) –
The angular units used for the angle of rotation. One of:
deg
rad
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr – If
orientation_representationis not supplied.CalculationIncompatibleAttr – If
orientation_representationis not EULER_ANGLES or ANGLE_AND_AXIS.
- property angular_velocity_representation
Angular velocity representation.
- Parameters:
angular_velocity_representation (str) –
The representation of angular velocity in the output. One of:
NOT_INCLUDED
VECTOR_IN_FRAME1
VECTOR_IN_FRAME2
EULER_ANGLE_DERIVATIVES
MATRIX
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property angular_velocity_units
The units for the angular velocity.
- Parameters:
angular_velocity_units (str) –
One of:
deg/s
rad/s
RPM
Unitary (ie, Unit vector)
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr – If
angular_velocity_representationis not supplied.CalculationIncompatibleAttr – If
angular_velocity_representationis notVECTOR_IN_FRAME1,VECTOR_IN_FRAME2orEULER_ANGLE_DERIVATIVESCalculationIncompatibleAttr – If
Unitaryselected butangular_velocity_representationis notVECTOR_IN_FRAME1orVECTOR_IN_FRAME2.
- property coordinate_representation
Coordinate representation.
- Parameters:
coordinate_representation (str) –
One of:
RECTANGULARRA_DECLATITUDINAL(planetocentric)PLANETODETIC(not forPOINTING_DIRECTION)PLANETOGRAPHIC(not forPOINTING_DIRECTION)CYLINDRICALSPHERICALAZ_EL(not forTANGENT_POINT)
Note
For
TANGENT_POINTcalculation, it corresponds to the coordinate system to represent both the Tangent point and the point on the surface’s target nearest to the target point.- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property latitude
Latitude of the surface point.
- Parameters:
latitude (float) – Latitude angle (in degrees).
- Raises:
CalculationInvalidValue – If
latitudenot in [-90, +90] range.
- property longitude
Longitude of the surface point.
- Parameters:
longitude (float) – Longitude angle (in degrees).
- Raises:
CalculationInvalidValue – If
longitudenot in [-180, +180] range.
- property sub_point_type
Sub-observer point.
- Parameters:
sub_point_type (str) –
The method of finding the sub-observer point, as in the SPICE
subpnt()API call. One of:Near point: ellipsoid
Intercept: ellipsoid
NADIR/DSK/UNPRIORITIZED
INTERCEPT/DSK/UNPRIORITIZED
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property direction_vector_type
Type of ray’s direction vector.
- Parameters:
direction_vector_type (str) –
Type of vector to be used as the ray direction: the instrument boresight vector, the instrument field-of-view boundary vectors, an axis of the specified reference frame, a vector in the reference frame of the specified instrument, a vector in the specified reference frame, or a vector defined by the position of a given object as seen from the observer.
One of:
INSTRUMENT_BORESIGHT(the instrument boresight vector)INSTRUMENT_FOV_BOUNDARY_VECTORS(the instrument field-of-view boundary vectors)REFERENCE_FRAME_AXIS(an axis of the specified reference frame)VECTOR_IN_INSTRUMENT_FOV(a vector in the reference frame of the specified instrument)VECTOR_IN_REFERENCE_FRAME(a vector in the specified reference frame)DIRECTION_TO_OBJECT(only for ``TANGENT_POINT`` calculation)
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationRequiredAttr – If this parameter is
INSTRUMENT_BORESIGHT,INSTRUMENT_FOV_BOUNDARY_VECTORSorVECTOR_IN_INSTRUMENT_FOVbutdirection_instrumentis not provided.CalculationRequiredAttr – If this parameter is
REFERENCE_FRAME_AXISorVECTOR_IN_REFERENCE_FRAMEbutdirection_frameis not provided.CalculationRequiredAttr – If this parameter is
REFERENCE_FRAME_AXISbutdirection_frame_axisis not provided.CalculationRequiredAttr – If this parameter is
DIRECTION_TO_OBJECTbutdirection_objectis not provided.CalculationIncompatibleAttr – If this parameter is
DIRECTION_TO_OBJECTbut butcalculation_typeis notTANGENT_POINT.CalculationUndefinedAttr – If this parameter is
VECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEbut neitherdirection_vector_x,direction_vector_yanddirection_vector_znordirection_vector_raanddirection_vector_decare provided.
- property direction_object
Direction object.
- Parameters:
direction_object (str or int) – The ephemeris object
nameorid. Required only ifdirection_vector_typeisDIRECTION_TO_OBJECT.- Raises:
CalculationUndefinedAttr – If
direction_vector_typeis not provided.CalculationIncompatibleAttr – If
direction_vector_typenot inDIRECTION_TO_OBJECT.
- property direction_instrument
Direction instrument.
- Parameters:
direction_instrument (str or int) – The instrument
nameorid.- Raises:
CalculationUndefinedAttr – If
direction_vector_typeis not provided.CalculationIncompatibleAttr – If
direction_vector_typenot inINSTRUMENT_BORESIGHT,INSTRUMENT_FOV_BOUNDARY_VECTORSorVECTOR_IN_INSTRUMENT_FOV.
- property direction_frame
Direction vector reference frame.
- Parameters:
direction_frame (str) – The vector’s reference frame
name.- Raises:
CalculationUndefinedAttr – If
direction_vector_typeis not provided.CalculationIncompatibleAttr – If
direction_vector_typeis not inREFERENCE_FRAME_AXISorVECTOR_IN_REFERENCE_FRAME.
- property direction_frame_axis
The vector’s reference frame axis name.
- Parameters:
direction_frame (str) –
The vector’s reference frame axis. One of:
X
Y
Z
- Raises:
CalculationUndefinedAttr – If
direction_vector_typeis not provided.CalculationIncompatibleAttr – If
direction_vector_typeis notREFERENCE_FRAME_AXIS.CalculationInvalidAttr – If the value provided is invalid.
- direction_vector(axis, val)[source]
Direction vector coordinate.
- Parameters:
axis (str) – Axis name.
val (float) – Value on the axis.
- Raises:
CalculationUndefinedAttr – If
direction_vector_typeis not provided.CalculationIncompatibleAttr – If
direction_vector_typeis not inVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAME.
- property direction_vector_x
The X ray’s direction vector coordinate.
- Parameters:
direction_vector_x (float) – Direction x-coordinate. See
direction_vector().
- property direction_vector_y
The Y ray’s direction vector coordinate.
- Parameters:
direction_vector_y (float) – Direction y-coordinate. See
direction_vector().
- property direction_vector_z
The Z ray’s direction vector coordinate.
- Parameters:
direction_vector_z (float) – Direction z-coordinate. See
direction_vector().
- property direction_vector_ra
The right-ascension ray’s direction vector coordinate.
- Parameters:
direction_vector_ra (float) – Direction RA-coordinate. See
direction_vector().
- property direction_vector_dec
The declination ray’s direction vector coordinate.
- Parameters:
direction_vector_dec (float) – Direction DEC-coordinate. See
direction_vector().
- property direction_vector_az
The azimuth ray’s direction vector coordinate.
- Parameters:
direction_vector_az (float) – Direction Azimuth-coordinate. See
direction_vector().
- property direction_vector_el
The elevation ray’s direction vector coordinate.
- Parameters:
direction_vector_el (float) – Direction elevation-coordinate. See
direction_vector().
- property azccw_flag
Flag indicating how azimuth is measured.
If
azccw_flagisTrue, azimuth increases in the counterclockwise direction; otherwise it increases in the clockwise direction.Required only when
coordinate_representationis set toAZ_ELinPOINTING_DIRECTIONcalculation ordirection_vector_azis set inTANGENT_POINTcalculation.- Parameters:
azccw_flag (bool or str) – Azimuth orientation.
- Raises:
CalculationInvalidValue – If
azccw_flagnot a boolean.
- property elplsz_flag
Flag indicating how elevation is measured.
If
elplsz_flagisTrue, elevation increases from the XY plane toward +Z; otherwise toward -Z.Required only when
coordinate_representationis set toAZ_ELinPOINTING_DIRECTIONcalculation ordirection_vector_elis set inTANGENT_POINTcalculation.- Parameters:
elplsz_flag (bool or str) – Azimuth orientation.
- Raises:
CalculationInvalidValue – If
elplsz_flagnot a boolean.
- property output_duration_units
Output duration time units.
Time units to use for displaying the duration of each interval found by the event search.
- Parameters:
output_duration_units (str) –
One of the following:
SECONDS
MINUTES
HOURS
DAYS
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property should_complement_window
Specifies whether to complement the intervals in the result window.
That is, instead of finding the intervals where the condition is satisfied, find the intervals where the condition is not satisfied.
- Parameters:
should_complement_window (bool) – Complement result window
- Raises:
TypeError – If the value provided is not bool type.
- property interval_adjustment
Specifies whether to expand or contract the intervals in the result.
Expanding the intervals will cause intervals that overlap, after expansion, to be combined into one interval.
- Parameters:
interval_adjustment (str) –
One of the following:
NO_ADJUSTMENT
EXPAND_INTERVALS
CONTRACT_INTERVALS
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property interval_adjustment_amount
The amount by which to expand or contract each interval at the endpoints.
Each endpoint will be moved by this amount.
- Parameters:
interval_adjustment_amount (float)
- Raises:
CalculationUndefinedAttr: – If
interval_adjustment_unitsis not supplied
- property interval_adjustment_units
The unit of the interval adjustment amount.
- Parameters:
interval_adjustment_units (str) –
One of the following:
SECONDS
MINUTES
HOURS
DAYS
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr: – If
interval_adjustment_amountis not supplied
- property interval_filtering
Specifies whether to omit interval smaller than a minimum threshold size.
This threshold is applied after expansion or contraction of the intervals.
- Parameters:
interval_filtering (str) –
One of the following:
NO_FILTERING
OMIT_INTERVALS_SMALLER_THAN_A_THRESHOLD
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property interval_filtering_threshold
Interval duration filtering threshold value.
- Parameters:
interval_filtering_threshold (float) – Interval duration filtering threshold value.
- Raises:
CalculationUndefinedAttr: – If
interval_filtering_threshold_unitsis not supplied
- property interval_filtering_threshold_units
Units of the interval duration filtering threshold value.
- Parameters:
interval_filtering_threshold_units (str) –
One of the following:
SECONDS
MINUTES
HOURS
DAYS
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr: – If
interval_filtering_thresholdis not supplied
- property coordinate_system
The name of the coordinate system in which to evaluate the coordinate.
Only required for GF_COORDINATE_SEARCH, GF_SUB_POINT_SEARCH, and GF_SURFACE_INTERCEPT_POINT_SEARCH.
- Parameters:
coordinate_system (str) –
One of the following:
RECTANGULAR
RA/DEC
LATITUDINAL (planetocentric)
CYLINDRICAL
SPHERICAL
GEODETIC
PLANETOGRAPHIC
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property coordinate
The name of the SPICE coordinate to search on.
Only needed for GF_COORDINATE_SEARCH, GF_SUB_POINT_SEARCH, and GF_SURFACE_INTERCEPT_POINT_SEARCH.
- Parameters:
coordinate (str) –
One of the following:
X
Y
Z
LONGITUDE
LATITUDE
COLATITUDE
RIGHT ASCENSION
DECLINATION
RANGE
RADIUS
ALTITUDE
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
- property relational_condition
The relationship for the geometry finder test.
- Parameters:
relational_condition (str) –
One of the following:
=
<
>
RANGE
ABSMAX
ABSMIN
LOCMAX
LOCMIN
- Raises:
CalculationInvalidAttr – If the value provided is invalid.
CalculationUndefinedAttr: – If the value is
RANGE`, and :py:attr:`upper_limit` is not supplied. If the value is ``ABSMINorABSMAX, andadjustment_valueis not supplied. If the value is=,<,>orRANGE, andreference_valueis not supplied.
- property reference_value
The value to compare against, or the lower value of a range.
Only needed if relationalCondition is not ABSMAX, ABSMIN, LOCMAX, or LOCMIN.
- Parameters:
reference_value (float)
- property upper_limit
The upper limit of a range. Only needed if relationalCondition is RANGE.
- Parameters:
upper_limit (float)
- property adjustment_value
The adjustment value to apply for ABSMIN and ABSMAX searches.
Required if relationalCondition is ABSMIN or ABSMAX.
- Parameters:
adjustment_value (float)
- gf_condition(**kwargs)[source]
Geometry Finder condition object.
See the documentation for gfposc() for more details.
- Raises:
CalculationUndefinedAttr: – If
calculation_typeisGF_COORDINATE_SEARCH,GF_SUB_POINT_SEARCHorGF_SURFACE_INTERCEPT_POINT_SEARCH, andcoordinate_systemorcoordinateare not present.
State Vector
Calculates the position of one body relative to another, calculated in a desired reference frame:
>>> StateVector(
... kernels = 5,
... times = '2012-10-19T09:00:00',
... target = 'CASSINI',
... observer = 'SATURN',
... reference_frame = 'IAU_SATURN',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 09:00:00.000000 UTC',
'DISTANCE': 764142.65053372,
'SPEED': 111.54765158,
'X': 298293.06093747,
'Y': -651606.39373107,
'Z': 265225.08895284,
'D_X_DT': -98.80322113,
'D_Y_DT': -51.73215012,
'D_Z_DT': -2.14166057,
'TIME_AT_TARGET': '2012-10-19 08:59:57.451094 UTC',
'LIGHT_TIME': 2.54890552}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARstate_representation:RECTANGULAR
- class webgeocalc.StateVector(aberration_correction='CN', state_representation='RECTANGULAR', **kwargs)[source]
Bases:
CalculationState vector calculation.
Calculates the position of one body relative to another, calculated in a desired reference frame.
- Parameters:
aberration_correction (str, optional) – See:
aberration_correctionstate_representation (str, optional) – See:
state_representationkernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formattarget (str or int) – See:
targetobserver (str or int) – See:
observerreference_frame (str or int) – See:
reference_frame
- Raises:
CalculationRequiredAttr – If
target,observerandreference_frameare not provided.
Angular Separation
Calculates the angular separation of two bodies/directions as seen
by an observer body. There are two types of calculation. The default
one is the angular separation between two targets (TWO_TARGETS
mode), which is the default mode.
>>> AngularSeparation(
... kernel_paths = ['pds/wgc/kernels/lsk/naif0012.tls',
... 'pds/wgc/kernels/spk/de430.bsp'],
... times = '2012-10-19T08:24:00.000',
... target_1 = 'VENUS',
... target_2 = 'MERCURY',
... observer = 'SUN',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC', 'ANGULAR_SEPARATION': 175.17072258}
The second case is the angular separation between two directions
(TWO_DIRECTIONS mode).
>>> AngularSeparation(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... spec_type = 'TWO_DIRECTIONS',
... direction_1 = {
... 'direction_type': 'VECTOR',
... 'direction_vector_type': 'REFERENCE_FRAME_AXIS',
... 'direction_frame': 'CASSINI_RPWS_EDIPOLE',
... 'direction_frame_axis': 'Z'
... },
... direction_2 = {
... 'direction_type': 'POSITION',
... 'target': 'SUN',
... 'shape': 'POINT',
... 'observer': 'CASSINI'
... },
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC', 'ANGULAR_SEPARATION': 90.10114616}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
spec_type:TWO_TARGETStime_system:UTCtime_format:CALENDAR
- Additional required parameters for
TWO_TARGETS: - Additional default parameters for
TWO_TARGETS: - Additional required parameters for
TWO_DIRECTIONS:
Hint
The directions can be specified either with an explicit dict
or with a Direction object:
>>> from webgeocalc.direction import Direction
>>> AngularSeparation(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... spec_type = 'TWO_DIRECTIONS',
... direction_1 = Direction(
... direction_type = 'VECTOR',
... direction_vector_type = 'REFERENCE_FRAME_AXIS',
... direction_frame = 'CASSINI_RPWS_EDIPOLE',
... direction_frame_axis = 'Z',
... ),
... direction_2 = Direction(
... direction_type = 'POSITION',
... target = 'SUN',
... shape = 'POINT',
... observer = 'CASSINI',
... ),
... )
- class webgeocalc.AngularSeparation(spec_type='TWO_TARGETS', aberration_correction='CN', **kwargs)[source]
Bases:
CalculationAngular separation calculation.
Calculates the angular separation of two bodies as seen by an observer body. There are two types of calculation. The default one is the angular separation between two targets (
TWO_TARGETSmode). The second case is the angular separation between two directions (TWO_DIRECTIONSmode).- Parameters:
kernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formatspec_type (str, optional) – See:
spec_typeeitherTWO_TARGETS(default) orTWO_DIRECTIONS.TWO_TARGETS (Required parameters)
target_1 (str or int) – See:
target_1shape_1 (str, optional) – See:
shape_1(default:POINT)target_2 (str or int) – See:
target_2shape_2 (str, optional) – See:
shape_2(default:POINT)observer (str or int) – See:
observeraberration_correction (str, optional) – See:
aberration_correctionTWO_DIRECTIONS (Required parameters)
direction_1 (dict or Direction) – See:
direction_1direction_2 (dict or Direction) – See:
direction_2
- Raises:
CalculationRequiredAttr – If
spec_typeisTWO_TARGETSor not set: If py:attr:target_1,target_2orobserverare not provided. Ifspec_typeisTWO_DIRECTIONS: Ifdirection_1ordirection_2are not provided.
Angular Size
Calculates the angular size of a target as seen by an observer.
>>> AngularSize(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... target = 'ENCELADUS',
... observer = 'CASSINI',
... aberration_correction = 'CN+S',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC', 'ANGULAR_SIZE': 0.03032491}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDAR
- class webgeocalc.AngularSize(aberration_correction='CN', **kwargs)[source]
Bases:
CalculationAngular size calculation.
Calculates the angular size of a target as seen by an observer.
- Parameters:
aberration_correction (str, optional) – See:
aberration_correctionkernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formattarget (str or int) – See:
targetobserver (str or int) – See:
observer
- Raises:
CalculationRequiredAttr – If
targetandobserverare not provided.
Frame Transformation
Calculate the transformation from one reference frame (Frame 1) to another reference frame (Frame 2).
>>> FrameTransformation(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... frame_1 = 'IAU_SATURN',
... frame_2 = 'IAU_ENCELADUS',
... aberration_correction = 'NONE',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC',
'ANGLE3': -19.59511576,
'ANGLE2': -0.00533619,
'ANGLE1': -0.00345332,
'AV_X': -2.8406831e-07,
'AV_Y': 1.83751477e-07,
'AV_Z': -0.00633942,
'AV_MAG': 0.00633942}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARtime_location:FRAME1,orientation_representation:EULER_ANGLES,axis_1:X,axis_2:Y,axis_3:Z,angular_units:deg,angular_velocity_representation:VECTOR_IN_FRAME1,angular_velocity_units:deg/s’
- class webgeocalc.FrameTransformation(aberration_correction='CN', time_location='FRAME1', orientation_representation='EULER_ANGLES', axis_1='X', axis_2='Y', axis_3='Z', angular_units='deg', angular_velocity_representation='VECTOR_IN_FRAME1', angular_velocity_units='deg/s', **kwargs)[source]
Bases:
CalculationFrame transform calculation.
Calculate the transformation from one reference frame (Frame 1) to another reference frame (Frame 2).
- Parameters:
aberration_correction (str, optional) – See:
aberration_correctiontime_location (str, optional) – See:
time_locationorientation_representation (str, optional) – See:
orientation_representationaxis_1 (str, optional) – See:
axis_1axis_2 (str, optional) – See:
axis_2axis_3 (str, optional) – See:
axis_3angular_units (str, optional) – See:
angular_unitsangular_velocity_representation (str, optional) – See:
angular_velocity_representationangular_velocity_units (str, optional) – See:
angular_velocity_units
Warning
Attribute
aberration_correctionmust beNONE, LT`,CN,XLTorXCN.Attributes
axis_1,axis_2andaxis_3are imported only iforientation_representationisEULER_ANGLES.Attribute
angular_unitsis imported only iforientation_representationisEULER_ANGLESorANGLE_AND_AXIS.Attribute
angular_velocity_unitsis imported only ifangular_velocity_representationisVECTOR_IN_FRAME1,VECTOR_IN_FRAME2orEULER_ANGLE_DERIVATIVES.- Parameters:
kernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formatframe_1 (str or int) – See:
frame_1frame_2 (str or int) – See:
frame_2
- Raises:
CalculationRequiredAttr – If
frame_1andframe_2are not provided.CalculationInvalidAttr – If
aberration_correctionis inLT+S,CN+S,XLT+SorXCN+S.
Illumination Angles
Calculate the emission, phase and solar incidence angles at a point on a target as seen from an observer.
>>> IlluminationAngles(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... target = 'ENCELADUS',
... target_frame = 'IAU_ENCELADUS',
... observer = 'CASSINI',
... aberration_correction = 'CN+S',
... latitude = 0.0,
... longitude = 0.0,
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC',
'INCIDENCE_ANGLE': 25.51886414,
'EMISSION_ANGLE': 26.31058362,
'PHASE_ANGLE': 1.00106425,
'OBSERVER_ALTITUDE': 967670.28784259,
'TIME_AT_POINT': '2012-10-19 08:23:56.772199 UTC',
'LIGHT_TIME': 3.22780064,
'LTST': '13:19:56'}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARshape_1:ELLIPSOIDcoordinate_representation:LATITUDINAL
- class webgeocalc.IlluminationAngles(shape_1='ELLIPSOID', coordinate_representation='LATITUDINAL', aberration_correction='CN', **kwargs)[source]
Bases:
CalculationIllumination angles calculation.
Calculate the emission, phase and solar incidence angles at a point on a target as seen from an observer.
- Parameters:
shape_1 (str, optional) – See:
shape_1coordinate_representation (str, optional) – See:
coordinate_representationaberration_correction (str, optional) – See:
aberration_correctionkernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formattarget (str or int) – See:
targettarget_frame (str or int) – See:
target_frameobserver (str or int) – See:
observerlatitude (str or int) – See:
latitudelongitude (str or int) – See:
longitude
- Raises:
CalculationRequiredAttr – If
target,target_frame,observer,latitudeandlongitudeare not provided.CalculationInvalidAttr – If
shape_1is notELLIPSOIDorDSK.
Phase Angle
Calculate the phase angle defined by the centers of an illumination source, a target and an observer.
The phase angle is computed using the location of the bodies (if point objects) or the center of the bodies (if finite bodies). The range of the phase angle is [0, pi].
>>> PhaseAngle(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... target = 'ENCELADUS',
... target_frame = 'IAU_ENCELADUS',
... observer = 'CASSINI',
... illuminator = 'SUN',
... aberration_correction = 'CN+S',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC', 'PHASE_ANGLE': 0.99571442}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
illuminator:SUN
- class webgeocalc.PhaseAngle(illuminator='SUN', aberration_correction='CN', **kwargs)[source]
Bases:
CalculationPhase angle calculation.
Calculate the phase angle defined by the centers of an illumination source, a target and an observer.
The phase angle is computed using the location of the bodies (if point objects) or the center of the bodies (if finite bodies).
The range of the phase angle is [0, pi].
- Parameters:
target (str or int) – See:
targetobserver (str or int) – See:
observerilluminator (str or int, optional) – See:
illuminator(default:SUN)aberration_correction (str, optional) – See:
aberration_correction(default:CN)kernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_format
- Raises:
CalculationRequiredAttr – If
targetorobserverare not provided.
Pointing Direction
Calculates the pointing direction in a user specified reference frame and output it as a unit or full magnitude vector represented in a user specified coordinate system.
The direction can be specified by the position or velocity of an object with respect to an observer, or by directly providing a vector, which could be specified as coordinate in a given frame, a frame axis, an instrument boresight, or as instrument FoV corner vectors.
The output reference frame may be different than the one used for specification of the input vector (if such option is selected). If so, the orientations of both frames relative to the inertial space are computed at the same time taking into account the aberration corrections given in the direction specification.
The output direction could be given as unit or non-unit vector in Rectangular, Azimuth/Elevation, Right Ascension/Declination/Range, Planetocentric, Cylindrical, or Spherical coordinates.
>>> PointingDirection(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... direction = {
... 'direction_type': 'VECTOR',
... 'observer': 'Cassini',
... 'direction_vector_type': 'INSTRUMENT_FOV_BOUNDARY_VECTORS',
... 'direction_instrument': 'CASSINI_ISS_NAC',
... 'aberration_correction': 'CN',
... },
... reference_frame = 'J2000',
... coordinate_representation = 'RA_DEC',
... verbose = False,
... ).run()
{'DATE': ['2012-10-19 08:24:00.000000 UTC',
'2012-10-19 08:24:00.000000 UTC',
'2012-10-19 08:24:00.000000 UTC',
'2012-10-19 08:24:00.000000 UTC'],
'BOUNDARY_POINT_NUMBER': [1.0, 2.0, 3.0, 4.0],
'RIGHT_ASCENSION': [209.67659835, 209.39258312, 209.60578464, 209.88990474],
'DECLINATION': [-9.57807208, -9.78811104, -10.06810257, -9.85788588],
'RANGE': [1.0, 1.0, 1.0, 1.0]}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
vector_magnitude:UNITcoordinate_representation:RECTANGULARtime_system:UTCtime_format:CALENDAR
- Additional required parameters for
coordinate_representation='AZ_EL':
Hint
The direction can be specified either with an explicit dict
or with a Direction object (see AngularSeparation
with TWO_DIRECTIONS).
- class webgeocalc.PointingDirection(vector_magnitude='UNIT', coordinate_representation='RECTANGULAR', **kwargs)[source]
Bases:
CalculationPointing direction calculation.
Calculates the pointing direction in a user specified reference frame and output it as a unit or full magnitude vector represented in a user specified coordinate system.
The direction can be specified by the position or velocity of an object with respect to an observer, or by directly providing a vector, which could be specified as coordinates in a given frame, a frame axis, an instrument boresight, or as instrument FoV corner vectors.
The output reference frame may be different than the one used for specification of the input vector (if such option is selected). If so, the orientations of both frames relative to the inertial space are computed at the same time taking into account the aberration corrections given in the direction specification.
The output direction could be given as unit or non-unit vector in Rectangular, Azimuth/Elevation, Right Ascension/Declination/Range, Planetocentric, Cylindrical, or Spherical coordinates.
- Parameters:
direction (dict or Direction) – See:
directionreference_frame (str or int) – See:
reference_framevector_magnitude (str, optional) – See:
vector_magnitude(default:UNIT)coordinate_representation (str, optional) – See:
coordinate_representation(default:RECTANGULAR)kernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formatAZ_EL (Required parameters)
azccw_flag (bool or str) – See:
azccw_flagelplsz_flag (bool or str) – See:
elplsz_flag
- Raises:
CalculationRequiredAttr – If
targetorreference_frameare not provided.
Sub Solar Point
Calculates the sub-solar point on a target as seen from an observer.
>>> SubSolarPoint(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... target = 'ENCELADUS',
... target_frame = 'IAU_ENCELADUS',
... observer = 'CASSINI',
... aberration_correction = 'CN+S',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC',
'X': 232.15437562,
'Y': -81.18742303,
'Z': 67.66010394,
'SUB_POINT_RADIUS': 255.07830453,
'OBSERVER_ALTITUDE': 967644.95641522,
'INCIDENCE_ANGLE': 1.10177646e-14,
'EMISSION_ANGLE': 0.99615507,
'PHASE_ANGLE': 0.99615507,
'TIME_AT_POINT': '2012-10-19 08:23:56.772284 UTC',
'LIGHT_TIME': 3.22771614}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARsub_point_type:Near point: ellipsoidstate_representation:RECTANGULAR
- class webgeocalc.SubSolarPoint(sub_point_type='Near point: ellipsoid', aberration_correction='CN', state_representation='RECTANGULAR', **kwargs)[source]
Bases:
CalculationSub-solar point calculation.
Calculates the sub-solar point on a target as seen from an observer.
- Parameters:
sub_point_type (str, optional) – See:
sub_point_typeaberration_correction (str, optional) – See:
aberration_correctionstate_representation (str, optional) – See:
state_representation
Warning
Attribute
aberration_correctionmust beNONE, LT`,LT+S,CNorCN+S.- Parameters:
kernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formattarget (str or int) – See:
targettarget_frame (str or int) – See:
target_frameobserver (str or int) – See:
observer
- Raises:
CalculationRequiredAttr – If
target,target_frameandobserverare not provided.CalculationInvalidAttr – If
aberration_correctionis inXLT,XLT+S,XCN+SorXCN+S.
Sub Observer Point
Calculate the sub-observer point on a target as seen from an observer.
>>> SubObserverPoint(
... kernels = 5,
... times = '2012-10-19T08:24:00.000',
... target = 'ENCELADUS',
... target_frame = 'IAU_ENCELADUS',
... observer = 'CASSINI',
... aberration_correction = 'CN+S',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC',
'X': 230.66149425,
'Y': -85.24005493,
'Z': 67.58656174,
'SUB_POINT_RADIUS': 255.02653827,
'OBSERVER_ALTITUDE': 967644.91882136,
'INCIDENCE_ANGLE': 0.99589948,
'EMISSION_ANGLE': 3.94425842e-12,
'PHASE_ANGLE': 0.99589948,
'TIME_AT_POINT': '2012-10-19 08:23:56.772284 UTC',
'LIGHT_TIME': 3.22771602,
'LTST': '11:58:49'}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARsub_point_type:Near point: ellipsoidstate_representation:RECTANGULAR
- class webgeocalc.SubObserverPoint(sub_point_type='Near point: ellipsoid', aberration_correction='CN', state_representation='RECTANGULAR', **kwargs)[source]
Bases:
CalculationSub-observer point calculation.
Calculate the sub-observer point on a target as seen from an observer.
- Parameters:
sub_point_type (str, optional) – See:
sub_point_typeaberration_correction (str, optional) – See:
aberration_correctionstate_representation (str, optional) – See:
state_representationkernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formattarget (str or int) – See:
targettarget_frame (str or int) – See:
target_frameobserver (str or int) – See:
observer
- Raises:
CalculationRequiredAttr – If
target,target_frameandobserverare not provided.
Surface Intercept Point
Calculate the intercept point of a vector or vectors on a target as seen from an observer.
>>> SurfaceInterceptPoint(
... kernels = 5,
... times = '2012-10-14T00:00:00',
... target = 'SATURN',
... target_frame = 'IAU_SATURN',
... observer = 'CASSINI',
... direction_vector_type = 'INSTRUMENT_BORESIGHT',
... direction_instrument = 'CASSINI_ISS_NAC',
... aberration_correction = 'NONE',
... state_representation = 'LATITUDINAL',
... verbose = False,
... ).run()
{'DATE': '2012-10-14 00:00:00.000000 UTC',
'LONGITUDE': 98.76797447,
'LATITUDE': -38.69300277,
'INTERCEPT_RADIUS': 57739.67660691,
'OBSERVER_ALTITUDE': 1831047.98047459,
'INCIDENCE_ANGLE': 123.05303919,
'EMISSION_ANGLE': 5.8595724,
'PHASE_ANGLE': 123.7753032,
'TIME_AT_POINT': '2012-10-14 00:00:00.000000 UTC',
'LIGHT_TIME': 6.10771863,
'LTST': '20:03:06'}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARshape_1:ELLIPSOIDintercept_vector_type:INSTRUMENT_BORESIGHTstate_representation:RECTANGULAR
- class webgeocalc.SurfaceInterceptPoint(shape_1='ELLIPSOID', direction_vector_type='INSTRUMENT_BORESIGHT', aberration_correction='CN', state_representation='RECTANGULAR', **kwargs)[source]
Bases:
CalculationSurface intercept point calculation.
Calculate the intercept point of a vector or vectors on a target as seen from an observer.
- Parameters:
shape_1 (str, optional) – See:
shape_1direction_vector_type (str, optional) – See:
direction_vector_typeaberration_correction (str, optional) – See:
aberration_correctionstate_representation (str, optional) – See:
state_representationkernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formattarget (str or int) – See:
targettarget_frame (str or int) – See:
target_frameobserver (str or int) – See:
observerdirection_instrument (str or int) – See:
direction_instrumentdirection_frame (str) – See:
direction_framedirection_frame_axis (str) – See:
direction_frame_axisdirection_vector_x (float) – See:
direction_vector_xdirection_vector_y (float) – See:
direction_vector_ydirection_vector_z (float) – See:
direction_vector_zdirection_vector_ra (float) – See:
direction_vector_radirection_vector_dec (float) – See:
direction_vector_dec
Warning
Attributes
direction_instrumentis needed only ifdirection_vector_typeisINSTRUMENT_BORESIGHT,INSTRUMENT_FOV_BOUNDARY_VECTORSorVECTOR_IN_INSTRUMENT_FOV.Attributes
direction_frameis needed only ifdirection_vector_typeisREFERENCE_FRAME_AXISorVECTOR_IN_REFERENCE_FRAME.Attributes
direction_vector_x+direction_vector_y+direction_vector_zordirection_vector_ra+direction_vector_decis needed only ifdirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAME.- Raises:
CalculationRequiredAttr – If
target,target_frameandobserverare not provided.CalculationInvalidAttr – If
shape_1is notELLIPSOIDorDSK.
Tangent Point
Calculate the tangent point for a given observer, ray emanating from the observer, and target.
The tangent point is defined as the point on the ray nearest to the target’s surface. This panel also computes the point on the target’s surface nearest to the tangent point. The locations of both points are optionally corrected for light time and stellar aberration, and may be represented using either Rectangular, Ra/Dec, Planetocentric, Planetodetic, Planetographic, Spherical or Cylindrical coordinates.
The target’s surface shape is modeled as a triaxial ellipsoid.
For remote sensing observations, for maximum accuracy, reception light time and stellar aberration corrections should be used. These corrections model observer-target-ray geometry as it is observed.
For signal transmission applications, for maximum accuracy, transmission light time and stellar aberration corrections should be used. These corrections model the observer-target-ray geometry that applies to the transmitted signal. For example, these corrections are needed to calculate the minimum altitude of the signal’s path over the target body.
This calculation ignores differential aberration effects over the target body’s surface: it computes corrections only at a user-specified point, which is called the “aberration correction locus.” The user may select either the Tangent point or corresponding Surface point as the locus. In many cases, the differences between corrections for these points are very small.
Additionally, the illumination angles (incidence, emission and phase), time and local true solar time at the target point (where the aberration correction locus is set – or at the tangent point if no corrections are used), and the light time to that point, are computed.
>>> TangentPoint(
... kernels = 5,
... times = '2010-11-30T14:02:00',
... target = 'ENCELADUS',
... target_frame = 'IAU_ENCELADUS',
... computation_method = 'ELLIPSOID',
... observer = 'CASSINI',
... direction_vector_type = 'INSTRUMENT_BORESIGHT',
... direction_instrument = 'CASSINI_UVIS_HSP',
... aberration_correction = 'CN+S',
... correction_locus = 'TANGENT_POINT',
... coordinate_representation = 'RECTANGULAR',
... verbose = False,
... ).run()
{'DATE': '2010-11-30 14:02:00.000000 UTC',
'TANGENT_POINT_GEOMETRY': 'Ray above limb',
'TANGENT_POINT_X': -9.48919159,
'TANGENT_POINT_Y': 36.16728915,
'TANGENT_POINT_Z': -330.78398864,
'SURFACE_POINT_X': -7.19366254,
'SURFACE_POINT_Y': 27.15497998,
'SURFACE_POINT_Z': -247.12357543,
'DISTANCE_TO_TANGENT_POINT': 49830.33175196,
'TANGENT_POINT_ALTITUDE': 84.17574418,
'INCIDENCE_ANGLE': 97.72660812,
'EMISSION_ANGLE': 90.0185557,
'PHASE_ANGLE': 14.11694399,
'TIME_AT_POINT': '2010-11-30 14:01:59.833784 UTC',
'LIGHT_TIME': 0.1662161,
'LTST': '05:38:33'}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_unitsdirection_vector_type(see below the additional required parameters)
- Default parameters:
computation_method:ELLIPSOIDvector_ab_corr:NONE(only used forVECTOR_IN_REFERENCE_FRAME)coordinate_representation:RECTANGULARtime_system:UTCtime_format:CALENDAR
- Additional required parameters for
direction_vector_typeisINSTRUMENT_BORESIGHTorINSTRUMENT_FOV_BOUNDARY_VECTORS: - Additional required parameters for
direction_vector_typeisREFERENCE_FRAME_AXIS: - Additional required parameters for
direction_vector_typeisVECTOR_IN_INSTRUMENT_FOV: either
direction_vector_x,direction_vector_yanddirection_vector_zor
direction_vector_az,direction_vector_el,azccw_flagandelplsz_flag,
- Additional required parameters for
direction_vector_typeisVECTOR_IN_REFERENCE_FRAME: either
direction_vector_x,direction_vector_yanddirection_vector_zor
direction_vector_az,direction_vector_el,azccw_flagandelplsz_flag,
- Additional required parameters for
direction_vector_typeisDIRECTION_TO_OBJECT:
- class webgeocalc.TangentPoint(computation_method='ELLIPSOID', vector_ab_corr='NONE', aberration_correction='CN', coordinate_representation='RECTANGULAR', **kwargs)[source]
Bases:
CalculationTangent point calculation.
Calculate the tangent point for a given observer, ray emanating from the observer, and target.
The tangent point is defined as the point on the ray nearest to the target’s surface. This panel also computes the point on the target’s surface nearest to the tangent point. The locations of both points are optionally corrected for light time and stellar aberration, and may be represented using either Rectangular, Ra/Dec, Planetocentric, Planetodetic, Planetographic, Spherical or Cylindrical coordinates.
The target’s surface shape is modeled as a triaxial ellipsoid.
For remote sensing observations, for maximum accuracy, reception light time and stellar aberration corrections should be used. These corrections model observer-target-ray geometry as it is observed.
For signal transmission applications, for maximum accuracy, transmission light time and stellar aberration corrections should be used. These corrections model the observer-target-ray geometry that applies to the transmitted signal. For example, these corrections are needed to calculate the minimum altitude of the signal’s path over the target body.
This calculation ignores differential aberration effects over the target body’s surface: it computes corrections only at a user-specified point, which is called the “aberration correction locus.” The user may select either the Tangent point or corresponding Surface point as the locus. In many cases, the differences between corrections for these points are very small.
Additionally, the illumination angles (incidence, emission and phase), time and local true solar time at the target point (where the aberration correction locus is set – or at the tangent point if no corrections are used), and the light time to that point, are computed.
- Parameters:
target (str or int) – See:
targettarget_frame (str or int) – See:
target_frameobserver (str or int) – See:
observerdirection_vector_type (str) – See:
direction_vector_typedirection_object (str or int) – See:
direction_object. Only whendirection_vector_typeisDIRECTION_TO_OBJECTdirection_instrument (str or int) – See:
direction_instrument. Only whendirection_vector_typeisINSTRUMENT_BORESIGHT, ``INSTRUMENT_FOV_BOUNDARY_VECTORSorVECTOR_IN_INSTRUMENT_FOVdirection_frame (str) – See:
direction_frame. Only whendirection_vector_typeisREFERENCE_FRAME_AXISorVECTOR_IN_REFERENCE_FRAMEdirection_frame_axis (str) – See:
direction_frame_axis. Only whendirection_vector_typeisREFERENCE_FRAME_AXIS.direction_vector_x (float) – See:
direction_vector_x. Only whendirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEdirection_vector_y (float) – See:
direction_vector_y. Only whendirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEdirection_vector_z (float) – See:
direction_vector_z. Only whendirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEdirection_vector_ra (float) – See:
direction_vector_raOnly whendirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEdirection_vector_dec (float) – See:
direction_vector_decOnly whendirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEdirection_vector_az (float) – See:
direction_vector_azOnly whendirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEdirection_vector_el (float) – See:
direction_vector_elOnly whendirection_vector_typeisVECTOR_IN_INSTRUMENT_FOVorVECTOR_IN_REFERENCE_FRAMEazccw_flag (bool or str) – See:
azccw_flag. Only whendirection_vector_azis provided.elplsz_flag (bool or str) – See:
elplsz_flag. Only whendirection_vector_elis provided.computation_method (str, optional) – See:
computation_method(default:ELLIPSOID)vector_ab_corr (str, optional) – See:
vector_ab_corr(default:NONE)aberration_correction (str, optional) – See:
aberration_correction(default:CN)correction_locus (str, optional) – See:
correction_locus(required ifaberration_correctionis notNONE)coordinate_representation (str, optional) – See:
coordinate_representation(default:RECTANGULAR)kernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_format
- Raises:
CalculationRequiredAttr – If
target,reference_frame,observerordirection_vector_typeare not provided.CalculationRequiredAttr – If
aberration_correctionis notNONEandcorrection_locusis not provided.
Osculating Elements
Calculate the osculating elements of the orbit of a target body around a central body. The orbit may be elliptical, parabolic, or hyperbolic.
>>> OsculatingElements(
... kernels = [1,5],
... times = '2012-10-19T08:24:00.000',
... orbiting_body = 'CASSINI',
... center_body = 'SATURN',
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:24:00.000000 UTC',
'PERIFOCAL_DISTANCE': 474789.01814487,
'ECCENTRICITY': 0.70348464,
'INCLINATION': 38.18736036,
'ASCENDING_NODE_LONGITUDE': 223.98121958,
'ARGUMENT_OF_PERIAPSE': 71.59475294,
'MEAN_ANOMALY_AT_EPOCH': 14.65461277,
'ORBITING_BODY_RANGE': 753794.66333655,
'ORBITING_BODY_SPEED': 8.77222221,
'PERIOD': 2067101.1993984,
'CENTER_BODY_GM': 37931207.49865224}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARreference_frame:J2000
- class webgeocalc.OsculatingElements(reference_frame='J2000', **kwargs)[source]
Bases:
CalculationOsculating elements calculation.
Calculate the osculating elements of the orbit of a target body around a central body.
The orbit may be elliptical, parabolic, or hyperbolic.
- Parameters:
reference_frame (str, optional) – See:
reference_framekernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formatorbiting_body (str or int) – See:
orbiting_bodycenter_body (str or int) – See:
center_body
- Raises:
CalculationRequiredAttr – If
orbiting_bodyandcenter_bodyare not provided.
Time Conversion
Convert times from one time system or format to another.
>>> TimeConversion(
... kernels = 5,
... times = '1/1729329441.04',
... time_system = 'SPACECRAFT_CLOCK',
... time_format = 'SPACECRAFT_CLOCK_STRING',
... sclk_id = -82,
... verbose = False,
... ).run()
{'DATE': '1/1729329441.004', 'DATE2': '2012-10-19 08:24:02.919085 UTC'}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_units
- Default parameters:
time_system:UTCtime_format:CALENDARoutput_time_system:UTCoutput_time_format:CALENDAR
- class webgeocalc.TimeConversion(output_time_system='UTC', output_time_format='CALENDAR', **kwargs)[source]
Bases:
CalculationTime conversion calculation.
Convert times from one time system or format to another.
- Parameters:
output_time_system (str, optional) – See:
output_time_systemoutput_time_format (str, optional) – See:
output_time_formatkernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formatoutput_sclk_id (str) – See:
output_sclk_idoutput_time_custom_format (str) – See:
output_time_custom_format
Warning
Attributes
output_sclk_idis needed only ifoutput_time_systemisSPACECRAFT_CLOCK.Attributes
output_time_custom_formatis needed only ifoutput_time_formatisCUSTOM.
Geometry Finder: Coordinate Search
Find time intervals when a coordinate of an observer-target position vector satisfies a condition.
>>> GFCoordinateSearch(
... kernels = 5,
... intervals = ['2012-10-19T07:00:00', '2012-10-19T09:00:00'],
... observer = 'CASSINI',
... target = 'ENCELADUS',
... reference_frame = 'CASSINI_ISS_NAC',
... time_step = 1,
... time_step_units = 'MINUTES',
... aberration_correction = 'NONE',
... interval_adjustment = 'EXPAND_INTERVALS',
... interval_adjustment_amount = 1,
... interval_adjustment_units = 'SECONDS',
... interval_filtering = 'FILTER_INTERVALS',
... interval_filtering_threshold = 1,
... interval_filtering_threshold_units = 'MINUTES',
... coordinate_system = 'SPHERICAL',
... coordinate = 'COLATITUDE',
... relational_condition = '<',
... reference_value = 0.25,
... verbose = False,
... ).run()
{'DATE': '2012-10-19 08:39:33.814938 UTC', 'DURATION': 3394.11539114}
Important
- Calculation required parameters:
kernelsor/andkernel_pathstimesorintervalswithtime_stepandtime_step_unitsreference_valueonly ifrelational_conditionis notABSMAX,ABSMIN,LOCMAX, orLOCMINupper_limitonly ifrelational_conditionisRANGEadjustment_valueonly ifrelational_conditionisABSMAXorABSMIN
- Default parameters:
time_system:UTCtime_format:CALENDARoutput_duration_units:SECONDSshould_complement_window:Falseinterval_adjustment:NO_ADJUSTMENTinterval_filtering:NO_FILTERING
- class webgeocalc.GFCoordinateSearch(output_duration_units='SECONDS', should_complement_window=False, interval_adjustment='NO_ADJUSTMENT', interval_filtering='NO_FILTERING', aberration_correction='CN', **kwargs)[source]
Bases:
CalculationCoordinate Search (Geometry Finder) calculation.
Find time intervals when a coordinate of an observer-target position vector satisfies a condition.
- Parameters:
output_duration_units (str, optional) – See:
output_duration_unitsshould_complement_window (bool, optional) – See:
should_complement_windowinterval_adjustment (str, optional) – See:
interval_adjustmentinterval_filtering (str, optional) – See:
interval_filteringaberration_correction (str, optional) – See:
aberration_correctioncoordinate_system (str) – See:
coordinate_systemcoordinate (str) – See:
coordinaterelational_condition (str) – See:
relational_conditionreference_value (float, optional) – See:
reference_valueupper_limit (float, optional) – See:
upper_limitadjustment_value – See:
adjustment_valuefloat – See:
adjustment_valueoptional – See:
adjustment_valuekernels (str, int, [str or/and int]) – See:
kernelskernel_paths (str, [str]) – See:
kernel_pathstimes (str or [str]) – See:
timesintervals ([str, str] or {'startTime': str, 'endTime': str} or [interval, ...]) – See:
intervalstime_step (int) – See:
time_steptime_step_units (str) – See:
time_step_unitstime_system (str) – See:
time_systemtime_format (str) – See:
time_formattarget (str or int) – See:
targetobserver (str or int) – See:
observerreference_frame (str or int) – See:
reference_frame
Warning
Attributes
upper_limitis needed only ifrelational_conditionisRANGE.Attributes
adjustment_valueis needed only ifrelational_conditionisABSMINorABSMAX.Attribute
reference_valueis needed only ifrelational_conditionis=,<,>orRANGE.- Raises:
CalculationRequiredAttr – If
target,observer,reference_frame,coordinate_system,coordinate, orrelational_conditionare not provided.
Geometry Finder: other searches
At the moment, the following geometry finder search calculation are not implemented:
Note
You might be able to run some of them with a regular Calculation object but is not tested yet.
If you want to implement them, contributions are always welcome
(don’t forget to submit a merge request on the main project).
- class webgeocalc.GFAngularSeparationSearch(*_, **__)[source]
Bases:
CalculationNotImplementedAngular separation search geometry finder.
Find time intervals when the angle between two bodies, as seen by an observer, satisfies a condition.
- class webgeocalc.GFDistanceSearch(*_, **__)[source]
Bases:
CalculationNotImplementedDistance search geometry finder.
Find time intervals when the distance between a target and observer satisfies a condition.
- class webgeocalc.GFSubPointSearch(*_, **__)[source]
Bases:
CalculationNotImplementedSub-point search geometry finder.
Find time intervals when a coordinate of the sub-observer point on a target satisfies a condition.
- class webgeocalc.GFOccultationSearch(*_, **__)[source]
Bases:
CalculationNotImplementedOccultation search geometry finder.
Find time intervals when an observer sees one target occulted by, or in transit across, another.
- class webgeocalc.GFSurfaceInterceptPointSearch(*_, **__)[source]
Bases:
CalculationNotImplementedSurface intercept point search geometry finder.
Find time intervals when a coordinate of a surface intercept vector satisfies a condition.
- class webgeocalc.GFTargetInInstrumentFovSearch(*_, **__)[source]
Bases:
CalculationNotImplementedTarget in instrument fov search geometry finder.
Find time intervals when a target intersects the space bounded by the field-of-view of an instrument.
- class webgeocalc.GFRayInFovSearch(*_, **__)[source]
Bases:
CalculationNotImplementedRay in fov search geometry finder.
Find time intervals when a specified ray is contained in the space bounded by an instrument’s field-of-view.
- class webgeocalc.GFRangeRateSearch(*_, **__)[source]
Bases:
CalculationNotImplementedRange rate search geometry finder.
Find time intervals when the range rate between a target and observer satisfies a condition.
- class webgeocalc.GFPhaseAngleSearch(*_, **__)[source]
Bases:
CalculationNotImplementedPhase angle search geometry finder.
Find time intervals for which a specified constraint on the phase angle defined by an illumination source, a target, and an observer body centers is met.
- class webgeocalc.GFIlluminationAnglesSearch(*_, **__)[source]
Bases:
CalculationNotImplementedIllumination angles search geometry finder.
Find the time intervals, within a specified time window, when one of the illumination angles — phase, incidence or emission — at the specified target body surface point as seen from an observer satisfies a given constraint.