basic top level function for generating field map