This text is not realy complete yet
but the basic idea is to get away from the limitations of
sine waves and similar in the analysis of structures.
I'll explain in outline what I did and then you make make your own
attempt at it.
The method is as follows :-
1) Load a shape (read : shape data ) into a computer array.
This is probably relatively small in size compared to the data
you are testing but you may need to make the data roughly
the same scale as that below.

2) Compare this with the info you want to extract information about.

I'll describe what I did but you may have some much better ideas.
[Dont be afraid to try them and dont get dispirited if they don't
seem to work. They most likely will .. its just a matter of time]

Step 2a

I began by making sure all the info was of roughly the same scale
as the shape data by taking an average of its values and scaling
everything accordingly
[ I think in a later incarnation i used a logarithmic approach
as i had already developed a continued fraction log approximator
.. using logarithms has advantages of increased breadth of scale
and ease of normalising
and disadvantages in that it can over smooth the sample when
attempting to use sharp discretion ]
Either way the process of scaling may be referred to as normalising.

Step2b

I matched the modelling data against the info looking for
by starting at the begining of the info and shunting the
modelling data along a laborious step at a time
This could be quite onerous if the amount of info were large.
a) an exact match - in which case i subtracted the modelling data
from the info and returned to Step2a to normalise the remaining
info
b) looked for likely matches by tolerance
[ be very afraid !
we're getting into the realms of damn statistics here]
In the 2 dimensional model i found the best positional
placement and in possibly the current variant of the program suite
I then varied the height of the modelling data
to get a better match.
Again if this was within tolerance i subtracted the data as before.
The suite of programs would repeat these steps , passing over the data
until it couldnt find anything else within tolerance.

Step2c
I then changed the shape data. I followed Mr Fouriers example
by reducing the length of it in harmonic fashion ( actually logrithmic
fashion in truth )
and returned to Step2a

There are several points to note here :-
Once you've subtracted the larger coherent lumps of data you
then start to amplify the noise ( read rubbish ) thats inherent in the
info. This is thanks to the normalisation process.
So as I'm sure your partner or close friends have often told you.
The secret is in knowing when to stop !

Some of the suite of programs were originally written in Basic !
They're now in Ruby .. they're not large and not that complicated.
You could probably write something much more sophisticated.

As with any looped control systems the skill is in ensuring that
the system doesn't run out of control.
You may be mindfull that its better to approach a solution from
one side [overdamped exponential] rather than use an oscillating
approximation as these often have inherent instabilities
[ see any maths treatise on boundary conditions of functions ]

Heres an example of the first shape data i ever used
It was a step function
,..., ...,,______ ...............
_____`I....,....,I______________

the info contained a similar step function and one that looked like a
sawtooth.
The step was removed straightways and the sawtooth removed piece wise
as the shape data fitted it .. what i didnt think through was that the
best fit shape didnt fit INSIDE the triangle of the saw tooth but was
larger so when it got subtracted there were some negative bits left.
'.....,..'...,...'.....,...,....../.............................
'.....,....'....'...'...,.....'../.I.............................
_________-_____ /..I _______-____________________
,.......,.......\....I..................................
'.......,........\...I...................................
'.......,.........\..I...................................
'...,........,.....\.I...................................
'.........,.........\I....................................

Or something like it from memory.
Going through this cycle a few times generated a lot of noise
and has an interesting analogue in the digital encoding and decoding
of say music or image.