How to measure the pyroelectric coefficient