Skip to content

Commit

Permalink
Moved modules to stop RTD crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
sambowers committed Jan 16, 2018
1 parent 50ec4da commit 908224f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions biota/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
import datetime as dt
import itertools
import math
import matplotlib.pyplot as plt
import numpy as np
import os
from osgeo import gdal, gdalnumeric, osr, ogr
from PIL import Image, ImageDraw
from scipy import ndimage
import scipy.stats as stats
Expand Down Expand Up @@ -250,6 +248,8 @@ def _buildMap(fig, ax, data, lat, lon, title ='', cbartitle = '', vmin = 10., vm
Builds a standardised map for overviewFigure().
"""

import matplotlib.pyplot as plt

im = ax.imshow(data, vmin = vmin, vmax = vmax, cmap = cmap, interpolation = 'nearest')

ax.set_xticks(np.arange(0,4501,450))
Expand Down Expand Up @@ -277,6 +277,8 @@ def overviewFigure(data_t1, data_t2, output_dir = os.getcwd(), output_name = 'ov
output_name: Optionally specify an output string to precede output file. Defaults to 'overview'.
"""

import matplotlib.pyplot as plt

assert data_t1.geo_t == data_t2.geo_t, "The two ALOS tiles must be from the same location."

# Get upper left longitude and latitude from GeoMatrix
Expand Down Expand Up @@ -337,6 +339,8 @@ def outputGeoTiff(data, geo_t, output_dir, output_name = 'output'):
output_name: Optionally specify an output string to precede output file. Defaults to 'output'.
"""

from osgeo import osr, gdal

lon, lat = geo_t[0], geo_t[3]

hem_NS = 'S' if lat < 0 else 'N'
Expand Down

0 comments on commit 908224f

Please sign in to comment.