  Micron-sized Hall bars and micro-SQUIDs are now used routinely to measure the
local static and dynamic magnetic response with micron-scale spatial
resolution. While this provides a powerful new tool, determining the intrinsic
magnetization presents new challenges, as it requires correcting for
demagnetization fields that vary widely with position on a sample. In this
paper we develop a method to correct for the demagnetization effect at local
points of a rectangular prism shaped sample using a finite element analysis of
Maxwell's equation applied to local Hall sensor measurements calibrated by bulk
measurements of the magnetization. This method can be generalized to other
geometric shapes to analyze data obtained with local magnetic probes.
