if no downsample provided, calculate one