Skip to content

Instantly share code, notes, and snippets.

View drsteve's full-sized avatar
💭
This is fine

Steve Morley drsteve

💭
This is fine
View GitHub Profile
@drsteve
drsteve / ned_coords.py
Created March 2, 2021 18:04
Transform local North-East-Down to parent (e.g. GEO) coordinates
import numpy as np
# Set up transformation matrices
def calc_transmat(lat, lon):
rlon = np.deg2rad(lon)
rlat = np.deg2rad(lat)
transmat = dict()
#now transform from local tangent plane coordinates to parent
@drsteve
drsteve / readRC.py
Created June 15, 2020 20:02
Richardson-Cane interplanetary coronal mass ejection (ICME) list
from functools import partial
import dateutil.parser as dup
import spacepy.datamodel as dm
def read_list(fname='richardson_cane_ICME_list.txt'):
"""Read Richardson-Cane ICME list from file
Parameters
----------
@drsteve
drsteve / IMF_ev5.dat
Created July 14, 2018 00:06
SWPC Event 5 SWMF inputs
File created on 2016-01-15T21:35:34.948634
#COORDINATES
GSM
year mo dy hr mn sc msc BX BY BZ UX UY UZ RHO T
#START
2010 04 04 19 00 00 000 0.00 -4.07 2.18 -490.29 -37.69 22.67 3.73 101590.00
2010 04 04 19 01 00 000 0.00 -3.94 3.23 -487.24 -36.39 38.59 3.67 120417.00
2010 04 04 19 02 00 000 0.00 -4.63 1.74 -493.04 -41.16 41.98 3.48 117629.00