First pages commit

This commit is contained in:
Rafat Hussain 2015-09-21 17:49:35 +05:30
commit 4645c9b8b9
23 changed files with 87021 additions and 0 deletions

5400
data/ecg.txt Normal file

File diff suppressed because it is too large Load Diff

512
data/heavisine.txt Normal file
View File

@ -0,0 +1,512 @@
0.0982
0.1963
0.2943
0.3921
0.4896
0.5869
0.6838
0.7804
0.8764
0.9719
1.0669
1.1611
1.2547
1.3476
1.4396
1.5307
1.6210
1.7102
1.7984
1.8856
1.9716
2.0564
2.1400
2.2223
2.3032
2.3828
2.4609
2.5376
2.6127
2.6862
2.7582
2.8284
2.8970
2.9638
3.0288
3.0920
3.1534
3.2128
3.2703
3.3259
3.3794
3.4309
3.4803
3.5277
3.5729
3.6160
3.6568
3.6955
3.7320
3.7662
3.7981
3.8278
3.8551
3.8801
3.9028
3.9231
3.9411
3.9567
3.9699
3.9807
3.9892
3.9952
3.9988
4.0000
3.9988
3.9952
3.9892
3.9807
3.9699
3.9567
3.9411
3.9231
3.9028
3.8801
3.8551
3.8278
3.7981
3.7662
3.7320
3.6955
3.6568
3.6160
3.5729
3.5277
3.4803
3.4309
3.3794
3.3259
3.2703
3.2128
3.1534
3.0920
3.0288
2.9638
2.8970
2.8284
2.7582
2.6862
2.6127
2.5376
2.4609
2.3828
2.3032
2.2223
2.1400
2.0564
1.9716
1.8856
1.7984
1.7102
1.6210
1.5307
1.4396
1.3476
1.2547
1.1611
1.0669
0.9719
0.8764
0.7804
0.6838
0.5869
0.4896
0.3921
0.2943
0.1963
0.0982
0.0000
-0.0982
-0.1963
-0.2943
-0.3921
-0.4896
-0.5869
-0.6838
-0.7804
-0.8764
-0.9719
-1.0669
-1.1611
-1.2547
-1.3476
-1.4396
-1.5307
-1.6210
-1.7102
-1.7984
-1.8856
-1.9716
-2.0564
-2.1400
-2.2223
-2.3032
-4.3828
-4.4609
-4.5376
-4.6127
-4.6862
-4.7582
-4.8284
-4.8970
-4.9638
-5.0288
-5.0920
-5.1534
-5.2128
-5.2703
-5.3259
-5.3794
-5.4309
-5.4803
-5.5277
-5.5729
-5.6160
-5.6568
-5.6955
-5.7320
-5.7662
-5.7981
-5.8278
-5.8551
-5.8801
-5.9028
-5.9231
-5.9411
-5.9567
-5.9699
-5.9807
-5.9892
-5.9952
-5.9988
-6.0000
-5.9988
-5.9952
-5.9892
-5.9807
-5.9699
-5.9567
-5.9411
-5.9231
-5.9028
-5.8801
-5.8551
-5.8278
-5.7981
-5.7662
-5.7320
-5.6955
-5.6568
-5.6160
-5.5729
-5.5277
-5.4803
-5.4309
-5.3794
-5.3259
-5.2703
-5.2128
-5.1534
-5.0920
-5.0288
-4.9638
-4.8970
-4.8284
-4.7582
-4.6862
-4.6127
-4.5376
-4.4609
-4.3828
-4.3032
-4.2223
-4.1400
-4.0564
-3.9716
-3.8856
-3.7984
-3.7102
-3.6210
-3.5307
-3.4396
-3.3476
-3.2547
-3.1611
-3.0669
-2.9719
-2.8764
-2.7804
-2.6838
-2.5869
-2.4896
-2.3921
-2.2943
-2.1963
-2.0982
-2.0000
-1.9018
-1.8037
-1.7057
-1.6079
-1.5104
-1.4131
-1.3162
-1.2196
-1.1236
-1.0281
-0.9331
-0.8389
-0.7453
-0.6524
-0.5604
-0.4693
-0.3790
-0.2898
-0.2016
-0.1144
-0.0284
0.0564
0.1400
0.2223
0.3032
0.3828
0.4609
0.5376
0.6127
0.6862
0.7582
0.8284
0.8970
0.9638
1.0288
1.0920
1.1534
1.2128
1.2703
1.3259
1.3794
1.4309
1.4803
1.5277
1.5729
1.6160
1.6568
1.6955
1.7320
1.7662
1.7981
1.8278
1.8551
1.8801
1.9028
1.9231
1.9411
1.9567
1.9699
1.9807
1.9892
1.9952
1.9988
2.0000
1.9988
1.9952
1.9892
1.9807
1.9699
1.9567
1.9411
1.9231
1.9028
1.8801
1.8551
1.8278
1.7981
1.7662
1.7320
1.6955
1.6568
1.6160
1.5729
1.5277
1.4803
1.4309
1.3794
1.3259
1.2703
1.2128
1.1534
1.0920
1.0288
0.9638
0.8970
0.8284
0.7582
0.6862
0.6127
0.5376
0.4609
0.3828
0.3032
0.2223
0.1400
0.0564
-0.0284
-0.1144
-0.2016
-0.2898
-0.3790
-0.4693
1.4396
1.3476
1.2547
1.1611
1.0669
0.9719
0.8764
0.7804
0.6838
0.5869
0.4896
0.3921
0.2943
0.1963
0.0982
0.0000
-0.0982
-0.1963
-0.2943
-0.3921
-0.4896
-0.5869
-0.6838
-0.7804
-0.8764
-0.9719
-1.0669
-1.1611
-1.2547
-1.3476
-1.4396
-1.5307
-1.6210
-1.7102
-1.7984
-1.8856
-1.9716
-2.0564
-2.1400
-2.2223
-2.3032
-2.3828
-2.4609
-2.5376
-2.6127
-2.6862
-2.7582
-2.8284
-2.8970
-2.9638
-3.0288
-3.0920
-3.1534
-3.2128
-3.2703
-3.3259
-3.3794
-3.4309
-3.4803
-3.5277
-3.5729
-3.6160
-3.6568
-3.6955
-3.7320
-3.7662
-3.7981
-3.8278
-3.8551
-3.8801
-3.9028
-3.9231
-3.9411
-3.9567
-3.9699
-3.9807
-3.9892
-3.9952
-3.9988
-4.0000
-3.9988
-3.9952
-3.9892
-3.9807
-3.9699
-3.9567
-3.9411
-3.9231
-3.9028
-3.8801
-3.8551
-3.8278
-3.7981
-3.7662
-3.7320
-3.6955
-3.6568
-3.6160
-3.5729
-3.5277
-3.4803
-3.4309
-3.3794
-3.3259
-3.2703
-3.2128
-3.1534
-3.0920
-3.0288
-2.9638
-2.8970
-2.8284
-2.7582
-2.6862
-2.6127
-2.5376
-2.4609
-2.3828
-2.3032
-2.2223
-2.1400
-2.0564
-1.9716
-1.8856
-1.7984
-1.7102
-1.6210
-1.5307
-1.4396
-1.3476
-1.2547
-1.1611
-1.0669
-0.9719
-0.8764
-0.7804
-0.6838
-0.5869
-0.4896
-0.3921
-0.2943
-0.1963
-0.0982
-0.0000

