Changeset 4745
- Timestamp:
- Oct 4, 2007, 4:03:13 PM (16 years ago)
- Location:
- anuga_core/source/anuga/geospatial_data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/geospatial_data/geospatial_data.py
r4744 r4745 1379 1379 east_boundary=None, 1380 1380 west_boundary=None, 1381 plot_name= None,1381 plot_name='all_alphas', 1382 1382 seed_num=None, 1383 1383 cache=False, … … 1425 1425 from anuga.utilities.numerical_tools import cov 1426 1426 from Numeric import array, resize,shape,Float,zeros,take,argsort,argmin 1427 from pylab import plot, ion, hold,savefig,semilogx,plotting,loglog1428 1427 1429 1428 attribute_smoothed='elevation' … … 1442 1441 mesh_file='temp.msh' 1443 1442 1444 if plot_name is None: 1445 plot_name='alphas' 1443 1446 1444 1447 1445 poly_topo = [[east_boundary,south_boundary], … … 1519 1517 1520 1518 if verbose: print'cov',normal_cov[i][0],'= ',normal_cov[i][1] 1521 1519 1522 1520 normal_cov0=normal_cov[:,0] 1523 1521 normal_cov_new=take(normal_cov,argsort(normal_cov0)) 1524 semilogx(normal_cov_new[:,0],normal_cov_new[:,1]) 1525 loglog(normal_cov_new[:,0],normal_cov_new[:,1]) 1526 savefig(plot_name,dpi=300) 1522 1523 if plot_name is not None: 1524 1525 from pylab import savefig,semilogx,loglog 1526 1527 semilogx(normal_cov_new[:,0],normal_cov_new[:,1]) 1528 loglog(normal_cov_new[:,0],normal_cov_new[:,1]) 1529 savefig(plot_name,dpi=300) 1527 1530 1528 1531 remove(mesh_file) -
anuga_core/source/anuga/geospatial_data/test_geospatial_data.py
r4744 r4745 1901 1901 east_boundary=5, 1902 1902 west_boundary=-5, 1903 plot_name= 'all_alphas',1903 plot_name=None, 1904 1904 seed_num=100000, 1905 1905 verbose=False) … … 1908 1908 results = Geospatial_data(fileName) 1909 1909 os.remove(fileName) 1910 os.remove('all_alphas.png')1911 1910 1912 1911 # print value, alpha … … 1918 1917 1919 1918 #suite = unittest.makeSuite(Test_Geospatial_data, 'test_write_csv_attributes_lat_long') 1920 #suite = unittest.makeSuite(Test_Geospatial_data, 'test_find_optimal_smoothing_parameter')1919 suite = unittest.makeSuite(Test_Geospatial_data, 'test_find_optimal_smoothing_parameter') 1921 1920 # suite = unittest.makeSuite(Test_Geospatial_data, 'test_split') 1922 suite = unittest.makeSuite(Test_Geospatial_data, 'test')1921 # suite = unittest.makeSuite(Test_Geospatial_data, 'test') 1923 1922 runner = unittest.TextTestRunner() #verbosity=2) 1924 1923 runner.run(suite)
Note: See TracChangeset
for help on using the changeset viewer.