Improved scale_factor extraction scripts