Modelling and optimisation algorithm to analyse XRPD data via modulation function and pseudo-voigt functions