Smart new in situ tool keeps X-rays on track at national science facility