Magnetism in and near YBa2Cu3O7 vortex cores and its field dependence