function D = load_sortseq_data(fname)

    X = load_data(fname);
    i_m=1;
    i_f=1;
    cs = fieldnames(X);
    for f=1:length(cs)
        if ~isempty(strfind(cs{f},'Measurement'))
            eval(['D.measurements(:,i_m) = X.' cs{f} ';']);
            i_m=i_m+1;
        elseif ~isempty(strfind(cs{f},'Flag'))
            eval(['D.flags(:,i_f) = X.' cs{f} ';']);
            i_f = i_f + 1;
        elseif ~isempty(strfind(cs{f},'Sequence'))
            eval(['D.seqs = cell2mat(X.' cs{f} ');']);
            D.nseqs = seq2nseq(D.seqs);
        end

    end
    clear X;
end