To answer your second question, you can avoid phase shift by filtering the data twice, one from start to the end, and then from the end to the start. The following is how you do it
1) First, filter the signal using whatever filter that is appropriate.
2) Revers the data (array)
3) Filter the data again using the same filter
4) Revers the data again.
The phase shift should be cancelled out from the two filtering steps.
If you use the butterworth filter, you may not need amplitude correction. Anyway, it is easy to correct the amplitude even if you do need it, since the property of the butterworth filter is well defined.
You may have to throw away some data at the beginning and at the end of your data because of the filtering effects.
Hope this help
s.
Ian Ren
Roush Industries, Anatrol Division.