ParametersRun500

dataset_positions = [{2,0}; {2,1}; {2,2}; {2,3}; {2,5}; {4,0}; {4,1}; {4,2}; {4,3}; {4,4}; {4,5}; {5,0}; {5,1}; {5,2}; {5,3}; {6,0}; {6,1}; {6,2}; {6,3}; {6,4}; {6,5}; {7,0}; {7,1}; {7,2}; {7,3}; {7,4}; {7,5}; {10,0}; {10,1}; {10,2}; {10,3}; {10,4}; {10,5}];

stretch_matrix = [1 0 0 0; 0 1 0 0; 0 0 3.077 0; 0 0 0 1];

moving_run_number = 500;

moments_scaling = 0;
% 0 for ellipsoids, 1 for moments

for i = 1:size(dataset_positions,1)
    
    i
    
    dataset = dataset_positions{i,1};
    position = dataset_positions{i,2};
    %     first_stack = calculated_stacks{dataset,position+1}(1);
    last_stack = calculated_stacks{dataset,position+1}(2);
    
    moving_start_time = moving_start_times{dataset,position+1};
    moving_moments_time = moments_times{dataset,position+1};
    
    time_offset = time_offsets{dataset,position+1};
    
    
    if (dataset~= 2)&&(dataset~=4)
        moving_dataset_directory =  ['L:\seg2 5-31\Set ' num2str(dataset) '\Stacks\Position ' num2str(position) '\resized images'];
        ilastik_filename = ['Btc_Ds' num2str(dataset) '_Pos' num2str(position) '_Co0_St' num2str(last_stack) '_Probabilities.h5'];
    else
        moving_dataset_directory =  ['K:\Laptop F drive copy\new reg 4-8 classifier 6-13-15\' num2str(dataset) '-' num2str(position)];
        ilastik_filename = ['Btc_Ds' num2str(dataset) '_Pos' num2str(position) '_Co0_St' num2str(last_stack) '_Probabilities.h5'];
    end
    
    cd(moving_dataset_directory)
    if moments_scaling
        cd(['Run ' num2str(moving_run_number)]);
    else
        cd(['Run ' num2str(502)]);
    end
    
    if moments_scaling
        load(['scaling_matrix_' num2str(dataset) '_' num2str(position) '_r' num2str(moving_run_number) '. ' moving_moments_time '.mat'])
    else
        load(['scaling_matrix_' num2str(dataset) '_' num2str(position) '_r' num2str(502) '. ' '16-Nov-2015 05.29.22' '.mat'])
    end
    
    width_scale(i) = scaling_matrix(3,3);
    length_scale(i) = scaling_matrix(1,1);
end
