fix factor of 2 in noise offset calculation