Changeset 2975


Ignore:
Timestamp:
May 25, 2006, 5:21:14 PM (18 years ago)
Author:
ole
Message:

Stochastic work

Location:
development/stochastic_study
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • development/stochastic_study/plot_spread.py

    r2972 r2975  
    1414
    1515# Initialise
    16 gauge_name = project.gauge_names[0]
     16gauge = '%s.txt' %project.gauge_names[0]
    1717number_of_realisations = project.number_of_realisations
    1818
     
    2525j = 0 # Count realisations
    2626for filename in os.listdir('.'):
    27     if filename.startswith(project.basename) and filename.endswith('%s.txt' %gauge_name):
     27    if filename.startswith(project.basename) and filename.endswith(gauge):
    2828        if j < data.shape[1]:       
    2929            print 'Reading filename %s (column %d)' %(filename, j)
     
    5151for j in range(number_of_realisations):
    5252    #print j, data[:,j]
    53     plot(data[:,j], 'k-')
     53    plot(time, data[:,j], 'k-')
    5454   
    55     raw_input('Next')
    5655    xlabel('time(s)')
    5756    ylabel('stage (m)')
    58     title('Realisation %d of %d' %(j, number_of_realisations))   
    59    
     57    title('Realisation %d of %d' %(j, number_of_realisations-1))   
     58
     59    raw_input('Next')
     60
    6061
    6162
     
    6869    bins = create_bins(w, project.number_of_bins)
    6970    print 'bins', bins
    70     hist = histogram(w, bins)
    71     print 'hist', hist
     71    hist = histogram(w, bins, relative=True)
     72    #print 'hist', hist
    7273   
    7374    #plot(w, 'k.')
    74     plot(hist, 'k.')
     75    plot(bins, hist, 'k.')
    7576    xlabel('stage (m)')
    76     ylabel('count')
     77    ylabel('frequency')
    7778    title('Timestep %d of %d (t=%.2f)'\
    78           %(i, project.number_of_timesteps, time[i]))       
     79          %(i, project.number_of_timesteps-1, time[i]))       
    7980    raw_input('Next')
    8081
  • development/stochastic_study/project.py

    r2972 r2975  
    1919
    2020# Stats (Suresh ?)
    21 number_of_realisations = 1
     21number_of_realisations = 9
    2222#std_dev = 0.0026  #Range is 26.035 cm
    2323std_dev = 0.0013  #Range is 26.035 cm
Note: See TracChangeset for help on using the changeset viewer.