Refactored get diffraction metadata method to make it static