2048
data/noisybumps.txt Normal file

File diff suppressed because it is too large Load Diff

512
data/noisyheavisine.txt Normal file
View File

@ -0,0 +1,512 @@
1.0657
1.0006
0.6117
0.4044
0.7049
0.8592
0.4489
0.6764
1.4804
1.3729
1.1876
0.8359
1.0592
1.6929
1.5832
1.4987
1.9193
0.9968
2.2814
1.8615
1.8153
2.2991
2.3962
2.6282
2.6752
2.8719
2.3616
2.2559
2.3763
2.5818
3.2529
2.2118
2.7430
3.0733
3.3577
2.7022
3.1119
3.2637
3.2952
3.4738
3.3380
3.1535
3.3264
3.5341
4.1180
3.7819
3.6842
3.8126
3.9201
4.4759
3.9019
4.4292
3.9813
4.2000
4.1341
4.6312
3.5677
3.5918
4.1196
4.3429
4.0506
3.9147
4.5915
3.7525
4.3211
4.7630
4.1468
3.6378
4.9381
3.6221
4.0528
4.2498
4.3916
3.8548
4.1120
3.1226
3.8218
3.4635
3.0588
4.1349
4.2391
3.7100
3.1359
4.4892
3.3203
3.7948
3.3253
3.8491
3.3987
3.0231
3.1837
3.0502
3.5930
3.2456
3.0435
2.5884
2.4189
2.9470
3.1980
2.2149
1.9529
3.0684
2.3438
1.9030
1.6420
2.5492
2.5800
2.5930
2.0497
1.7434
2.4729
2.0337
0.7426
1.3418
2.2373
0.8947
1.1703
0.8237
1.4013
0.5204
0.7086
0.2940
0.4183
0.8239
0.3488
0.1901
-0.2755
-0.5884
0.0459
-0.0061
-0.1662
-1.1395
-0.2187
-0.4940
-0.1904
-0.7303
-0.8049
-1.2128
-1.4796
-1.2787
-0.6750
-0.6300
-1.9705
-1.3766
-1.6300
-1.6662
-1.4749
-2.2873
-2.3715
-1.9438
-2.0246
-2.3207
-2.3904
-4.0250
-4.7166
-4.6094
-4.3269
-4.5663
-4.1415
-4.8460
-4.9088
-5.1159
-5.2494
-4.7209
-5.6772
-5.3329
-6.3053
-5.0153
-5.1394
-5.0556
-5.8880
-5.5547
-5.5403
-6.3194
-6.3660
-5.9584
-5.1940
-4.9157
-5.7317
-6.5066
-5.7450
-5.7231
-5.9420
-5.8529
-6.6728
-6.5548
-5.6438
-6.0741
-6.6387
-6.1218
-6.3158
-5.7250
-6.0155
-5.8662
-5.7875
-6.3902
-5.9303
-6.0030
-5.6667
-5.1734
-5.7733
-5.9180
-5.8427
-6.0721
-6.4873
-5.5756
-5.9103
-5.5415
-5.6358
-5.8095
-5.4756
-5.2417
-5.4192
-5.3777
-5.7800
-4.8058
-4.7930
-6.2389
-5.9839
-4.9383
-5.3716
-5.4538
-3.8454
-5.1885
-5.2452
-4.5655
-4.9033
-4.9928
-5.0235
-4.6184
-4.0967
-4.8166
-4.1745
-4.0614
-4.1093
-3.4929
-3.5424
-2.5478
-4.1180
-3.4682
-3.1256
-3.5773
-3.0447
-2.4956
-2.7483
-2.6201
-2.9657
-2.6621
-2.8913
-2.6488
-2.5289
-1.9951
-2.1213
-2.2065
-2.2494
-2.0965
-2.3657
-1.5025
-1.2423
-2.0154
-0.8329
-1.6098
-1.2474
-1.0787
-1.2216
-1.0861
-1.3985
-0.8476
-0.4991
0.0904
-0.5278
0.1709
-0.5306
-0.8072
-0.4898
-0.3393
0.2191
-0.4752
0.0910
-0.2168
-0.7928
0.4831
0.1193
0.9896
0.4941
1.1458
1.1746
1.6752
0.6359
0.5090
1.4067
0.9310
1.0004
1.4047
1.4470
1.4776
1.8183
1.7719
1.0112
1.6877
1.3403
1.2260
1.7027
1.7228
1.5210
1.9816
2.0695
2.0422
1.6521
1.3538
1.6597
1.6981
1.9754
2.2320
2.8194
1.9796
1.9535
1.8937
1.6508
2.1684
1.9457
2.2100
2.3376
1.4828
2.3156
1.6363
1.6415
1.6262
1.7795
1.2742
2.1842
1.5837
2.1802
2.5516
1.8494
1.5392
1.8861
1.1615
1.5972
1.5326
1.4134
1.1573
0.9850
1.3061
1.5567
1.1001
0.5861
1.2758
1.4634
0.5481
-0.2347
1.2253
0.7886
-0.0569
0.3684
1.0031
0.2320
0.2774
0.3051
0.2066
-0.0612
-0.4045
0.2544
0.1755
0.1436
0.6782
-0.3352
-0.4587
1.8259
1.3455
1.8159
1.8610
1.4192
1.4261
1.0369
0.8564
0.4077
0.5913
0.0495
1.1516
0.2284
-0.0953
-0.2963
0.3560
0.0803
0.1577
0.1330
-0.4338
0.1264
-0.5193
-0.3638
-1.4667
-0.8071
-1.1646
-1.3581
-2.0099
-1.9754
-1.3684
-1.4739
-2.0044
-1.9212
-1.3331
-1.8712
-1.9120
-1.6113
-1.4759
-2.5851
-1.5004
-2.2432
-2.4955
-1.8040
-2.2723
-2.7506
-2.7914
-3.0147
-3.1889
-2.6117
-2.9667
-4.1494
-3.1516
-2.9235
-2.9130
-3.3368
-3.5575
-3.2338
-3.6494
-3.2499
-4.3063
-3.3651
-2.9785
-3.3652
-3.4743
-4.0558
-3.9807
-3.2774
-4.0199
-4.5528
-4.2490
-3.5356
-3.9068
-3.7764
-3.7189
-3.2039
-3.6964
-4.9097
-3.4455
-3.4451
-4.1807
-4.2489
-3.5878
-4.1839
-4.1409
-3.4127
-3.8450
-3.1923
-4.2415
-4.1260
-3.1998
-4.1118
-4.3941
-4.0991
-3.7035
-3.5813
-3.6244
-3.8968
-4.0114
-3.0996
-2.5770
-2.5784
-2.5148
-3.4869
-3.1257
-3.3178
-3.2136
-3.3256
-3.1696
-2.6366
-2.7773
-3.4404
-2.7195
-1.7045
-2.7076
-2.4246
-3.3656
-2.7804
-2.5646
-2.2261
-1.8682
-2.7736
-2.1846
-2.2518
-2.1819
-1.6506
-1.1380
-1.4379
-1.2677
-0.9920
-0.9576
-1.7788
-1.1704
-1.0133
-0.0132
-0.5174
-0.7500
-0.5398
-1.4065
-1.4180
-0.5397
0.2176
0.0255
-0.1699
-0.0142

