Reconstruction of the fast neutron spectrum using deformation of a reference spectrum represented as a Legendre polynomial expansion