ise frequencies calculation code