Abstract: The invention relates to a for a targeted shaping of the magnetic field of a single permanent magnet or an arrangement of a plurality of permanent magnets, wherein magnetic material from selected locations of the single permanent magnet or at least one of said permanent magnets of the arrangement is removed by means of at least one of the following removal procedures for shaping the magnetic field: laser ablation using laser radiation, high-pressure waterblasting using high-pressure water jets and mechanical ablation using a non-magnetic tool.