In this work, we continue to develop and investigate the Thermal Shock Response Spectrum (TSRS) method as an alternative data processing method for infrared thermography (IRT). We focus on improving the current TSRS algorithm and present an optimization methodology for finding the optimal thermal Q-factor and characteristic frequency pair, which is based on the widely applied random sampling method. We show the qualitative relationship between the determined optimal characteristic frequency and the corresponding maximum difference in diffusion length between reference and defective models, as calculated by selecting a specific one-dimensional thermal N-layer model The investigations were performed on an inhomogeneous plate made of carbon fiber reinforced polymer (CFRP) with artificial square defects at different depths. Furthermore, two different heat sources were used: a xenon flash lamp and a laser. These sources are not only distinct by their underlying physics but also generate inherently different pulse shapes. To quantitatively estimate the contrast between defect and non-defect areas, and to compare these results with commonly used infrared thermography (IRT) data post-processing methods such as Pulse Phase Thermography (PPT) and Thermographic Signal Reconstruction (TSR), the Tanimoto criterion (TC) and signal-to-noise ratio (SNR) were used.