apply_transformation input args corrected for defect transformations