A Flexible Framework for Magnetic Measurements