Skip to content

Instantly share code, notes, and snippets.

@anttilipp
anttilipp / SentinelChangeTest.sh
Created February 12, 2017 18:46
A quick test script for analyzing changes in Sentinel-2 R, G, and B band satellite images
#!/bin/bash
#
# A quick test script for analyzing changes in Sentinel-2 R, G, and B bands
# Made by Antti Lipponen (Twitter @anttilip)
# 12 February 2017
#
# keywords: satellite, Sentinel-2, remote sensing, data processing, gdal, imagemagick
#
########################
@anttilipp
anttilipp / spatialresolution.sh
Created February 11, 2017 14:23
Script for generating satellite image spatial resolution test images
#!/bin/bash
#
# Script for generating spatial resolution test images
# Made by Antti Lipponen (Twitter @anttilip)
#
#
# Imagemagick and gdal used for processing
#
#
# Test cases:
@anttilipp
anttilipp / daylength.py
Created January 6, 2017 18:39
Python function to compute the length of the day given day of the year and latitude.
import numpy as np
def daylength(dayOfYear, lat):
"""Computes the length of the day (the time between sunrise and
sunset) given the day of the year and latitude of the location.
Function uses the Brock model for the computations.
For more information see, for example,
Forsythe et al., "A model comparison for daylength as a
function of latitude and day of year", Ecological Modelling,
1995.