Understanding the thermal annealing process on metallic thin films