sudo apt-get install inkscape
git clone https://github.com/FlyRanch/figurefirst.git
sudo apt-get install python-virtualenv
virtualenv FIG --system-site-packages
######################################################################################################### | |
## OVERVIEW | |
######################################################################################################### | |
# Plot trajectory with oriented, colored wedges. See file end for example. | |
######################################################################################################### | |
## IMPORTS | |
######################################################################################################### |
import multiprocessing | |
import numpy as np | |
import time | |
def compute_something(input): | |
a = input[0] | |
b = input[1] | |
r = a**b**b | |
return r |
import h5py | |
f = h5py.File(filename) | |
print f.keys() | |
data = f[keyname].value # choose a keyname from the list of keys | |
print data | |
a = data[name] # choose a name from the data dtype names | |
import matplotlib.pyplot as plt | |
fig = plt.figure() | |
ax = fig.add_subplot(111) |
#!/bin/sh | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# install ROS | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 | |
sudo apt-get update | |
sudo apt-get install ros-kinetic-desktop-full -y | |
sudo rosdep init | |
rosdep update |
sudo apt-get install inkscape
git clone https://github.com/FlyRanch/figurefirst.git
sudo apt-get install python-virtualenv
virtualenv FIG --system-site-packages
<xml version="1.0" encoding="utf-8"?> | |
<plist version="1.0"> | |
<dict> | |
<key>ProductBuildVersion</key> | |
<string></string> | |
<key>ProductName</key> | |
<string>Linux</string> | |
<key>ProductVersion</key> | |
<string>Ubuntu Linux</string> | |
</dict> |
import gdal | |
d = gdal.Open('10n060e_20101117_gmted_mea300.tif') | |
arr = d.ReadAsArray() | |
def get_elevation_at_point(x, y, elevation_array): | |
# skip interpolation for now | |
return elevation_array[int(x), int(y)] | |
def get_elevation_profile_for_path(x, y, elevation_array): | |
e = [get_elevation_at_point(x[i], y[i], elevation_array) for i in range(len(x))] |