down sampling data used by the register to template script