Analysis methods in neutron and X-ray reflectometry