You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ktFOCUSS4DMotion.m
    path of file: ./repos/CS_MoCo_LAB/reconstruction/matlab/CS_LAB_matlab/@FOCUSS
    
    the code of the file until where you have to start completion: function dImg = ktFOCUSS4DMotion(obj, kSpace)
% 4D FOCUSS algorithm with motion field estimation

% here: kSpace: k_y - k_z - k_x - cha - t
% calibSize: k_y - k_x - k_z (cell: t)
% fft: f -> t   x -> k_x   y -> k_y

fprintf(' |- prepare k-space and image kernel...\n');

    
function dImg = ktFOCUSS4DMotion(obj, kSpace)
% 4D FOCUSS algorithm with motion field estimation

% here: kSpace: k_y - k_z - k_x - cha - t
% calibSize: k_y - k_x - k_z (cell: t)
% fft: f -> t   x -> k_x   y -> k_y

fprintf(' |- prepare k-space and image kernel...\n');

[nTime, nPha, nZ, nFreq, nCha] = size(kSpace);

% retrieve mask
obj.fullMask = permute(obj.fullMask, [5 1 2 3 4]); % t-k_y-k_z-k_x/x-cha

% correct calibSize -> better initial registration
[obj.calibSize{2:end