Added setting that controls number of XRD background functions