1024
data/piecepoly.txt Normal file

File diff suppressed because it is too large Load Diff

256
data/pieceregular.txt Normal file
View File

@ -0,0 +1,256 @@
-18.3237
-18.2232
-18.0974
-17.9410
-17.7480
-17.5113
-17.2230
-16.8744
-16.4558
-15.9565
-15.3653
-14.6701
-13.8586
-12.9182
-11.8363
-10.6008
-9.2006
-7.6257
-5.8680
-3.9217
-1.7839
0.5452
3.0614
5.7562
8.6167
11.6252
14.7591
17.9909
21.2884
24.6155
27.9319
31.1947
34.3587
37.3775
40.2049
42.7957
13.2164
14.2125
15.0317
15.6595
16.0845
16.2990
16.2990
16.0845
15.6595
15.0317
14.2125
13.2164
12.0608
10.7654
9.3517
34.3587
31.1947
27.9319
24.6155
21.2884
17.9909
14.7591
11.6252
8.6167
5.7562
3.0614
0.5452
-1.7839
-3.9217
-5.8680
-7.6257
-9.2006
-10.6008
-11.8363
-12.9182
-13.8586
-14.6701
-15.3653
-15.9565
-16.4558
-16.8744
-17.2230
-17.5113
-17.7480
-17.9410
-18.0974
-18.2232
-18.3237
-18.4035
-18.0080
-17.8889
-17.7403
-17.5533
-17.3156
-17.0102
-16.6129
-16.0884
-15.3848
-14.4239
-13.0840
-11.1708
-8.3634
-4.1098
2.5833
13.6048
32.7934
28.0187
10.9660
1.0776
-4.9459
-8.7354
-11.1225
-12.4865
-12.8019
-11.2050
-3.3124
1.8995
-11.3573
-15.0684
-16.5028
-17.1937
-17.5831
-17.8288
-17.9968
-18.1185
-18.2103
-18.2818
-18.3388
-18.3849
-18.4229
-18.4545
-18.4810
-17.4642
-17.2104
-16.9033
-16.5317
-16.0822
-15.5384
-14.8804
-14.0844
-13.1214
-11.9563
-10.5467
-8.8414
-6.7782
-4.2822
-1.2624
2.3911
6.8111
12.1585
18.6280
26.4549
35.9241
35.9241
26.4549
18.6280
12.1585
6.8111
2.3911
-1.2624
-4.2822
-6.7782
-8.8414
-10.5467
-11.9563
-13.1214
-14.0844
-14.8804
-15.5384
-16.0822
-16.5317
-16.9033
-17.2104
-17.4642
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
6.3259
34.8066
34.6752
34.5285
34.3645
34.1812
33.9763
33.7474
33.4917
33.2058
32.8863
32.5294
32.1304
31.6846
31.1864
30.6296
30.0074
29.3121
28.5350
27.6667
26.6963
25.6118
24.3999
23.0456
21.5322
19.8408
17.9507
15.8385
13.4781
10.8403
7.8925
4.5982
0.9168
-3.1972
-7.7947
-12.9325
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.6741
-18.3237

2048
data/pieceregular2048.txt Normal file

File diff suppressed because it is too large Load Diff

73
data/wavedb.json Normal file
View File

@ -0,0 +1,73 @@
{
"id" : "0",
"family" : "haar",
"wavelets" : [
{ "haar" }
]
},{
"id" : "1",
"family" : "daubechies",
"wavelets" : [
{ "db1" },
{ "db2" },
{ "db3" },
{ "db4" },
{ "db5" },
{ "db6" },
{ "db7" },
{ "db8" },
{ "db9" },
{ "db10" },
{ "db11" },
{ "db12" },
{ "db13" },
{ "db14" },
{ "db15" }
]
},{
"id" : "2",
"family" : "biorthogonal",
"wavelets" : [
{ "bior1.1" },
{ "bior1.3" },
{ "bior1.5" },
{ "bior2.2" },
{ "bior2.4" },
{ "bior2.6" },
{ "bior2.8" },
{ "bior3.1" },
{ "bior3.3" },
{ "bior3.5" },
{ "bior3.7" },
{ "bior3.9" },
{ "bior4.4" },
{ "bior5.5" },
{ "bior6.8" }
]
},{
"id" : "3",
"family" : "coiflets",
"wavelets" : [
{ "coif1" },
{ "coif2" },
{ "coif3" },
{ "coif4" },
{ "coif5" }
]
},{
"id" : "4",
"family" : "symmlets",
"wavelets" : [
{ "sym2" },
{ "sym3" },
{ "sym4" },
{ "sym5" },
{ "sym6" },
{ "sym7" },
{ "sym8" },
{ "sym9" },
{ "sym10" }
]
}
}

48
display.html Normal file
View File

@ -0,0 +1,48 @@
<div class="row marketing">
<div class="col-md-3"></div>
<div class="col-md-6 col-sm-12">
<select class="wide-control form-control default" data-ng-model="selected.wdisplay"
data-ng-options="wdisplays.indexOf(e) as e for e in wdisplays" data-ng-change="updateGraph()">
</select>
</div>
<div class="col-md-3"></div>
</div>
<div class="row marketing">
<div class="col-md-3"></div>
<div class="col-md-6 col-sm-12">
<div id="graph1" style="width:100%"></div>
</div>
<div class="col-md-3"></div>
</div>
<div class="row marketing">
<div class="col-md-6">
<select class="wide-control form-control default" data-ng-model="selected.family"
data-ng-options="a.family for a in wavedb">
<option value=""> Wavelet Family </option>
</select>
</div>
<div class="col-md-6">
<select class="wide-control form-control default" data-ng-model="selected.wavelet"
data-ng-options="b.wavelet for b in selected.family.wavelets" data-ng-change="getMaxIter()">
<option value=""> Wavelet </option>
</select>
</div>
<div class="col-md-6">
<select class="wide-control form-control default" data-ng-model="selected.method"
data-ng-options="c.method for c in methods">
<option value=""> Wavelet Methods </option>
</select>
</div>
<div class="col-md-6">
<select class="wide-control form-control default" data-ng-model="selected.level"
data-ng-options="d for d in levels">
<option value=""> Decomposition Levels </option>
</select>
</div>
<div class="col-md-6">
<button class="btn btn-primary btn-block" data-ng-click="waveTest()">
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>GO</button>
</div>
</div>

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

