In one aspect the invention relates to a method to calibrate a light unit having at least one light source, the light unit being part of a medical imaging apparatus, comprising:a) providing a calibration phantom having at least one photodetector,b) positioning the calibration phantom at a calibration position, in particular a first calibration position,c) arranging the light source so that its beam illuminates the photodetector at least partially,d) starting or continuing the recording of light intensities using the photodetector,e) modulating the signal of the light source at least once,f) rotating the light beam around a given rotation axis while recording the rotational position,g) synchronizing the time values of the rotational position of the light beam and the acquired signal intensities using the modulation of the light signal, andh) mapping the rotational position, in particular the rotation angle, of the light beam to a spatial position using the light intensities recorded by the photodetector.