Thermal gratings and pyroelectrically produced charge redistribution in BaTiO 3 and KNbO 3