56
front.html Normal file
View File

@ -0,0 +1,56 @@
<div class="header clearfix">
<h3 class="text-muted">Wavelib : Wavelet Transform Online Demo</h3>
</div>
<div class="row marketing">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4> File Input</h4>
</div>
<div class="panel-body">
<span class="btn btn-block btn-primary btn-file">
Browse<input type="file" id="finp1"></input>
</span>
<button class="btn btn-primary btn-block" data-ng-click="fileInput()" data-uib="twitter%20bootstrap/button" data-ver="1">
<span class="glyphicon glyphicon-folder-open pull-left" data-position="left"></span>Upload</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Data Input</h4>
</div>
<div class="panel-body">
<input class="wide-control form-control default" type="text" data-ng-model="inp1" placeholder="Copy and Paste Data Here">
<button class="btn btn-primary btn-block" data-ng-click="dataInput()">
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>GO</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4> Test Signals</h4>
</div>
<div class="panel-body">
<button class="btn btn-primary btn-block"><span class="glyphicon glyphicon-hand-down pull-left" data-position="left">
</span>Select Example</button>
<select class="wide-control form-control default" data-ng-model="tvalue" data-ng-change="testInput()" id="testsig1">
<option></option>
<option>ECG</option>
<option>Heavisine</option>
<option>Piecewise Regular 256</option>
<option>Piecewise Regular 2048</option>
<option>Piecewise Polynomial</option>
<option>Noisy Bumps</option>
<option>Noisy Heavisine</option>
</select>
</div>
</div>
</div>
</div>

BIN
img/3dgausswave.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

65
index.html Normal file
View File

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Wavelets Demo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="stylesheets/free.css">
<script src="js/ie-emulation-modes-warning.js"></script>
</head>
<body data-ng-app="ngmain">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">WaveDemo</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#/inputs">Inputs</a>
</li>
<li>
<a href="#/about">About</a>
</li>
<li>
<a href="http://rafat.github.io">rafat.github.io</a>
</li>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="container">
<div data-ng-view></div>
<footer class="footer">
<p>&copy; Rafat Hussain 2015</p>
</footer>
</div> <!-- /container -->
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
<script src="js/app.js"></script>
<script src="js/wavelet.js"></script>
<!--<script src="js/index_user_scripts.js"></script> -->
<script src="js/dygraph-combined-dev.js"></script>
<script src="js/wavewrapper.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-route.min.js"></script>
<script src="js/ngfile.js"></script>
</body>
</html>

28
js/app.js Normal file
View File

@ -0,0 +1,28 @@
/*
* Please see the included README.md file for license terms and conditions.
*/
// This file is a suggested starting place for your code.
// It is completely optional and not required.
// Note the reference that includes it in the index.html file.
/*jslint browser:true, devel:true, white:true, vars:true */
/*global $:false, intel:false app:false, dev:false, cordova:false */
// This file contains your event handlers, the center of your application.
// NOTE: see app.initEvents() in init-app.js for event handler initialization code.
// function myEventHandler() {
// "use strict" ;
// // ...event handler code here...
// }
// ...additional event handlers here...
var wave = {};

12127
js/dygraph-combined-dev.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
// IT'S JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
/*!
* Copyright 2014 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes.
(function () {
'use strict';
function emulatedIEMajorVersion() {
var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent)
if (groups === null) {
return null
}
var ieVersionNum = parseInt(groups[1], 10)
var ieMajorVersion = Math.floor(ieVersionNum)
return ieMajorVersion
}
function actualNonEmulatedIEMajorVersion() {
// Detects the actual version of IE in use, even if it's in an older-IE emulation mode.
// IE JavaScript conditional compilation docs: http://msdn.microsoft.com/en-us/library/ie/121hztk3(v=vs.94).aspx
// @cc_on docs: http://msdn.microsoft.com/en-us/library/ie/8ka90k2e(v=vs.94).aspx
var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line
if (jscriptVersion === undefined) {
return 11 // IE11+ not in emulation mode
}
if (jscriptVersion < 9) {
return 8 // IE8 (or lower; haven't tested on IE<8)
}
return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode
}
var ua = window.navigator.userAgent
if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) {
return // Opera, which might pretend to be IE
}
var emulated = emulatedIEMajorVersion()
if (emulated === null) {
return // Not IE
}
var nonEmulated = actualNonEmulatedIEMajorVersion()
if (emulated !== nonEmulated) {
window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
}
})();

View File

@ -0,0 +1,22 @@
/*!
* IE10 viewport hack for Surface/desktop Windows 8 bug
* Copyright 2014 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
// See the Getting Started docs for more information:
// http://getbootstrap.com/getting-started/#support-ie10-width
(function () {
'use strict';
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement('style')
msViewportStyle.appendChild(
document.createTextNode(
'@-ms-viewport{width:auto!important}'
)
)
document.querySelector('head').appendChild(msViewportStyle)
}
})();

95
js/index_user_scripts.js Normal file
View File

@ -0,0 +1,95 @@
(function()
{
"use strict";
/*
hook up event handlers
*/
function register_event_handlers()
{
/* button .uib_w_2 */
$(document).on("click", ".uib_w_2", function(evt)
{
var x = $("#inp1").val().split(/[\s,;\t\r\n]+/);
wave.sigData = new Float64Array(x.length);
wave.sigLength = x.length;
var i;
for(i = 0;i < x.length;i++) {
wave.sigData[i] = parseFloat(x[i]);
}
alert(wave.sigData[2]);
displayPage();
});
/* button .uib_w_4 */
$(document).on("click", ".uib_w_4", function(evt)
{
var fileinput = document.getElementById('finp1');
var finp1 = fileinput.files[0];
var reader = new FileReader();
reader.onload = function(e) {
var x = reader.result.split(/[\s,;\t\r\n]+/);
wave.sigData = new Float64Array(x.length);
wave.sigLength = x.length;
var i;
for(i = 0;i < x.length;i++) {
wave.sigData[i] = parseFloat(x[i]);
}
alert(wave.sigData[0]);
displayPage();
}
reader.readAsText(finp1);
});
}
document.addEventListener("app.Ready", register_event_handlers, false);
})();
$(document).ready(function(){
$('#testsig1').change(function(){
var value = $(this).val();
var urlx = null;
if (value == "ECG") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/ecg.txt";
} else if (value == "Heavisine") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/heavisine.txt";
} else if (value == "Piecewise Regular 256") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/pieceregular.txt";
} else if (value == "Piecewise Regular 2048") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/pieceregular2048.txt";
} else if (value == "Piecewise Polynomial") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/piecepoly.txt";
} else if (value == "Noisy Bumps") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/noisybumps.txt";
} else if (value == "Noisy Heavisine") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/noisyheavisine.txt";
} else {
alert("Please Select A Signal To Proceed.");
}
console.log(urlx);
$.ajax({
type: "GET",
url: urlx,
success: function(data) {
var x = data.split(/[\s,;\t\r\n]+/);
wave.sigData = new Float64Array(x.length);
wave.sigLength = x.length;
var i;
for(i = 0;i < x.length;i++) {
wave.sigData[i] = parseFloat(x[i]);
}
console.log(wave.sigLength);
alert(wave.sigData[0]);
displayPage();
},
error: function() {
alert("Signal cannot be loaded. Please try again.")
}
});
});
});

