Spline Fitting Routine Notes

*aspline routine*

2009/07/12 09:10 : Download from

https://launchpad.net/ubuntu/+source/spline/1.1-12

Unpack, untar .. and it builds robustly:

kvalobs@pak:~$ gunzip spline_1.1-12.tar.gz
kvalobs@pak:~$ tar xvf spline_1.1-12.tar
spline/
spline/utils.h
spline/aspline.1
spline/Makefile
spline/aspline.c
spline/.svn/
spline/.svn/text-base/
spline/.svn/text-base/aspline.1.svn-base
spline/.svn/text-base/utils.h.svn-base
spline/.svn/text-base/Makefile.svn-base
spline/.svn/text-base/aspline.c.svn-base
spline/.svn/text-base/utils.c.svn-base
spline/.svn/format
spline/.svn/prop-base/
spline/.svn/tmp/
spline/.svn/tmp/text-base/
spline/.svn/tmp/prop-base/
spline/.svn/tmp/props/
spline/.svn/entries
spline/.svn/props/
spline/debian/
spline/debian/changelog
spline/debian/rules
spline/debian/prerm
spline/debian/copyright
spline/debian/.svn/
spline/debian/.svn/text-base/
spline/debian/.svn/text-base/copyright.svn-base
spline/debian/.svn/text-base/rules.svn-base
spline/debian/.svn/text-base/control.svn-base
spline/debian/.svn/text-base/prerm.svn-base
spline/debian/.svn/text-base/changelog.svn-base
spline/debian/.svn/format
spline/debian/.svn/prop-base/
spline/debian/.svn/prop-base/rules.svn-base
spline/debian/.svn/prop-base/prerm.svn-base
spline/debian/.svn/tmp/
spline/debian/.svn/tmp/text-base/
spline/debian/.svn/tmp/prop-base/
spline/debian/.svn/tmp/props/
spline/debian/.svn/entries
spline/debian/.svn/props/
spline/debian/control
spline/utils.c
kvalobs@pak:~$ cd spline/
kvalobs@pak:~/spline$ ls
aspline.1 aspline.c debian Makefile utils.c utils.h
kvalobs@pak:~/spline$ make
gcc -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wnested-externs -Wcast-qual -Wcast-align -Wshadow -Wwrite-strings -Wpointer-arith -Wformat -DVERSION=\"1.1\" -c -o utils.o utils.c
utils.c: In function ‘getline’:
utils.c:60: warning: pointer targets in assignment differ in signedness
gcc -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wnested-externs -Wcast-qual -Wcast-align -Wshadow -Wwrite-strings -Wpointer-arith -Wformat -DVERSION=\"1.1\" -o aspline aspline.c utils.o -lm

Test with some input data:

kvalobs@pak:~/spline$ head 20061215-60300.data
19 8.0
20 7.7
21 7.3
22 7.0
23 6.7
24 6.5
25 6.5
26 6.2
27 5.9
28 5.9
kvalobs@pak:~/spline$
kvalobs@pak:~/spline$
kvalobs@pak:~/spline$ aspline 20061215-60300.data
19 8
19.19 7.95069
19.38 7.89778
19.57 7.84126
19.76 7.78112
19.95 7.71738
20 7.7
20.14 7.64749
20.33 7.56811
20.52 7.48501
20.71 7.40437
20.9 7.33235
21 7.3
21.09 7.273
21.28 7.216
21.47 7.159
21.66 7.102
21.85 7.045
22 7
22.04 6.988
22.23 6.931
22.42 6.874
22.61 6.817
22.8 6.76
22.99 6.703
23 6.7
23.18 6.65057
23.37 6.607
23.56 6.57026
23.75 6.53828
23.94 6.50901
24 6.5
24.13 6.48965
24.32 6.49869
24.51 6.51987
24.7 6.53465
24.89 6.52452
25 6.5
25.08 6.476
25.27 6.419
25.46 6.362
25.65 6.305
25.84 6.248
26 6.2
26.03 6.191
26.22 6.134
26.41 6.077
26.6 6.02
26.79 5.963
26.98 5.906
27 5.9
27.17 5.86138
27.36 5.84372
27.55 5.84683
27.74 5.86433
27.93 5.88984
28 5.9
28.12 5.92451
28.31 5.9853
28.5 6.05922
28.69 6.13047
28.88 6.18328
29 6.2
29.07 6.2048
29.26 6.21582
29.45 6.22407
29.64 6.22976
29.83 6.23308
30.02 6.23421
30.21 6.23336
30.4 6.23072
30.59 6.22649
30.78 6.22086
30.97 6.21402
31.16 6.20618
31.35 6.19752
31.54 6.18825
31.73 6.17855
31.92 6.16862
32.11 6.15865
32.3 6.14885
32.49 6.13941
32.68 6.13051
32.87 6.12237
33.06 6.11516
33.25 6.10909
33.44 6.10435
33.63 6.10114
33.82 6.09965
34 6.1
34.01 6.10008
34.2 6.10513
34.39 6.11689
34.58 6.13536
34.77 6.16054
34.96 6.19243
35 6.2
35.15 6.28795
35.34 6.52704
35.53 6.83609
35.72 7.13688
35.91 7.35119
36 7.4
36.1 7.42616
36.29 7.45195
36.48 7.44799
36.67 7.41614
36.86 7.35824
37 7.3
37.05 7.27654
37.24 7.18023
37.43 7.07338
37.62 6.95703
37.81 6.83223
38 6.7
38 6.7
kvalobs@pak:~/spline$