moving downsampling and conversion functions over to bl.biomod framework.