430
js/ngfile.js Normal file
View File

@ -0,0 +1,430 @@
var app = angular.module('ngmain', ['ngRoute']);
app.config(function($routeProvider){
$routeProvider
//the timeline display
.when('/', {
templateUrl: 'front.html',
controller: 'mainController'
})
.when('/display', {
templateUrl: 'display.html',
controller: 'displayController'
})
.when('/about', {
templateUrl: 'about.html',
controller: 'mainController'
})
.when('/demos', {
templateUrl: 'demos.html',
controller: 'mainController'
})
});
app.factory('wave', function () {
var wave = {};
return wave;
});
/*
app.directive("fileread", [function () {
return {
scope: {
fileread: "="
},
link: function (scope, element, attributes) {
element.bind("change", function (changeEvent) {
var reader = new FileReader();
reader.onload = function (loadEvent) {
scope.$apply(function () {
scope.fileread = loadEvent.target.result;
});
}
reader.readAsDataURL(changeEvent.target.files[0]);
});
}
}
}]);*/
app.controller('mainController', function ($scope, $http, wave) {
$scope.dataInput = function () {
var x = $scope.inp1.valueOf().split(/[\s,;\t\r\n]+/);
wave.sigData = new Float64Array(x.length);
wave.sigLength = x.length;
//console.log(wave.sigLength);
var i;
for (i = 0; i < x.length; i++) {
wave.sigData[i] = parseFloat(x[i]);
}
//alert(wave.sigData[0]);
location.href = '#/display';
}
$scope.fileInput = function () {
var fileinput = document.getElementById('finp1');
var finp1 = fileinput.files[0];
var reader = new FileReader();
var temp = 3.14159;
reader.onload = function (e) {
var x = reader.result.split(/[\s,;\t\r\n]+/);
wave.sigData = new Float64Array(x.length);
var i;
var j = 0;
for (i = 0; i < x.length; i++) {
temp = parseFloat(x[i]);
if (!isNaN(temp)) {
wave.sigData[j] = temp;
j = j + 1;
}
}
wave.sigLength = j;
location.href = '#/display';
}
reader.readAsText(finp1);
}
$scope.testInput = function () {
var value = $scope.tvalue;
var urlx = null;
var data;
var temp = 3.14159;
if (value == "ECG") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/ecg.txt";
} else if (value == "Heavisine") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/heavisine.txt";
} else if (value == "Piecewise Regular 256") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/pieceregular.txt";
} else if (value == "Piecewise Regular 2048") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/pieceregular2048.txt";
} else if (value == "Piecewise Polynomial") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/piecepoly.txt";
} else if (value == "Noisy Bumps") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/noisybumps.txt";
} else if (value == "Noisy Heavisine") {
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/noisyheavisine.txt";
} else {
alert("Please Select A Signal To Proceed.");
}
$http({ method: 'GET', url: urlx }).
then(function (response) {
$scope.status = response.status;
data = response.data;
var x = data.split(/[\s,;\t\r\n]+/);
wave.sigData = new Float64Array(x.length);
var i;
var j = 0;
for (i = 0; i < x.length; i++) {
temp = parseFloat(x[i]);
if (!isNaN(temp)) {
wave.sigData[j] = temp;
j = j + 1;
}
}
wave.sigLength = j;
location.href = '#/display';
}, function (response) {
$scope.data = response.data || "Request failed";
$scope.status = response.status;
});
}
});
app.controller('siteController', function ($scope) {
});
app.controller('frontController', function ($scope) {
});
app.controller('displayController', function ($scope, $http, wave) {
//console.log(wave.sigLength);
var lbl = [];
$scope.MaxIter = 0;
$scope.selected = {};
$scope.wdisplays = [];
for (i = 0; i < wave.sigLength; ++i) {
lbl[i] = [i, wave.sigData[i]];
//console.log(lbl[i]);
}
g = new Dygraph(document.getElementById("graph1"),
lbl,
{
legend: 'always',
color: '#3399ff',
animatedZooms: true,
title: 'Input'
}
);
/*
$http.get('data/wavedb.json').success(function (data) {
$scope.wavedb = data;
});console
*/
$scope.wavedb = [
{
"id": "0",
"family": "haar",
"wavelets": [
{ "wavelet": "haar", "filtlength": "2" }
]
}, {
"id": "1",
"family": "daubechies",
"wavelets": [
{ "wavelet": "db1", "filtlength": "2" },
{ "wavelet": "db2", "filtlength": "4" },
{ "wavelet": "db3", "filtlength": "6" },
{ "wavelet": "db4", "filtlength": "8" },
{ "wavelet": "db5", "filtlength": "10" },
{ "wavelet": "db6", "filtlength": "12" },
{ "wavelet": "db7", "filtlength": "14" },
{ "wavelet": "db8", "filtlength": "16" },
{ "wavelet": "db9", "filtlength": "18" },
{ "wavelet": "db10", "filtlength": "20" },
{ "wavelet": "db11", "filtlength": "22" },
{ "wavelet": "db12", "filtlength": "24" },
{ "wavelet": "db13", "filtlength": "26" },
{ "wavelet": "db14", "filtlength": "28" },
{ "wavelet": "db15", "filtlength": "30" }
]
}, {
"id": "2",
"family": "biorthogonal",
"wavelets": [
{ "wavelet": "bior1.1", "filtlength": "2" },
{ "wavelet": "bior1.3", "filtlength": "6" },
{ "wavelet": "bior1.5", "filtlength": "10" },
{ "wavelet": "bior2.2", "filtlength": "6" },
{ "wavelet": "bior2.4", "filtlength": "10" },
{ "wavelet": "bior2.6", "filtlength": "14" },
{ "wavelet": "bior2.8", "filtlength": "18" },
{ "wavelet": "bior3.1", "filtlength": "4" },
{ "wavelet": "bior3.3", "filtlength": "8" },
{ "wavelet": "bior3.5", "filtlength": "12" },
{ "wavelet": "bior3.7", "filtlength": "16" },
{ "wavelet": "bior3.9", "filtlength": "20" },
{ "wavelet": "bior4.4", "filtlength": "10" },
{ "wavelet": "bior5.5", "filtlength": "12" },
{ "wavelet": "bior6.8", "filtlength": "18" }
]
}, {
"id": "3",
"family": "coiflets",
"wavelets": [
{ "wavelet": "coif1", "filtlength": "6" },
{ "wavelet": "coif2", "filtlength": "12" },
{ "wavelet": "coif3", "filtlength": "18" },
{ "wavelet": "coif4", "filtlength": "24" },
{ "wavelet": "coif5", "filtlength": "30" }
]
}, {
"id": "4",
"family": "symmlets",
"wavelets": [
{ "wavelet": "sym2", "filtlength": "4" },
{ "wavelet": "sym3", "filtlength": "6" },
{ "wavelet": "sym4", "filtlength": "8" },
{ "wavelet": "sym5", "filtlength": "10" },
{ "wavelet": "sym6", "filtlength": "12" },
{ "wavelet": "sym7", "filtlength": "14" },
{ "wavelet": "sym8", "filtlength": "16" },
{ "wavelet": "sym9", "filtlength": "18" },
{ "wavelet": "sym10", "filtlength": "20" }
]
}
];
$scope.methods = [
{
"id": "0",
"method": "DWT (Symmetric)"
}, {
"id": "1",
"method": "DWT (Periodic)"
}, {
"id": "2",
"method": "SWT"
}, {
"id": "3",
"method": "MODWT"
}
];
$scope.levels = [];
$scope.getMaxIter = function () {
var flength = $scope.selected.wavelet.filtlength;
var slength = wave.sigLength;
$scope.MaxIter = Math.floor(Math.log(slength / (flength - 1)) / Math.log(2.0));
$scope.levels = [];
for (var i = 0; i < $scope.MaxIter; i++) {
$scope.levels[i] = i + 1;
}
}
$scope.waveTest = function () {
var method;
var ext = "NULL";
if ($scope.selected.method.id == "0") {
method = "dwt";
ext = "sym";
} else if ($scope.selected.method.id == "1") {
method = "dwt";
ext = "per";
} else if ($scope.selected.method.id == "2") {
method = "swt";
} else if ($scope.selected.method.id == "3") {
method = "modwt";
}
console.log(method);
var N = wave.sigLength;
var flength = $scope.selected.wavelet.filtlength;
var J = $scope.selected.level;
wave.length = new Int32Array(J + 2);
wave.lenlength = J + 2;
wave.J = J;
//wave.output = [];
//wave.filters = [];
wave.wname = $scope.selected.wavelet.wavelet;
var outlength = Module.ccall('wtoutputlength', 'number', ['number', 'string', 'number', 'number', 'string'], [N, method, flength, J, ext]);
wave.outLength = outlength;
//console.log(wave.sigData, N, wave.wname, method, J, ext, wave.output, wave.length, wave.lenlength, wave.filters, flength);
//wave.filters = new Float64Array(4*filtlength);
var wave_transform = Module.cwrap('wave_transform', 'null', ['number', 'number', 'string', 'string', 'number', 'string', 'number', 'number', 'number']);
//[wave.sigData, N, wave.wname, method, J, ext, wave.output, wave.length, wave.lenlength, wave.filters, flength]);
//input signal on heap
var inpdata = wave.sigLength * wave.sigData.BYTES_PER_ELEMENT;
var inpPtr = Module._malloc(inpdata);
var inpHeap = new Uint8Array(Module.HEAPU8.buffer, inpPtr, inpdata);
inpHeap.set(new Uint8Array(wave.sigData.buffer));
//output on heap
var outdata = outlength * wave.sigData.BYTES_PER_ELEMENT;
var outPtr = Module._malloc(outdata);
var outHeap = new Uint8Array(Module.HEAPU8.buffer, outPtr, outdata);
//inpHeap.set(new Uint8Array(wave.sigData.buffer));
//filters
var filtdata = 4 * flength * wave.sigData.BYTES_PER_ELEMENT;
var filtPtr = Module._malloc(filtdata);
var filtHeap = new Uint8Array(Module.HEAPU8.buffer, filtPtr, filtdata);
//inpHeap.set(new Uint8Array(wave.sigData.buffer));
//length vector
var lendata = (J + 2) * wave.length.BYTES_PER_ELEMENT;
var lenPtr = Module._malloc(lendata);
var lenHeap = new Uint8Array(Module.HEAPU8.buffer, lenPtr, lendata);
lenHeap.set(new Uint8Array(wave.length.buffer));
wave_transform(inpHeap.byteOffset, N, wave.wname, method, J, ext, outHeap.byteOffset, lenHeap.byteOffset, filtHeap.byteOffset);
wave.output = new Float64Array(outHeap.buffer, outHeap.byteOffset, outlength);
wave.filter = new Float64Array(filtHeap.buffer, filtHeap.byteOffset, 4 * length);
wave.length = new Int32Array(lenHeap.buffer, lenHeap.byteOffset, J + 2);
console.log(wave.length);
Module._free(inpHeap.byteOffset);
Module._free(outHeap.byteOffset);
Module._free(filtHeap.byteOffset);
Module._free(lenHeap.byteOffset);
$scope.wdisplays = new Array(J + 3);
$scope.wdisplays[0] = "Input Signal";
$scope.wdisplays[1] = "Full Decomposition";
$scope.wdisplays[2] = "Approx at Level " + J;
for (var i = 3; i < J + 3; i++) {
$scope.wdisplays[i] = "Details at Level " + (J + 3 - i);
}
var lbl = [];
for (var i = 0; i < wave.outLength; ++i) {
lbl[i] = [i, wave.output[i]];
}
g = new Dygraph(document.getElementById("graph1"),
lbl,
{
legend: 'always',
color: '#3399ff',
animatedZooms: true,
title: 'Input'
}
);
}
$scope.updateGraph = function () {
console.log($scope.selected.wdisplay);
var lbl = [];
if ($scope.selected.wdisplay == 0) {
for (var i = 0; i < wave.sigLength; ++i) {
lbl[i] = [i, wave.sigData[i]];
}
} else if ($scope.selected.wdisplay == 1) {
for (var i = 0; i < wave.outLength; ++i) {
lbl[i] = [i, wave.output[i]];
}
} else if ($scope.selected.wdisplay == 2) {
for (var i = 0; i < wave.length[0]; ++i) {
lbl[i] = [i, wave.output[i]];
}
} else {
var k = parseInt($scope.selected.wdisplay) - 2;
var start_index = 0;
for (var i = 0; i < k; i++) {
start_index += wave.length[i];
}
var end_index = start_index + wave.length[k];
for (var i = 0; i < end_index - start_index; ++i) {
lbl[i] = [i, wave.output[start_index + i]];
}
}
g = new Dygraph(document.getElementById("graph1"),
lbl,
{
legend: 'always',
color: '#3399ff',
animatedZooms: true,
title: 'Input'
}
);
}
});

