This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Get the global mean | |
GlobMean = MEAN(WholeBand, /NAN) | |
; Get the global variance | |
GlobVariance = VARIANCE(WholeBand, /NAN) | |
; Get the number of values in the whole image | |
GlobNumber = (NumRows * NumCols - CountOfNAN) | |
; Converts a distance to the length of each side of the square |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_ellipse(x, x0, y, y0, theta, a, b): | |
c = np.cos(theta) | |
s = np.sin(theta) | |
a2 = a**2 | |
b2 = b**2 | |
xnew = x - x0 | |
ynew = y - y0 | |
ellipse = (xnew * c + ynew * s)**2/a2 + (xnew * s - ynew * c)**2/b2 <= 1 | |
return ellipse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Couldn't load plugin 'processing' from ['/Applications/QGIS.app/Contents/MacOS/../Resources/python', '/Users/robin/.qgis2/python', '/Users/robin/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/B/Python/2.7', '/Library/Frameworks/GDAL.framework/Versions/1.10/Python/2.7/site-packages', '/Library/Frameworks/cairo.framework/Versions/1/Python/2.7', '/usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages', '/usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages/wx-2.9.4-osx_cocoa', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### WSGI for Web6S app | |
WSGIScriptAlias /web6s /usr/local/www/wsgi-scripts/Web6S/web6s.wsgi | |
<Directory /usr/local/www/wsgi-scripts/Web6S> | |
WSGIApplicationGroup %{GLOBAL} | |
AllowOverride None | |
Require all granted | |
</Directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.cElementTree as ET | |
from shapely.geometry import mapping, Polygon | |
import fiona | |
import os | |
input_filename = "villages.osm" | |
output_filename = "villages.shp" | |
# Parse the XML from the OSM file | |
tree = ET.ElementTree(file=input_filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from rios import applier | |
import tempfile | |
import subprocess | |
# Set up the function to be applied | |
def doMask(info, inputs, outputs, args): | |
if np.isnan(args.no_data): | |
outputs.outimage = np.isfinite(inputs.image) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modulefinder import ModuleFinder | |
f = ModuleFinder() | |
# Run the main script | |
f.run_script('run.py') | |
# Get names of all the imported modules | |
names = list(f.modules.keys()) | |
# Get a sorted list of the root modules imported |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple test of method used in current ARCSI code (old_method) | |
# and Py6S parallelisation (new_method) | |
# Results from running it on my (relatively old, dual-core) MacBook Pro: | |
# old_method: 21.1s | |
# new_method: 10.6s | |
# | |
# We get roughly the 2x speed up that you'd expect with two cores. | |
# | |
# Running on my work machine which has 8 cores I get: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: Python [13682] | |
Path: /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python | |
Identifier: Python | |
Version: 2.7.6 (2.7.6) | |
Code Type: X86-64 (Native) | |
Parent Process: zsh [2073] | |
User ID: 501 | |
Date/Time: 2014-06-04 22:21:46.058 +0100 | |
OS Version: Mac OS X 10.8.5 (12F45) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description Resource Path Location Type | |
Bookmark cannot be resolved to a type BookmarkTransfer.java /org.integratedmodelling.thinkcap/src/org/integratedmodelling/thinkcap/ui line 40 Java Problem | |
Bookmark cannot be resolved to a type BookmarkTransfer.java /org.integratedmodelling.thinkcap/src/org/integratedmodelling/thinkcap/ui line 40 Java Problem | |
Bookmark cannot be resolved to a type BookmarkTransfer.java /org.integratedmodelling.thinkcap/src/org/integratedmodelling/thinkcap/ui line 59 Java Problem | |
Bookmark cannot be resolved to a type BookmarkTransfer.java /org.integratedmodelling.thinkcap/src/org/integratedmodelling/thinkcap/ui line 63 Java Problem | |
Bookmark cannot be resolved to a type BookmarkTransfer.java /org.integratedmodelling.thinkcap/src/org/integratedmodelling/thinkcap/ui line 74 Java Problem | |
Bookmark cannot be resolved to a type BookmarkTransfer.java /org.integratedmodelling.thinkcap/src/org/integratedmodelling/thinkcap/ui line 80 Java Problem | |
Bookmark cannot be resolved to a type ContextView.java |