In [1]:
%pylab notebook
import matplotlib.pyplot as plt
import numpy as np
from charistools.readers import read_tile
pylab.rcParams['figure.figsize'] = (10.0, 8.0)
In [4]:
%cd /Users/brodzik/projects/CHARIS/elevation_data/SRTMGL3_version2_SIN
%ls
In [6]:
dem22=read_tile('CHARIS_DEM.v2.0.h22v05.tif')
dem23=read_tile('CHARIS_DEM.v2.0.h23v05.tif')
In [7]:
np.amin(dem22), np.amax(dem22), np.amin(dem23), np.amax(dem23)
Out[7]:
In [21]:
%cd /Users/brodzik/projects/CHARIS/basins/subbasins_of_major_basins/AM_snow_subs_basins_modis_masks
%ls
In [22]:
basin22 = read_tile('AM_OBJECTID72_h22v05.tif')
basin23 = read_tile('AM_OBJECTID72_h23v05.tif')
In [23]:
np.amin(basin22), np.amax(basin22), np.amin(basin23), np.amax(basin23)
Out[23]:
In [ ]:
In [ ]:
fig, ax = plt.subplots(1,2)
ax[0].imshow(data, cmap=plt.cm.gray, vmin=170, vmax=8000, interpolation='None')
ax[0].set_title('SRTMGL3 (v1)')
ax[1].imshow(datav2, cmap=plt.cm.gray, vmin=170, vmax=8000, interpolation='None')
ax[1].set_title('CHARIS_DEM (v2)')
plt.axis('off')
fig.savefig('/Users/brodzik/tmp/SRTMGL3_vs_CHARIS_DEMv2.png')
In [ ]:
diff = datav2.astype('float') - data.astype('float')
diff[data == -32768] = 0
diff[datav2 == 32767] = 0
In [ ]:
print np.amin(diff)
print np.amax(diff)
In [ ]:
print(data[1:2,:])
In [ ]:
test = np.array([3.2, 5.6, 2.0, 4.4])
test
In [ ]:
test / 1.25
In [ ]:
new = test / 1.25
new
In [ ]:
new = np.array([2.5, 4.5, 1.5, 3.5])
print new * 0.75
print new
print new * 1.25
In [ ]: