Skip to content

Instantly share code, notes, and snippets.

View astrojuanlu's full-sized avatar

Juan Luis Cano Rodríguez astrojuanlu

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Instrument ID,Instrument Name Short,Instrument Name Full,Instrument Agencies,Instrument Status,Instrument Type,Instrument Technology,Measurements & applications,Wavebands,Waveband Categories,Spatial Resolution,Spatial Resolution Best,Swath Width,Accuracy,Data Access,Data Format
1627,3MI,Multi-Viewing Multi-Channel Multi-Polarisation Imaging,EUMETSAT (ESA),Being developed,Atmospheric chemistry,Multi-channel/direction/polarisation radiometer,"Measure aerosol parameters, air quality index, surface albedo, cloud information",VIS-SWIR: 12 channels between 0.41 µm to 2.1 µm,"VIS, NIR, SWIR",4km,,2200x2200 km for the VNIR channels 2200 x 1100 km for the SWIR channels,,Open Access,net-CDF4
870,ABI,Advanced Baseline Imager,NOAA,Operational,Imaging multi-spectral radiometers (vis/IR),Multi-purpose imaging Vis/IR radiometer,"Detects clouds, cloud properties, water vapour, land and sea surface temperatures, dust, aerosols, volcanic ash, fires, total ozone, snow and ice cover, vegetation index.","16 bands in VIS, NIR and
var czml = [{"id": "document", "version": "1.0", "name": "My FC"}, {"id": "6c8c4104-a676-4299-b04a-9890d455b8fe", "name": "line_0", "description": "line_0", "polyline": {"positions": {"cartographicDegrees": [0.0, 0.0, 660.0, 10.0, 10.0, 660.0]}, "material": {"solidColor": {"color": {"rgba": [0, 255, 0, 255]}}}}}, {"id": "f7e06f54-5712-46d1-a019-db2e1f296f5b", "name": "point_0", "description": "point_0", "position": {"cartographicDegrees": [10.0, 10.0, 660.0]}, "point": {"pixelSize": 5, "color": {"rgba": [255, 0, 0, 255]}}}, {"id": "584c3140-74c5-4e6b-bf33-91c44ac8b985", "name": "polygon_0", "description": "polygon_0", "polygon": {"positions": {"cartographicDegrees": [10.0, 10.0, 660.0, 10.0, 5.0, 660.0, 15.0, 5.0, 660.0, 10.0, 10.0, 660.0]}, "material": {"solidColor": {"color": {"rgba": [255, 210, 0, 170]}}}}}];
var viewer = new Cesium.Viewer('cesiumContainer', {
shouldAnimate : true
});
// To have an inertial (ICRF) view
function icrf(scene, time) {
var icrfToFixed = Cesium.Transforms.computeIcrfTo
@astrojuanlu
astrojuanlu / earth_period.py
Last active August 1, 2019 20:01
What is the Earth period?
from sympy.abc import t
from sympy import Float
from sympy import diff
import sympy.physics.units as u
# Formula from section 5.8.3 of Simon et al 1994
# http://adsabs.harvard.edu/abs/1994A&A...282..663S
λ = (
Float("100.46645683") * u.degree
+ Float("1295977422.83429") / 3600 * u.deg * t
@astrojuanlu
astrojuanlu / pykep.log
Created June 21, 2019 13:17
PyKep experiments
Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 23:01:00)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pykep import lambert_problem
>>> from math import pi
>>> l = lambert_problem([1., 0., 0.], [0., 1., 0.], 5 * pi / 2.)
>>> l
Lambert's problem:
mu = 1
r1 = [1, 0, 0]
@astrojuanlu
astrojuanlu / plot_galilean.py
Last active May 19, 2019 15:53
Plot Galilean moons in Python with poliastro
from astropy.time import Time
from astropy.coordinates import CartesianRepresentation
from matplotlib import pyplot as plt
from poliastro.twobody import Orbit
from poliastro.bodies import Jupiter
from poliastro.frames import get_frame, Planes
from poliastro.plotting.static import StaticOrbitPlotter
def change_attractor(orbit, new_attractor, plane=Planes.EARTH_EQUATOR):
@astrojuanlu
astrojuanlu / Visualizing sea velocities with xarray and Cartopy.ipynb
Created April 14, 2019 17:59
Visualizing sea velocities with xarray and Cartopy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@astrojuanlu
astrojuanlu / result.js
Last active March 23, 2019 07:44
Visualizing Sun-synchronous orbits from orbit-predictor
var czml = [
// {"id": "document", "name": "simple", "version": "1.0", "clock": {"interval": "2019-03-20T12:00:00Z/2019-03-20T13:32:22Z", "currentTime": "2019-03-20T12:00:00Z", "multiplier": 60, "range": "LOOP_STOP", "step": "SYSTEM_CLOCK_MULTIPLIER"}}, {"id": "1", "name": "NAME", "availability": "2019-03-20T12:00:00Z/2019-03-20T13:32:22Z", "description": "DESCRIPTION", "billboard": {"eyeOffset": {"cartesian": [0, 0, 0]}, "horizontalOrigin": "CENTER", "verticalOrigin": "CENTER", "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADJSURBVDhPnZHRDcMgEEMZjVEYpaNklIzSEfLfD4qNnXAJSFWfhO7w2Zc0Tf9QG2rXrEzSUeZLOGm47WoH95x3Hl3jEgilvDgsOQUTqsNl68ezEwn1vae6lceSEEYvvWNT/Rxc4CXQNGadho1NXoJ+9iaqc2xi2xbt23PJCDIB6TQjOC6Bho/sDy3fBQT8PrVhibU7yBFcEPaRxOoeTwbwByCOYf9VGp1BYI1BA+EeHhmfzKbBoJEQwn1yzUZtyspIQUha85MpkNIXB7GizqDEECsAAAAASUVORK5CYII=", "scale": 1, "show": true, "pixelOffset": {"cartesian2": [0, 0]}}, "label": {"fillColor": {
@astrojuanlu
astrojuanlu / pycodestylenb.py
Last active February 6, 2019 10:41
pycodestyle, but for notebooks (quick & dirty)
import nbformat
from pycodestyle import StyleGuide
class NBStyleGuide(StyleGuide):
"""Checks the cells of a notebook."""
def input_file(self, filename, lines=None, expected=None, line_offset=0):
if lines is None:
with open(filename, "r", encoding="utf-8") as fp:
@astrojuanlu
astrojuanlu / numba_sieve.py
Created January 19, 2019 20:07
Sieve of Eratosthenes with Python and numba.
from math import ceil, sqrt
from numba import njit
import numpy as np
@njit
def primes_below(n):
"""Give primes below n.