Optimization of in situ infrared spectro-electrochemical accessory with the aid of reflectance and electric field and calculations