magphys-cpp