Changeset 4667


Ignore:
Timestamp:
Aug 9, 2007, 9:50:57 AM (10 years ago)
Author:
nick
Message:

removed old data file

Location:
anuga_work/development/alpha_validation
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/alpha_validation/find_alpha.py

    r4537 r4667  
    77from anuga.shallow_water import Reflective_boundary
    88from anuga.utilities.numerical_tools import cov
    9 from Numeric import array, resize,shape,Float,zeros,take,argsort
    10 from pylab import plot, ion, hold,savefig,semilogx,plotting
     9from Numeric import array, resize,shape,Float,zeros,take,argsort,argmin
     10from pylab import plot, ion, hold,savefig,semilogx,plotting,loglog
    1111
    1212
     
    1818                         boundary_tags={'back': [2], 'side': [1,3],
    1919                                        'ocean': [0]},
    20                          maximum_triangle_area=100,
     20                         maximum_triangle_area=1000,
    2121                         filename=mesh_dir_name,
    2222                         use_cache=True,
     
    2424
    2525
    26 topo_dir_name = 'pt_hedland_export.txt'
    27 sample = 'sample.txt'
     26#topo_dir_name = 'pt_hedland_export.txt'
     27topo_dir_name = 'pt_hedland_small.txt'
     28#sample = 'pt_hedland_small.txt'
    2829remainder ='remainder.txt'
    2930#split topo data
     
    3132print 'start split'
    3233
    33 G_sample,G_loss= G.split(0.1, True)
     34
     35
     36
     37
     38G_sample,G_loss= G.split(0.01, True)
     39
     40#G_sample.export_points_file(sample)
    3441
    3542G_small, G_other = G_sample.split(0.1,True)
    3643
    37 
     44#import sys
     45#sys.exit()
    3846
    3947alphas = [0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, 1.0, 10.0, 100.0,1000.0,10000.0]
     
    93101print'data',data[100:200]
    94102print'normal cov',normal_cov
     103#to sort array by column
    95104normal_cov0=normal_cov[:,0]
    96105normal_cov_new=take(normal_cov,argsort(normal_cov0))
    97106semilogx(normal_cov_new[:,0],normal_cov_new[:,1])
     107#loglog(normal_cov_new[:,0],normal_cov_new[:,1])
     108print 'normal_cov_new',normal_cov_new
    98109savefig("alphas",dpi=300)
     110
     111print argmin(normal_cov_new,axis=1)
     112print min(normal_cov_new[:,1]) , normal_cov_new[(argmin(normal_cov_new,axis=0))[1],0]
    99113   
Note: See TracChangeset for help on using the changeset viewer.