Improved clarity of downscale/setsample functions