A study of the structure factor of Thue - Morse and period-doubling chains by wavelet analysis