Add reg_type option and fix tps_register when reg_type is bij
Minor fixes for when downsample is on