linearized scalar encoder