function [] = bead_landscape(cycle_startnum, experiment_path, display_flag, save_flag)

fret_num = cycle_startnum;
cy5_num = cycle_startnum+1;
cy3_num = cycle_startnum+2;
txred_num = cycle_startnum+3;

fret_name = sprintf('%03d', fret_num);
cy5_name = sprintf('%03d', cy5_num);
cy3_name = sprintf('%03d', cy3_num);
txred_name = sprintf('%03d', txred_num);

fret_bgfilename = [experiment_path '/PROC/BEAD/' fret_name '.beads'];
cy5_bgfilename = [experiment_path '/PROC/BEAD/' cy5_name '.beads'];
cy3_bgfilename = [experiment_path '/PROC/BEAD/' cy3_name '.beads'];
txred_bgfilename = [experiment_path '/PROC/BEAD/' txred_name '.beads'];

pos = load([experiment_path '/PROC/DATASETS/position_list.dat']);
pos(:,2) = pos(:,2).*-1;
num_frames = size(pos,1);
bkgrnd = zeros(num_frames, 4);

fid = fopen(fret_bgfilename);
disp(['Loading ' fret_bgfilename]);
data_col_vector = uint16(fread(fid, inf, 'uint16'));
num_elements = size(data_col_vector);
     num_rows = int32(num_elements / 7);
  data_col_vector = reshape(data_col_vector, 7, num_rows(1));
data_col_vector = data_col_vector';
disp(['Calculating bead value mean for each of ' num2str(num_frames) ' frames (' num2str(num_rows(1)) ' beads)']);
for(i=1:num_frames)
  bkgrnd(i,1) = mean(data_col_vector(find(data_col_vector(:,1)==i),7));
end
fclose(fid);

fid = fopen(cy5_bgfilename);
disp(['Loading ' cy5_bgfilename]);
data_col_vector = uint16(fread(fid, inf, 'uint16'));
num_elements = size(data_col_vector);
num_rows = int32(num_elements / 7);
data_col_vector = reshape(data_col_vector, 7, num_rows(1));
data_col_vector = data_col_vector';
disp(['Calculating bead value mean for each of ' num2str(num_frames) ' frames (' num2str(num_rows(1)) ' beads)']);
for(i=1:num_frames)
  bkgrnd(i,2) = mean(data_col_vector(find(data_col_vector(:,1)==i),7));
end
fclose(fid);

fid = fopen(cy3_bgfilename);
disp(['Loading ' cy3_bgfilename]);
data_col_vector = uint16(fread(fid, inf, 'uint16'));
num_elements = size(data_col_vector);
     num_rows = int32(num_elements / 7);
  data_col_vector = reshape(data_col_vector, 7, num_rows(1));
data_col_vector = data_col_vector';
disp(['Calculating bead value mean for each of ' num2str(num_frames) ' frames (' num2str(num_rows(1)) ' beads)']);
for(i=1:num_frames)
  bkgrnd(i,3) = mean(data_col_vector(find(data_col_vector(:,1)==i),7));
end
fclose(fid);

fid = fopen(txred_bgfilename);
disp(['Loading ' txred_bgfilename]);
data_col_vector = uint16(fread(fid, inf, 'uint16'));
num_elements = size(data_col_vector);
num_rows = int32(num_elements / 7);
data_col_vector = reshape(data_col_vector, 7, num_rows(1));
data_col_vector = data_col_vector';
disp(['Calculating bead value mean for each of ' num2str(num_frames) ' frames (' num2str(num_rows(1)) ' beads)']);
for(i=1:num_frames)
  bkgrnd(i,4) = mean(data_col_vector(find(data_col_vector(:,1)==i),7));
end
fclose(fid);

if(display_flag==1)
    signal_vs_position(pos(:,2:3), bkgrnd(:,1),1,0);
    colorbar;
xlabel('Bead array X (left to right); -1 * stage X coord');
ylabel('Bead array Y (top to bottom); stage Y coord');
    title(['Bead values for cycle ' fret_name ' (FRET)']);
view([0 90]);
    if(save_flag==1)
        savefilename = [experiment_path '/QC/qc_beadland_' fret_name];
        saveas(gcf, savefilename, 'bmp');
    end

    signal_vs_position(pos(:,2:3), bkgrnd(:,2),1,0);
    colorbar;
xlabel('Bead array X (left to right); -1 * stage X coord');
ylabel('Bead array Y (top to bottom); stage Y coord');
    title(['Bead values for cycle ' cy5_name ' (Cy5)']);
view([0 90]);
    if(save_flag==1)
        savefilename = [experiment_path '/QC/qc_beadland_' cy5_name];
        saveas(gcf, savefilename, 'bmp');
    end

    signal_vs_position(pos(:,2:3), bkgrnd(:,3),1,0);
    colorbar;
xlabel('Bead array X (left to right); -1 * stage X coord');
ylabel('Bead array Y (top to bottom); stage Y coord');
    title(['Bead values for cycle ' cy3_name ' (Cy3)']);
view([0 90]);
    if(save_flag==1)
        savefilename = [experiment_path '/QC/qc_beadland_' cy3_name];
        saveas(gcf, savefilename, 'bmp');
    end

    signal_vs_position(pos(:,2:3), bkgrnd(:,4),1,0);
    colorbar;
xlabel('Bead array X (left to right); -1 * stage X coord');
ylabel('Bead array Y (top to bottom); stage Y coord');
    title(['Bead values for cycle ' txred_name ' (TxRed)']);
view([0 90]);
    if(save_flag==1)
        savefilename = [experiment_path '/QC/qc_beadland_' txred_name];
        saveas(gcf, savefilename, 'bmp');
    end
end

    

