An x-ray apparatus, that may include a mount that is configured to hold a sample; an x-ray source, that is configured to direct an x-ray beam toward a first side of the sample; a detector, positioned downstream to a second side of the sample, the detector is configured to detect, during a sample measurement period, at least a part of x-rays that have been transmitted through the sample; and an x-ray intensity detector that is positioned, during a beam intensity monitoring period at a measurement position that is located between the x-ray source and the first side of the sample, so as to detect at least a part of the x-ray beam before the x-ray beam reaches the sample.