Radiation from relativistic particles in a magnetic undulator