{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Predicting occultations for a spacecraft\n", "\n", "The default call of the `prediction()` function will predict stellar occultations for ground-based observers where the occultation parameters calculated are referred to the geocenter. Predicting for a specific observer or a spacecraft is as simple as passing the observer in the parameter `reference_center` of the prediction function. \n", "\n", "We must be careful, though. When predicting for the `geocenter` we add the radius of the Earth, the radius of the body and the uncertainty of the body's ephemeris as the radius of search. For a specific observer, the radius of the Earth is not included. Because of this, it might be necessary to give a larger radius and/or a smaller time step for the prediction function. This is important because the coordinates of the ephemeris and star are directly compared in the first iteration for faster identification of potential events, then the occultation parameters are calculated precisely.\n", "\n", "In this example, we will predict stellar occultations by Chariklo that could have been observed by the New Horizons in the year 2013, during its transit between Jupiter and Pluto." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SORA version: 0.2\n" ] } ], "source": [ "from sora import Body, Spacecraft\n", "from sora.prediction import prediction" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Obtaining data for Chariklo from SBDB\n", "###############################################################################\n", " 10199 Chariklo (1997 CU26) \n", "###############################################################################\n", "Object Orbital Class: Centaur\n", "Spectral Type:\n", " SMASS: D [Reference: EAR-A-5-DDR-TAXONOMY-V4.0]\n", " Relatively featureless spectrum with very steep red slope.\n", "Discovered 1997-Feb-15 by Spacewatch at Kitt Peak\n", "\n", "Physical parameters:\n", "Diameter:\n", " 302 +/- 30 km\n", " Reference: Earth, Moon, and Planets, v. 89, Issue 1, p. 117-134 (2002), \n", "Rotation:\n", " 7.004 +/- 0 h\n", " Reference: LCDB (Rev. 2020-October); Warner et al., 2009, [Result based on less than full coverage, so that the period may be wrong by 30 percent or so.] REFERENCE LIST:[Fornasier, S.; Lazzaro, D.; Alvarez-Candal, A.; Snodgrass, C.; et al. (2014) Astron. Astrophys. 568, L11.], [Leiva, R.; Sicardy, B.; Camargo, J.I.B.; Desmars, J.; et al. (2017) Astron. J. 154, A159.]\n", "Absolute Magnitude:\n", " 6.7 +/- 0 mag\n", " Reference: MPO452314, \n", "Albedo:\n", " 0.045 +/- 0.01 \n", " Reference: Earth, Moon, and Planets, v. 89, Issue 1, p. 117-134 (2002), \n", "\n", "----------- Ephemeris -----------\n", "\n", "EphemKernel: 10199_CHARIKLO_NIMA_V19/DE438 (SPKID=2010199)\n", "Ephem Error: RA*cosDEC: 0.000 arcsec; DEC: 0.000 arcsec\n", "Offset applied: RA*cosDEC: 0.0000 arcsec; DEC: 0.0000 arcsec\n", "\n", "\n" ] } ], "source": [ "# Defining the occulting body\n", "\n", "chariklo = Body(name='Chariklo', ephem=['10199_Chariklo_nima_v19.bsp', 'de438.bsp'])\n", "print(chariklo)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# Defining the New Horizons as an Observer.\n", "# The kernel has the path of the spacecraft from 2012-12-31T23:58:52.816 up to 2014-12-08T05:12:10.384\n", "# Another option is to use the JPL/Horizons web service making ephem='horizons' \n", "\n", "nh = Spacecraft(name='New Horizons', spkid='-98', ephem=['nh_recon_od117_v01.bsp'])" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Ephemeris was split in 12 parts for better search of stars\n", "\n", "Searching occultations in part 1/12\n", "Generating Ephemeris between 2013-01-01 00:00:00.000 and 2013-01-31 09:59:50.000 ...\n", "Downloading stars ...\n", " 1741 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 2/12\n", "Generating Ephemeris between 2013-01-31 10:00:00.000 and 2013-03-02 19:59:50.000 ...\n", "Downloading stars ...\n", " 1749 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 3/12\n", "Generating Ephemeris between 2013-03-02 20:00:00.000 and 2013-04-02 05:59:50.000 ...\n", "Downloading stars ...\n", " 1701 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 4/12\n", "Generating Ephemeris between 2013-04-02 06:00:00.000 and 2013-05-02 15:59:50.000 ...\n", "Downloading stars ...\n", " 1647 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 5/12\n", "Generating Ephemeris between 2013-05-02 16:00:00.000 and 2013-06-02 01:59:50.000 ...\n", "Downloading stars ...\n", " 1733 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 6/12\n", "Generating Ephemeris between 2013-06-02 02:00:00.000 and 2013-07-02 11:59:50.000 ...\n", "Downloading stars ...\n", " 1636 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 7/12\n", "Generating Ephemeris between 2013-07-02 12:00:00.000 and 2013-08-01 21:59:50.000 ...\n", "Downloading stars ...\n", " 1741 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 8/12\n", "Generating Ephemeris between 2013-08-01 22:00:00.000 and 2013-09-01 07:59:50.000 ...\n", "Downloading stars ...\n", " 1781 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 9/12\n", "Generating Ephemeris between 2013-09-01 08:00:00.000 and 2013-10-01 17:59:50.000 ...\n", "Downloading stars ...\n", " 1908 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 10/12\n", "Generating Ephemeris between 2013-10-01 18:00:00.000 and 2013-11-01 03:59:50.000 ...\n", "Downloading stars ...\n", " 1718 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 11/12\n", "Generating Ephemeris between 2013-11-01 04:00:00.000 and 2013-12-01 13:59:50.000 ...\n", "Downloading stars ...\n", " 1749 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "Searching occultations in part 12/12\n", "Generating Ephemeris between 2013-12-01 14:00:00.000 and 2013-12-31 23:59:50.000 ...\n", "Downloading stars ...\n", " 1798 Gaia-EDR3 stars downloaded\n", "Identifying occultations ...\n", "\n", "3 occultations found.\n" ] } ], "source": [ "# Prediction of stellar occultations by Chariklo for the year 2013 as observed by the New Horizons.\n", "# The time step of the ephemeris is 10s and the radius of search is 600 km for the quick search.\n", "# The full period of search was split in 12 division to avoid overflow of memory caused by the ephemeris\n", "# and to avoid download stars for a large region of sky.\n", "\n", "pred = prediction(body=chariklo, time_beg='2013-01-01 00:00', time_end='2014-01-01 00:00', \n", " radius=600, step=10, divs=12, reference_center=nh)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " Epoch ICRS Star Coord at Epoch Geocentric Object Position C/A P/A Vel Dist G G* long loct M-G-T S-G-T Gaia-EDR3 Source ID\n", " arcsec deg km / s AU mag mag deg hh:mm deg deg \n", "----------------------- ------------------------------ ------------------------------ ------ ------ ------ ------- ------ ------ ---- ----- ----- ----- -------------------\n", "2013-05-08 08:56:11.580 08 14 06.33337 +00 44 18.72873 08 14 06.33419 +00 44 18.74317 0.019 40.42 -8.01 15.717 18.527 17.533 123 17:08 97 79 3089568957554344960\n", "2013-07-13 13:37:48.260 08 10 44.43129 +01 27 22.86678 08 10 44.43275 +01 27 22.89235 0.034 40.52 -7.99 15.978 17.950 16.954 347 12:44 47 22 3089856131952198272\n", "2013-10-12 00:03:14.560 08 06 15.00058 +02 25 00.19559 08 06 14.99944 +02 25 00.17579 0.026 220.61 -7.96 16.347 15.812 14.811 100 06:43 161 76 3090959839765902336\n" ] } ], "source": [ "# printing prediction table\n", "\n", "pred.pprint_all()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**The column** `Geocentric Object Position` **gives the object position for the observer, not the geocenter. It is maintained like this for backward compatibility, but it will be fixed in SORAv1.0.**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There were 3 stellar occultations by Chariklo that could have been observed by New Horizons in 2013. \n", "\n", "The plots of maps in SORA is still projected for an occultation on Earth. Plots for a spacecraft may be implemented in the future." ] } ], "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.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }