A fast and accurate method to determine the alignment of the diagnostic x-ray and light fields was developed. Following the exposure, the boundaries of an x-ray field are determined by a custom-built x-ray field position detector and indicated by light-emitting diodes. The alignment of the supposed and the actual x-ray fields agree (within +/- 2 mm) with the corresponding results of the film-based procedure.