Origin of thermally stable ferroelectricity in a porous barium titanate thin film synthesized through block copolymer templating