In the acquisition of magnetic resonance imaging or spectroscopic data, 2D PACE is employed to identify an acceptance or shimming window within which the magnetic resonance data are acquired, and to trigger the acquisition of the magnetic resonance data at the same position of the patients diaphragm in each respiratory cycle. The patient is thereby allowed to freely breath during the data acquisition procedure, but the acquisition of the magnetic resonance data is always able to take place with the patients diaphragm in the same physical position in each respiratory cycle.