A method is provided for generating a medical data set of a moving part of the human or animal body undergoing a cyclical movement such as cardiac movement. A raw data signal acquired by a magnetic resonance receiver coil arrangement is received. A magnetic resonance signal and a movement signal are separated from the raw data signal. At least two physiological phases of the moving body part are automatically assigned to the movement signal. The automatic assignment does not introduce a delay between the movement signal and the magnetic resonance signal. Time points used for triggering an acquisition of the magnetic resonance signal and/or for data post-processing of the magnetic resonance signal are determined or set.