Changeset 3861


Ignore:
Timestamp:
Oct 25, 2006, 5:32:42 PM (17 years ago)
Author:
ole
Message:

Played with measures of similarity between timeseries

Location:
anuga_validation/okushiri_2005
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/okushiri_2005/create_okushiri.py

    r3859 r3861  
    9393    #--------------------------------------------------------------------------
    9494
     95
    9596    base_resolution = 1
    9697
  • anuga_validation/okushiri_2005/extract_timeseries.py

    r3854 r3861  
    2121    plotting = True
    2222
    23 plotting = False
     23#plotting = False
    2424
    2525#-------------------------
     
    3939
    4040   
    41 expected_covariances = {'Boundary': 5.288392008865989e-05,
    42                         'ch5': 1.166748190444681e-04,
    43                         'ch7': 1.121816242516758e-04,
    44                         'ch9': 1.249543278366778e-04}
     41#expected_covariances = {'Boundary': 5.288392008865989e-05,
     42#                        'ch5': 1.166748190444681e-04,
     43#                        'ch7': 1.121816242516758e-04,
     44#                        'ch9': 1.249543278366778e-04}
    4545
    4646# old limiters
     
    4949                        'ch7': 1.121474766904651861e-04,
    5050                        'ch9': 1.249244820847215335e-04}
     51
     52expected_differences = {'Boundary': 8.361144081847830638e-04,
     53                        'ch5': 3.423673831653336816e-03,
     54                        'ch7': 2.799962153549145211e-03,
     55                        'ch9': 3.198560464876740433e-03}
     56
    5157
    5258
     
    112118        model.append(f(t, point_id=k)[0])
    113119
     120    # Covariance measures   
    114121    res = cov(observed_timeseries, model)     
    115122    print 'Covariance = %.18e' %res
     
    125132    else:
    126133        pass
     134
     135    # Difference measures   
     136    res = sum(abs(observed_timeseries-model))/len(model)     
     137    print 'Accumulated difference = %.18e' %res
     138
     139    if res < expected_differences[name]-eps:
     140        print 'Result is better than expected by: %.18e'\
     141              %(res-expected_differences[name])
     142        print 'Expect = %.18e' %expected_differences[name]   
     143    elif res > expected_differences[name]+eps:
     144        print 'FAIL: Result is worse than expected by: %.18e'\
     145                                %(res-expected_differences[name])
     146        print 'Expect = %.18e' %expected_differences[name]
     147    else:
     148        pass
     149
     150
    127151
    128152
  • anuga_validation/okushiri_2005/project.py

    r3854 r3861  
    1616# Model output
    1717#output_filename = 'okushiri_old_limiters.sww'
    18 output_filename = 'okushiri_nl_new_mesh.sww'
     18#output_filename = 'okushiri_new_limiters.sww'
     19#output_filename = 'okushiri_nl_coarse10_mesh.sww'
     20output_filename = 'okushiri_nl_coarse100_mesh.sww'
    1921
    2022
    2123
     24
Note: See TracChangeset for help on using the changeset viewer.