{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "**Previous:** Use [WebGeoCalc API](api.ipynb)\n", "\n", "---\n", "\n", "# Make a calculation\n", "\n", "- [State Vector](#State-Vector)\n", "- [Angular Separation](#Angular-Separation)\n", "- [Angular Size](#Angular-Size)\n", "- [Frame Transformation](#Frame-Transformation)\n", "- [Illumination Angles](#Illumination-Angles)\n", "- [Sub-Solar Point](#Sub-Solar-Point)\n", "- [Sub-Observer Point](#Sub-Observer-Point)\n", "- [Surface Intercept Point](#Surface-Intercept-Point)\n", "- [Osculating Elements](#Osculating-Elements)\n", "- [Time Conversion](#Time-Conversion)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'kernels': [{'type': 'KERNEL_SET', 'id': 5}],\n", " 'times': ['2012-10-19T08:24:00.000'],\n", " 'calculationType': 'STATE_VECTOR',\n", " 'target': 'CASSINI',\n", " 'observer': 'SATURN',\n", " 'referenceFrame': 'IAU_SATURN',\n", " 'aberrationCorrection': 'NONE',\n", " 'stateRepresentation': 'PLANETOGRAPHIC',\n", " 'timeSystem': 'UTC',\n", " 'timeFormat': 'CALENDAR'}" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import Calculation\n", "\n", "Calculation(\n", " kernels = 5,\n", " times = '2012-10-19T08:24:00.000',\n", " calculation_type = 'STATE_VECTOR',\n", " target = 'CASSINI',\n", " observer = 'SATURN',\n", " reference_frame = 'IAU_SATURN',\n", " aberration_correction = 'NONE',\n", " state_representation = 'PLANETOGRAPHIC',\n", ").payload" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## State Vector\n", "\n", "Calculates the position of one body relative to another, calculated in a desired reference frame.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `target`, the target body name or ID.\n", "- `observer`, the observing body name or ID.\n", "- `reference_frame`, the reference frame name.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `aberration_correction`: NONE | LT | LT+S | __CN__ | CN+S | XLT | XLT+S | XCN | XCN+S\n", "- `state_representation`: __RECTANGULAR__ | RA_DEC | LATITUDINAL | PLANETODETIC | PLANETOGRAPHIC | CYLINDRICAL | SPHERICAL" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'kernels': [{'type': 'KERNEL_SET', 'id': 5}],\n", " 'times': ['2012-10-19T09:00:00'],\n", " 'target': 'CASSINI',\n", " 'observer': 'SATURN',\n", " 'referenceFrame': 'IAU_SATURN',\n", " 'calculationType': 'STATE_VECTOR',\n", " 'aberrationCorrection': 'CN',\n", " 'stateRepresentation': 'RECTANGULAR',\n", " 'timeSystem': 'UTC',\n", " 'timeFormat': 'CALENDAR'}" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import StateVector\n", "\n", "StateVector(\n", " kernels = 5,\n", " times = '2012-10-19T09:00:00',\n", " target = 'CASSINI',\n", " observer = 'SATURN',\n", " reference_frame = 'IAU_SATURN',\n", ").payload" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Set multiple `kernels` by _name_, multiple `times` and `target`-`observer`-`frame` by _id_:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'kernels': [{'type': 'KERNEL_SET', 'id': 1}, {'type': 'KERNEL_SET', 'id': 5}],\n", " 'times': ['2012-10-19T07:00:00', '2012-10-19T09:00:00'],\n", " 'target': -82,\n", " 'observer': 699,\n", " 'referenceFrame': 10016,\n", " 'calculationType': 'STATE_VECTOR',\n", " 'aberrationCorrection': 'NONE',\n", " 'stateRepresentation': 'RECTANGULAR',\n", " 'timeSystem': 'UTC',\n", " 'timeFormat': 'CALENDAR'}" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "StateVector(\n", " kernels = ['Solar System Kernels', 'Cassini Huygens'],\n", " times = ['2012-10-19T07:00:00', '2012-10-19T09:00:00'],\n", " target = -82, # CASSINI\n", " observer = 699, # SATURN\n", " reference_frame = 10016, # IAU_SATURN\n", " aberration_correction = 'NONE',\n", " stateRepresentation = 'PLANETOGRAPHIC',\n", ").payload" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Add individual `kernel path` from on a remote server and multiple `intervals`" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'kernels': [{'type': 'KERNEL', 'path': 'https://path.to.server/kernel'}],\n", " 'intervals': [{'startTime': '2000-01-01', 'endTime': '2000-01-03'},\n", " {'startTime': '2000-02-01', 'endTime': '2000-02-03'}],\n", " 'timeStep': 1,\n", " 'timeStepUnit': 'DAYS',\n", " 'target': 'CASSINI',\n", " 'observer': 'SATURN',\n", " 'referenceFrame': 'IAU_SATURN',\n", " 'calculationType': 'STATE_VECTOR',\n", " 'aberrationCorrection': 'CN',\n", " 'stateRepresentation': 'RECTANGULAR',\n", " 'timeSystem': 'UTC',\n", " 'timeFormat': 'CALENDAR'}" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "StateVector(\n", " kernel_paths = 'https://path.to.server/kernel',\n", " intervals = [['2000-01-01', '2000-01-03'], ['2000-02-01', '2000-02-03']],\n", " time_step = 1,\n", " time_step_units = 'DAYS',\n", " target = 'CASSINI',\n", " observer = 'SATURN',\n", " reference_frame = 'IAU_SATURN',\n", ").payload" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run the calculation" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 8750344d-645d-4e43-b159-c8d88d28aac6)\n" ] } ], "source": [ "calc = StateVector(\n", " kernels = 5,\n", " times = '2012-10-19T09:00:00',\n", " target = 'CASSINI',\n", " observer = 'SATURN',\n", " reference_frame = 'IAU_SATURN',\n", ")\n", "calc.submit()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Update status calculation:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 8750344d-645d-4e43-b159-c8d88d28aac6)\n" ] } ], "source": [ "calc.update()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'DATE': '2012-10-19 09:00:00.000000 UTC',\n", " 'DISTANCE': 764142.63776247,\n", " 'SPEED': 111.54765899,\n", " 'X': 298292.85744169,\n", " 'Y': -651606.58468976,\n", " 'Z': 265224.81187627,\n", " 'D_X_DT': -98.8032491,\n", " 'D_Y_DT': -51.73211296,\n", " 'D_Z_DT': -2.1416539,\n", " 'TIME_AT_TARGET': '2012-10-19 08:59:57.451094 UTC',\n", " 'LIGHT_TIME': 2.54890548}" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "calc.results" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Submit, update and get results at once" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'DATE': '2012-10-19 09:00:00.000000 UTC',\n", " 'DISTANCE': 764142.63776247,\n", " 'SPEED': 111.54765899,\n", " 'X': 298292.85744169,\n", " 'Y': -651606.58468976,\n", " 'Z': 265224.81187627,\n", " 'D_X_DT': -98.8032491,\n", " 'D_Y_DT': -51.73211296,\n", " 'D_Z_DT': -2.1416539,\n", " 'TIME_AT_TARGET': '2012-10-19 08:59:57.451094 UTC',\n", " 'LIGHT_TIME': 2.54890548}" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "calc.run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Angular Separation\n", "\n", "Calculates the angular separation of two bodies as seen by an observer body.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `target_1`, the target body name or ID of the first body.\n", "- `target_2`, the target body name or ID of the second body.\n", "- `observer`, the observing body name or ID.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `shape_1`, the shape to use for the first body: __POINT__ | SPHERE\n", "- `shape_2`, the shape to use for the second body: __POINT__ | SPHERE\n", "- `aberration_correction`: NONE | LT | LT+S | __CN__ | CN+S | XLT | XLT+S | XCN | XCN+S\n", " \n", "\n" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 0273e817-3af6-4dd7-91ef-7c2d8ef459f9)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-19 08:24:00.000000 UTC', 'ANGULAR_SEPARATION': 175.17072258}" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import AngularSeparation\n", "\n", "AngularSeparation(\n", " kernel_paths = ['pds/wgc/kernels/lsk/naif0012.tls', 'pds/wgc/kernels/spk/de430.bsp'],\n", " times = '2012-10-19T08:24:00.000',\n", " target_1 = 'VENUS',\n", " target_2 = 'MERCURY',\n", " observer = 'SUN',\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Angular Size\n", "\n", "Calculates the angular size of a target as seen by an observer.\n", " \n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `target`, the target body name or ID.\n", "- `observer`, the observing body name or ID.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `aberration_correction`: NONE | LT | LT+S | __CN__ | CN+S | XLT | XLT+S | XCN | XCN+S" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 702a4781-3340-4856-a771-fac9011a7c6b)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-19 08:24:00.000000 UTC', 'ANGULAR_SIZE': 0.03037939}" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import AngularSize\n", "\n", "AngularSize(\n", " kernels = 5,\n", " times = '2012-10-19T08:24:00.000',\n", " target = 'ENCELADUS',\n", " observer = 'CASSINI',\n", " aberration_correction = 'CN+S',\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Frame Transformation\n", "\n", "Calculate the transformation from one reference frame (Frame 1) to another reference frame (Frame 2).\n", " \n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `frame_1`, the first reference frame name.\n", "- `frame_2`, the second reference frame name.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `aberration_correction`: NONE | LT | __CN__ | XLT | XCN\n", "- `time_location`, the frame for the input times: __FRAME1__ | FRAME2\n", "- `orientation_representation`: the representation of the result transformation: __EULER_ANGLES__ | ANGLE_AND_AXIS | SPICE_QUATERNION | OTHER_QUATERNION | MATRIX_ROW_BY_ROW | MATRIX_FLAGGED | MATRIX_ALL_ONE_ROW\n", "- `angular_velocity_representation`, the representation of angular velocity in the output: NOT_INCLUDED | __VECTOR_IN_FRAME1__ | VECTOR_IN_FRAME2 | EULER_ANGLE_DERIVATIVES | MATRIX\n", "\n", "Only needed if `orientation_representation` is EULER_ANGLES:\n", "- `axis_1`, the first axis for Euler angle rotation: __X__ | Y | Z\n", "- `axis_2`, the second axis for Euler angle rotation: X | __Y__ | Z\n", "- `axis_3`, the third axis for Euler angle rotation: X | Y | __Z__\n", "\n", "Only needed if `orientation_representation` is EULER_ANGLES or ANGLE_AND_AXIS:\n", "- `angular_units`, the angular units used for the angle of rotation. __deg__ | rad\n", "\n", "Only needed if `angular_velocity_representation` is one of: VECTOR_IN_FRAME1, VECTOR_IN_FRAME2, or EULER_ANGLE_DERIVATIVES:\n", "- `angular_velocity_units`, the units for the angular velocity: __deg/s__ | rad/s | RPM | Unitary\n", "\n", "__Note:__ `Unitary` = Unit vector, only applicable for VECTOR_IN_FRAME1 and VECTOR_IN_FRAME2." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 48875b2c-747a-4039-bda4-156ca8de1955)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-19 08:24:00.000000 UTC',\n", " 'ANGLE3': -20.58940104,\n", " 'ANGLE2': 0.01874004,\n", " 'ANGLE1': 0.00136319,\n", " 'AV_X': 9.94596495e-07,\n", " 'AV_Y': -7.23492228e-08,\n", " 'AV_Z': -0.00634331,\n", " 'AV_MAG': 0.00634331}" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import FrameTransformation\n", "\n", "FrameTransformation(\n", " kernels = 5,\n", " times = '2012-10-19T08:24:00.000',\n", " frame_1 = 'IAU_SATURN',\n", " frame_2 = 'IAU_ENCELADUS',\n", " aberration_correction = 'NONE',\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Illumination Angles\n", "\n", "Calculate the emission, phase and solar incidence angles at a point on a target as seen from an observer.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `target`, the target body name or ID.\n", "- `target_frame`: The target body-fixed reference frame name.\n", "- `observer`, the observing body name or ID.\n", "- `latitude`, latitude of the surface point, in degrees, from -90 to +90.\n", "- `longitude`, longitude of the surface point, in degrees, from -180 to +180.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `shape_1`, the shape to use for the target body: __ELLIPSOID__ | DSK\n", "- `coordinate_representation`: __LATITUDINAL__ (planetocentric) | PLANETODETIC | PLANETOGRAPHIC\n", "- `aberration_correction`: NONE | LT | LT+S | __CN__ | CN+S | XLT | XLT+S | XCN | XCN+S" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 198e15f2-8fa3-4a14-aacb-dfca7f0d7e10)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-19 08:24:00.000000 UTC',\n", " 'INCIDENCE_ANGLE': 24.78527742,\n", " 'EMISSION_ANGLE': 25.56007298,\n", " 'PHASE_ANGLE': 1.00079007,\n", " 'OBSERVER_ALTITUDE': 967668.02765637,\n", " 'TIME_AT_POINT': '2012-10-19 08:23:56.772207 UTC',\n", " 'LIGHT_TIME': 3.2277931}" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import IlluminationAngles\n", "\n", "IlluminationAngles(\n", " kernels = 5,\n", " times = '2012-10-19T08:24:00.000',\n", " target = 'ENCELADUS',\n", " target_frame = 'IAU_ENCELADUS',\n", " observer = 'CASSINI',\n", " aberration_correction = 'CN+S',\n", " latitude = 0.0,\n", " longitude = 0.0,\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Sub Solar Point\n", "\n", "Calculates the sub-solar point on a target as seen from an observer.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `target`, the target body name or ID.\n", "- `target_frame`: The target body-fixed reference frame name.\n", "- `observer`, the observing body name or ID.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `sub_point_type`, the method of finding the sub-solar point: __Near point: ellipsoid__ | Intercept: ellipsoid | NADIR/DSK/UNPRIORITIZED | INTERCEPT/DSK/UNPRIORITIZED\n", "- `aberration_correction`: NONE | LT | LT+S | __CN__ | CN+S\n", "- `state_representation`: __RECTANGULAR__ | RA_DEC | LATITUDINAL | PLANETODETIC | PLANETOGRAPHIC | CYLINDRICAL | SPHERICAL" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: dd504b37-36bf-4d2f-9ec9-9eb971e17e48)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-19 08:24:00.000000 UTC',\n", " 'X': 234.00550655,\n", " 'Y': -77.32612213,\n", " 'Z': 67.42916937,\n", " 'SUB_POINT_RADIUS': 255.50851089,\n", " 'OBSERVER_ALTITUDE': 967644.15493281,\n", " 'INCIDENCE_ANGLE': 4.49798357e-15,\n", " 'EMISSION_ANGLE': 0.99611862,\n", " 'PHASE_ANGLE': 0.99611862,\n", " 'TIME_AT_POINT': '2012-10-19 08:23:56.772287 UTC',\n", " 'LIGHT_TIME': 3.22771347}" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import SubSolarPoint\n", "\n", "SubSolarPoint(\n", " kernels = 5,\n", " times = '2012-10-19T08:24:00.000',\n", " target = 'ENCELADUS',\n", " target_frame = 'IAU_ENCELADUS',\n", " observer = 'CASSINI',\n", " aberration_correction = 'CN+S',\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Sub Observer Point\n", "\n", "Calculate the sub-observer point on a target as seen from an observer.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `target`, the target body name or ID.\n", "- `target_frame`: The target body-fixed reference frame name.\n", "- `observer`, the observing body name or ID.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `sub_point_type`, the method of finding the sub-observer point: __Near point: ellipsoid__ | Intercept: ellipsoid | NADIR/DSK/UNPRIORITIZED | INTERCEPT/DSK/UNPRIORITIZED\n", "- `aberration_correction`: NONE | LT | LT+S | __CN__ | CN+S | XLT | XLT+S | XCN | XCN+S\n", "- `state_representation`: __RECTANGULAR__ | RA_DEC | LATITUDINAL | PLANETODETIC | PLANETOGRAPHIC | CYLINDRICAL | SPHERICAL" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 5d409208-ed15-4a72-ad7a-e2349ae7eca6)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-19 08:24:00.000000 UTC',\n", " 'X': 232.5831733,\n", " 'Y': -81.40386728,\n", " 'Z': 67.35505213,\n", " 'SUB_POINT_RADIUS': 255.45689491,\n", " 'OBSERVER_ALTITUDE': 967644.11734179,\n", " 'INCIDENCE_ANGLE': 0.99586304,\n", " 'EMISSION_ANGLE': 1.66981544e-12,\n", " 'PHASE_ANGLE': 0.99586304,\n", " 'TIME_AT_POINT': '2012-10-19 08:23:56.772287 UTC',\n", " 'LIGHT_TIME': 3.22771334}" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import SubObserverPoint\n", "\n", "SubObserverPoint(\n", " kernels = 5,\n", " times = '2012-10-19T08:24:00.000',\n", " target = 'ENCELADUS',\n", " target_frame = 'IAU_ENCELADUS',\n", " observer = 'CASSINI',\n", " aberration_correction = 'CN+S',\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Surface Intercept Point\n", "\n", "Calculate the intercept point of a vector or vectors on a target as seen from an observer.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `target`, the target body name or ID.\n", "- `target_frame`, the target body-fixed reference frame name.\n", "- `observer`, the observing body name or ID.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `shape_1`, the shape to use for the target body. __ELLIPSOID__ | DSK\n", "- `intercept_vector_type`, type of vector to be used as the ray direction. __INSTRUMENT_BORESIGHT__ | INSTRUMENT_FOV_BOUNDARY_VECTOR S |REFERENCE_FRAME_AXIS | VECTOR_IN_INSTRUMENT_FOV | VECTOR_IN_REFERENCE_FRAME\n", "- `aberration_correction`: NONE | LT | LT+S | __CN__ | CN+S | XLT | XLT+S | XCN | XCN+S\n", "- `state_representation`: __RECTANGULAR__ | RA_DEC | LATITUDINAL | PLANETODETIC | PLANETOGRAPHIC | CYLINDRICAL | SPHERICAL\n", "\n", "Only needed if `intercept_vector_type` is INSTRUMENT_BORESIGHT, INSTRUMENT_FOV_BOUNDARY_VECTORS or VECTOR_IN_INSTRUMENT_FOV:\n", "- `intercept_instrument`, the instrument name or ID.\n", "\n", "Only needed if `intercept_vector_type` is REFERENCE_FRAME_AXIS or VECTOR_IN_REFERENCE_FRAME:\n", "- `intercept_frame`, the vector's reference frame name.\n", "\n", "Only needed if `intercept_vector_type` is REFERENCE_FRAME_AXIS:\n", "- `intercept_frame_axis`, the intercept frame axis.\n", "\n", "Only need if `intercept_vector_type` is VECTOR_IN_INSTRUMENT_FOV or VECTOR_IN_REFERENCE_FRAME:\n", "- `intercept_vector_x` + `intercept_vector_y` + `intercept_vector_z` or `intercept_vector_ra` + `intercept_vector_dec`: intercept vector coordinates." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: bc3c7b6b-c4e1-4937-a4bd-edd91db8acf3)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-14 00:00:00.000000 UTC',\n", " 'LONGITUDE': 98.7675609,\n", " 'LATITUDE': -38.69027976,\n", " 'INTERCEPT_RADIUS': 57739.95803153,\n", " 'OBSERVER_ALTITUDE': 1831047.67987589,\n", " 'INCIDENCE_ANGLE': 123.05323675,\n", " 'EMISSION_ANGLE': 5.8567773,\n", " 'PHASE_ANGLE': 123.77530312,\n", " 'TIME_AT_POINT': '2012-10-14 00:00:00.000000 UTC',\n", " 'LIGHT_TIME': 6.10771763}" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import SurfaceInterceptPoint\n", "\n", "SurfaceInterceptPoint(\n", " kernels = 5,\n", " times = '2012-10-14T00:00:00',\n", " target = 'SATURN',\n", " target_frame = 'IAU_SATURN',\n", " observer = 'CASSINI',\n", " intercept_vector_type = 'INSTRUMENT_BORESIGHT',\n", " intercept_instrument = 'CASSINI_ISS_NAC',\n", " aberration_correction = 'NONE',\n", " state_representation = 'LATITUDINAL',\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Osculating Elements\n", "\n", "Calculate the osculating elements of the orbit of a target body around a central body.\n", "The orbit may be elliptical, parabolic, or hyperbolic.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "- `orbiting_body`: The SPICE body name or ID for the orbiting body.\n", "- `center_body`: The SPICE body name or ID for the body that is the center of motion.\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `reference_frame`, the reference frame name. _J2000_" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 43919bd8-4c11-4dfc-9ff7-dfe247073169)\n" ] }, { "data": { "text/plain": [ "{'DATE': '2012-10-19 08:24:00.000000 UTC',\n", " 'PERIFOCAL_DISTANCE': 474789.03917271,\n", " 'ECCENTRICITY': 0.70348463,\n", " 'INCLINATION': 38.18727034,\n", " 'ASCENDING_NODE_LONGITUDE': 223.98123058,\n", " 'ARGUMENT_OF_PERIAPSE': 71.59474487,\n", " 'MEAN_ANOMALY_AT_EPOCH': 14.65461204,\n", " 'ORBITING_BODY_RANGE': 753794.65101401,\n", " 'ORBITING_BODY_SPEED': 8.77222231,\n", " 'PERIOD': 2067101.2236748,\n", " 'CENTER_BODY_GM': 37931207.49865224}" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import OsculatingElements\n", "\n", "OsculatingElements(\n", " kernels = [1,5],\n", " times = '2012-10-19T08:24:00.000',\n", " orbiting_body = 'CASSINI',\n", " center_body = 'SATURN',\n", ").run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Time Conversion\n", "\n", "Convert times from one time system or format to another.\n", "\n", "### Required parameters:\n", "\n", "- `kernels` or `kernel_paths`\n", "- `times` or `intervals` + `time_step` + `time_step_units`\n", "\n", "### Optional parameters (with __default__):\n", "\n", "- `time_system`: __UTC__ | TDB | TDT | SPACECRAFT_CLOCK \n", "- `time_format`: __CALENDAR__ | JULIAN | SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_TICKS | SPACECRAFT_CLOCK_STRING\n", "- `output_time_system`, the time system for the result times: TDB | TDT | __UTC__ | SPACECRAFT_CLOCK\n", "- `output_time_format`, the time format for the result times: __CALENDAR__ | CALENDAR_YMD | CALENDAR_DOY | JULIAN |SECONDS_PAST_J2000 | SPACECRAFT_CLOCK_STRING | SPACECRAFT_CLOCK_TICKS | CUSTOM\n", "\n", "Only used if `outputTimeSystem` is SPACECRAFT_CLOCK.\n", "- `output_sclk_id`, the output SCLK ID.\n", "\n", "Only used if `output_time_format` is CUSTOM.\n", "- `output_time_custom_format`, a SPICE `timout()` format string.\n" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Calculation submit] Status: COMPLETE (id: 917f5cda-157f-4dc9-b4d7-bf46eaa8409a)\n" ] }, { "data": { "text/plain": [ "{'DATE': '1/1729329441.004', 'DATE2': '2012-10-19 08:24:02.919085 UTC'}" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from webgeocalc import TimeConversion\n", "\n", "TimeConversion(\n", " kernels = 5,\n", " times = '1/1729329441.04',\n", " time_system = 'SPACECRAFT_CLOCK',\n", " time_format = 'SPACECRAFT_CLOCK_STRING',\n", " sclk_id = -82,\n", ").run()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.6" } }, "nbformat": 4, "nbformat_minor": 2 }