Thursday, January 20, 2005


Working on John Cannizzo's Hilbert-Huang Transform program. First steps :
1) Split sifting code out into a separate file (sift.c). Create a header file (hht.h) with global definitions and useful parameters.
2) Extract spline fitting of envelope into its own routine to remove duplication of code for the upper and lower envelopes. Reduce number of arrays used in sifting and size them dynamically to the input data. Note that all arrays in the program number from 1 not 0 so all sizes have to be one larger than you think.
3) Optimize spline interpolations by modifying Press et al. splint routine to work with an input array assumed to be ordered the same way as the spline day. This speeds up the program by factor of ~2 as bisection search is only run for the first point to be interpolated.
4) Caught minor bug when the number of extrema in an envelope is 1. The extra points added to the end of the extrema data to stabilise the spline were given random values in this case. Changed this to set Deld{L/U}1 to time{L/U}[1] and Deld{L/U}2 to dat{L/U}[1] which seems the only reasonable case.
5) Using 1/f noise file confirmed that the new and old routines give identical results for time series with 16384 points.

Keywords: HHT

No comments: