Relationship between the pyroelectric coefficient and the lattice dynamics of the pyroelectrics