30708
js/wavebak.js Normal file

File diff suppressed because one or more lines are too long

31106
js/wavelet.js Normal file

File diff suppressed because one or more lines are too long

296
js/wavewrapper.js Normal file
View File

@ -0,0 +1,296 @@
var flength = function (str) {
filtlength = Module.cwrap('filtlength', 'number', ['string']);
return filtlength(str);
};
function zeroArray(length) {
var array = [];
for (var i = 0; i < length; i++) {
array[i] = 0;
}
return array;
}
function sigdata() {
var sigdata = [ -18.3237,-18.2232,-18.0974,-17.9410,-17.7480,-17.5113,-17.2230,-16.8744,-16.4558,-15.9565,-15.3653,-14.6701,-13.8586,-12.9182,
-11.8363,-10.6008,-9.2006,-7.6257,-5.8680,-3.9217,-1.7839,0.5452,3.0614,5.7562,8.6167,11.6252,14.7591,17.9909,21.2884,24.6155,27.9319,
31.1947,34.3587,37.3775,40.2049,42.7957,13.2164,14.2125,15.0317,15.6595,16.0845,16.2990,16.2990,16.0845,15.6595,15.0317,14.2125,13.2164,
12.0608,10.7654,9.3517,34.3587,31.1947,27.9319,24.6155,21.2884,17.9909,14.7591,11.6252,8.6167,5.7562,3.0614,0.5452,-1.7839,-3.9217,-5.8680,
-7.6257,-9.2006,-10.6008,-11.8363,-12.9182,-13.8586,-14.6701,-15.3653,-15.9565,-16.4558,-16.8744,-17.2230,-17.5113,-17.7480,-17.9410,-18.0974,
-18.2232,-18.3237,-18.4035,-18.0080,-17.8889,-17.7403,-17.5533,-17.3156,-17.0102,-16.6129,-16.0884,-15.3848,-14.4239,-13.0840,-11.1708,-8.3634,
-4.1098,2.5833,13.6048,32.7934,28.0187,10.9660,1.0776,-4.9459,-8.7354,-11.1225,-12.4865,-12.8019,-11.2050,-3.3124,1.8995,-11.3573,-15.0684,
-16.5028,-17.1937,-17.5831,-17.8288,-17.9968,-18.1185,-18.2103,-18.2818,-18.3388,-18.3849,-18.4229,-18.4545,-18.4810,-17.4642,-17.2104,-16.9033,
-16.5317,-16.0822,-15.5384,-14.8804,-14.0844,-13.1214,-11.9563,-10.5467,-8.8414,-6.7782,-4.2822,-1.2624,2.3911,6.8111,12.1585,18.6280,26.4549,
35.9241,35.9241,26.4549,18.6280,12.1585,6.8111,2.3911,-1.2624,-4.2822,-6.7782,-8.8414,-10.5467,-11.9563,-13.1214,-14.0844,-14.8804,-15.5384,
-16.0822,-16.5317,-16.9033,-17.2104,-17.4642,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,
-18.6741,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,
6.3259,6.3259,6.3259,6.3259,6.3259,34.8066,34.6752,34.5285,34.3645,34.1812,33.9763,33.7474,33.4917,33.2058,32.8863,32.5294,32.1304,31.6846,31.1864,
30.6296,30.0074,29.3121,28.5350,27.6667,26.6963,25.6118,24.3999,23.0456,21.5322,19.8408,17.9507,15.8385,13.4781,10.8403,7.8925,4.5982,0.9168,-3.1972,
-7.7947,-12.932,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.3237];
return sigdata;
}
var fcoef = function (str) {
fcoef = Module.cwrap('filtcoef', 'number', ['string', 'number', 'number', 'number', 'number']);
var length = flength(str);
var lpd = new Float64Array(length);
var hpd = new Float64Array(length);
var lpr = new Float64Array(length);
var hpr = new Float64Array(length);
var lbl = new Uint8Array(length);
for (var i = 0; i < length; ++i) {
lpd[i] = hpd[i] = lpr[i] = hpr[i] = 0.0;
lbl[i] = i;
}
var size = 8 * length;
var ptr1 = Module._malloc(size);
var ptr2 = Module._malloc(size);
var ptr3 = Module._malloc(size);
var ptr4 = Module._malloc(size);
var buf1 = new Uint8Array(Module.HEAPU8.buffer, ptr1, size);
var buf2 = new Uint8Array(Module.HEAPU8.buffer, ptr2, size);
var buf3 = new Uint8Array(Module.HEAPU8.buffer, ptr3, size);
var buf4 = new Uint8Array(Module.HEAPU8.buffer, ptr4, size);
buf1.set(new Uint8Array(lpd.buffer));
buf2.set(new Uint8Array(hpd.buffer));
buf3.set(new Uint8Array(lpr.buffer));
buf4.set(new Uint8Array(hpr.buffer));
var t = fcoef(str, buf1.byteOffset, buf2.byteOffset, buf3.byteOffset, buf4.byteOffset);
var lpd = new Float64Array(buf1.buffer, buf1.byteOffset, length);
var hpd = new Float64Array(buf2.buffer, buf2.byteOffset, length);
var lpr = new Float64Array(buf3.buffer, buf3.byteOffset, length);
var hpr = new Float64Array(buf4.buffer, buf4.byteOffset, length);
Module._free(buf1);
Module._free(buf2);
Module._free(buf3);
Module._free(buf4);
console.log(lpd);
console.log(hpd);
console.log(lpr);
console.log(hpr);
$('#canvas-holder').append("<div class='row' />");
$('#canvas-holder').append("<div class='row' />");
for (var i = 0; i < 2; ++i) {
$('.row').append("<div class='col-md-6' />");
}
var newCanvas = $('<canvas/>',{
id: 'canvas1'
});
$('.col-md-6:eq(0)').append(newCanvas);
var newCanvas2 = $('<canvas/>',{
id: 'canvas2'
});
$('.col-md-6:eq(1)').append(newCanvas2);
var newCanvas3 = $('<canvas/>',{
id: 'canvas3'
});
$('.col-md-6:eq(2)').append(newCanvas3);
var newCanvas4 = $('<canvas/>',{
id: 'canvas4'
});
$('.col-md-6:eq(3)').append(newCanvas4);
var barChartData = {
labels: lbl,
datasets: [
{
fillColor: "rgba(255,0,0,0.5)",
strokeColor: "rgba(255,0,0,0.8)",
highlightFill: "rgba(255,0,0,0.75)",
highlightStroke: "rgba(255,0,0,1)",
data: lpd
},
]
}
var barChartData2 = {
labels: lbl,
datasets: [
{
fillColor: "rgba(0,0,255,0.5)",
strokeColor: "rgba(0,0,255,0.8)",
highlightFill: "rgba(0,0,255,0.75)",
highlightStroke: "rgba(0,0,255,1)",
data: hpd
},
]
}
var barChartData3 = {
labels: lbl,
datasets: [
{
fillColor: "rgba(255,0,0,0.5)",
strokeColor: "rgba(255,0,0,0.8)",
highlightFill: "rgba(255,0,0,0.75)",
highlightStroke: "rgba(255,0,0,1)",
data: lpr
},
]
}
var barChartData4 = {
labels: lbl,
datasets: [
{
fillColor: "rgba(0,0,255,0.5)",
strokeColor: "rgba(0,0,255,0.8)",
highlightFill: "rgba(0,0,255,0.75)",
highlightStroke: "rgba(0,0,255,1)",
data: hpr
},
]
}
window.onload = function () {
var ctx = document.getElementById("canvas1").getContext("2d");
window.myBar = new Chart(ctx).Bar(barChartData, {
responsive: true
});
var ctx2 = document.getElementById("canvas2").getContext("2d");
window.myBar = new Chart(ctx2).Bar(barChartData2, {
responsive: true
});
var ctx3 = document.getElementById("canvas3").getContext("2d");
window.myBar = new Chart(ctx3).Bar(barChartData3, {
responsive: true
});
var ctx4 = document.getElementById("canvas4").getContext("2d");
window.myBar = new Chart(ctx4).Bar(barChartData4, {
responsive: true
});
}
}
var frontpage = function () {
//$('#canvas-holder').append("<img src='img/3dgausswave.png' />");
$('#canvas-holder').append("<div class='row' />");
//$('#canvas-holder').append("<div class='row' />");
//for (var i = 0; i < 2; ++i) {
// $('.row').append("<div class='col-md-6' />");
//}
//$('.col-md-6').append("<img src='img/3dgauss.jpg' />");
//$row.append("<div class='col-md-6' />").append("<img src='img/3dgauss.jpg' />");
$('.row').append("<div class='col-md-3' />");
$('.row').append("<div class='col-md-6' />");
$('.row').append("<div class='col-md-3' />");
var sig = sigdata();
var length = sig.length;
var lbl = [];
for (i = 0; i < length; ++i) {
lbl[i] = i;
}
var sigChartData = {
labels: lbl,
datasets: [
{
label: "Input Signal",
fillColor: "rgba(151,187,205,0.2)",
strokeColor: "rgba(151,187,205,1)",
pointColor: "rgba(151,187,205,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(151,187,205,1)",
data: sig
},
]
}
var newCanvas = $('<canvas/>',{
id: 'canvas1'
});
$('.col-md-6').append(newCanvas);
window.onload = function () {
var ctx = document.getElementById("canvas1").getContext("2d");
window.myBar = new Chart(ctx).Line(sigChartData, {
responsive: true
});
}
}
var frontpage2 = function () {
//$('#canvas-holder').append("<img src='img/3dgausswave.png' />");
$('#canvas-holder').append("<div class='row' />");
//$('#canvas-holder').append("<div class='row' />");
//for (var i = 0; i < 2; ++i) {
// $('.row').append("<div class='col-md-6' />");
//}
//$('.col-md-6').append("<img src='img/3dgauss.jpg' />");
//$row.append("<div class='col-md-6' />").append("<img src='img/3dgauss.jpg' />");
$('.row').append("<div class='col-md-4' />");
$('.row').append("<div class='col-md-4' />");
$('.row').append("<div class='col-md-4' />");
var sig = sigdata();
var length = sig.length;
var lbl = [];
for (i = 0; i < length; ++i) {
lbl[i] = [i, sig[i]];
}
$('.starter-template').empty();
$('.starter-template').append("<div id='graph' style='margin:0 auto' />");
g = new Dygraph(document.getElementById("graph"),
lbl,
{
legend: 'always',
color: '#3399ff',
animatedZooms: true,
title: 'Input'
});
$('.col-md-4:eq(0)').append("<div class='input-group' />");
$('.input-group').append("<input type='text' class='form-control' placeholder='Paste Data....' />");
$('.input-group').append("<span class='input-group-btn' />");
$('.input-group-btn').append("<button class='btn btn-default' type='button' value='GO'>GO</button>");
$('.col-md-4:eq(1)').append("<form role='form' class='form1' />");
$('.form1').append("<div class='form-group' />");
$('.form-group').append("<label />").text("Wavelet Family");
}
var displayPage = function() {
//window.open('display.html','_self');
document.location.href = 'display.html';
$(document).ready(function() {
var lbl = [];
for (i = 0; i < wave.sigLength; ++i) {
lbl[i] = [i, wave.sigData[i]];
}
console.log(lbl[0]);
alert("Page Changed");
g = new Dygraph(document.getElementById("graph1"),
lbl,
{
legend: 'always',
color: '#3399ff',
animatedZooms: true,
title: 'Input'
}
);
});
}

