Corrected mask radius calculation