Skip to content

Instantly share code, notes, and snippets.

View dsvinkin's full-sized avatar

Dmitry Svinkin dsvinkin

  • Ioffe Institute
View GitHub Profile
"""
Packages required to run this script:
lxml
PyYAML
Requests
BeautifulSoup
"""
@dsvinkin
dsvinkin / distant_sc_eph.py
Last active March 13, 2024 23:39
Request Ulysses, MESSENGER, Mars-Odyssey, BepiColombo, and Solar Orbiter ephemerides from JPL horizons
"""
https://astroquery.readthedocs.io/en/latest/index.html
Tested for astroquery-0.4.7
"""
from astropy.time import Time
from astroquery.jplhorizons import Horizons
def sod_to_hhmmss(seconds, use_codes=False):
hours = int(seconds / 3600)
@dsvinkin
dsvinkin / time_of_flight.py
Created April 12, 2021 15:58
Light-travel time calculation
"""
Calculates light-travel time between two spacecraft given source position
"""
import numpy as np
c = 299792.458 # km/s
class SC:
@dsvinkin
dsvinkin / make_ipn_plot.py
Created May 29, 2019 11:10
IPN map plotting script
from numpy import sin, cos, arcsin, arctan2, deg2rad, rad2deg
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
mpl.rcParams['xtick.direction'] = 'in'
mpl.rcParams['ytick.direction'] = 'in'
mpl.rcParams['xtick.top'] = True
mpl.rcParams['ytick.right'] = True
@dsvinkin
dsvinkin / kw_waiting_mode_events_since_09_2015.txt
Created September 11, 2018 14:04
Konus-Wind waiting mode events since Sep 2015
Date Time HHMMSS Det Mode Channels Duration_s Comment
20150902 63340.850 17:35:40.850 S1 Trig G1,G2,G3 32 GRB150902A
20150905 21055 05:50:55 S2 Bg G1 6 possible GRB
20150906 31340.560 08:42:20.560 S1 Trig G1,G2,G3 3 GRB150906B
20150909 2512.131 00:41:50.131 S2 Trig G1,G2 40 possible GRB
20150910 32748 09:05:48 S2 Bg G2 140 possible GRB
20150911 45094 12:31:34 S2 Bg G2 100 possible GRB
20150911 50771.269 14:06:11.269 S1 Trig G1,G2 20 GRB, GBM#463673167
20150911 67234 18:40:34 S1 Bg G1,G2 13 GRB, GBM#463689737
20150911 82085 22:48:05 S1,S2 Bg G2 130 possible GRB