Refinement of the structure of BaTiO3 and other ferroelectrics