116
stylesheets/free.css Normal file
View File

@ -0,0 +1,116 @@
/*!
* Start Bootstrap - Modern Business HTML Template (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
/* Global Styles */
/*
This website uses a modified bootstrap template provided by
http://startbootstrap.com under Apache License v2.0
See Above
*/
html,
body {
height: 100%;
}
body {
padding-top: 50px; /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
}
.navbar-inverse .navbar-brand {
color: #c0dff5;
}
.nav.navbar-nav.navbar-right li a {
color: #c0dff5;
}
/* 404 Page Styles */
.error-404 {
font-size: 100px;
}
/* Pricing Page Styles */
.price {
display: block;
font-size: 50px;
line-height: 50px;
}
.price sup {
top: -20px;
left: 2px;
font-size: 20px;
}
.period {
display: block;
font-style: italic;
}
/* Footer Styles */
footer {
margin: 50px 0;
}
/*
.panel-default > .panel-heading {
background-color: #c0dff5;
border-color: #c0dff5;
}
.panel-body > .btn.btn-primary {
background-color: #c0dff5;
border-color: #c0dff5;
color: #000;
}
*/
/**/
#tabletext {
font-family: Lucida Console,Verdana;
font-size: large;
}
/* Responsive Styles */
@media(max-width:991px) {
.customer-img,
.img-related {
margin-bottom: 30px;
}
}
@media(max-width:767px) {
.img-portfolio {
margin-bottom: 15px;
}
header.carousel .carousel {
height: 70%;
}
}
/*Following code is taken from http://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3/*/
/*
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
background: red;
cursor: inherit;
display: block;
}
*/