entropy calculation on window