Novel resonance profiling and tracking method for photoacoustic measurements