Characterization of Deformed Magnets from External Magnetic Measurements