Code covered by the BSD License  

Highlights from
FRETSCAL

image thumbnail

FRETSCAL

by

 

For the FRET analysis of images of yeast cells labeled with YFP and CFP.

fupdate
function fupdate
%Version 4/3/09
%Creates the blue box summaries of current settings in the FretScal windows, and updates the progress bar.

global AOIshape
global strainname CFPspill CFPtagname CFPlabel
global YFPspill YFPtagname YFPlabel
global dirsep
global frettype cfptype yfptype primary limit1 limit2
global h_fig
global initialdone culldone inspectdone finaldone
global initialfile culledfile inspectedfile finalfile
global initials culls inspects finals
global intensitylimit maximumpeaks
global m3b fontpics context toobright
global bringincr bringthick
global separation maxmovement
global inputdirectory outputdirectory
global YFPFWHM FRETFWHM CFPFWHM YFPmono FRETmono CFPmono YFPs2b FRETs2b CFPs2b
global YFPFWHMcull FRETFWHMcull CFPFWHMcull YFPmonocull FRETmonocull CFPmonocull YFPs2bcull FRETs2bcull CFPs2bcull
global bitdepth Ysuffix Fsuffix Csuffix Dsuffix bpfilter patchpixel
global darkgreen progbarcol 
yellow = [1 1 0];
black = [0 0 0];
white = [1 1 1];
spacing = .05; w1 = .05; w2 = .27;



if( initialdone == 1 )
    initials = freaddata( initialfile, 1 ); % reading initial.txt
    culls = initials;
    inspects = initials;
    finals = initials;
    initialdone = 0;
end;
if( culldone == 1 )
    culls    = freaddata( culledfile, 0 ); % reading culled.txt
    inspects = culls;
    finals = culls;
    culldone = 0;
end;
if( inspectdone == 1 )
    inspects = freaddata( inspectedfile, 0 ); %reading inspected.txt
    finals = inspects;
    inspectdone = 0;
end;
if( finaldone == 1 )
    finals   = freaddata( finalfile, 0 ); % reading final.txt
    finaldone = 0;
end;
string0 = sprintf( 'AOIs (%d) stored in %s -> after cull (%d), %s -> passed inspection (%d), %s -> final (%d), %s', ...
    initials, initialfile, culls, culledfile,  inspects,  inspectedfile, finals,finalfile );%the black progress bar along top with progress.
if( frettype == 1 )
    CFPlabel = 'set CFP spillover factor';
    YFPlabel = 'set YFP spillover factor';
    if( primary == 1 )
        string1 = sprintf( 'Expt. type: FRET, primary = YFP' );
    elseif( primary == 2 )
        string1 = sprintf( 'Expt. type: FRET, primary = FRET' );
    else
        string1 = sprintf( 'Expt. type: FRET, primary = CFP' );
    end;
elseif( cfptype == 1 )
    CFPlabel = 'being determined';
    YFPlabel = 'unused now';
    if( primary == 3 )
        string1 = sprintf( 'Expt. type: CFP spillover, primary = CFP' );
    else
        string1 = sprintf( 'Expt. type: CFP spillover, primary = FRET' );
    end
elseif( yfptype == 1 )
    CFPlabel = 'unused now';
    YFPlabel = 'being determined';
    if( primary == 1 )
        string1 = sprintf( 'Expt. type: YFP spillover, primary = YFP' );
    else
        string1 = sprintf( 'Expt. type: YFP spillover, primary = FRET' );
    end;
else
    fprintf( 1, 'in update unknown Expt. type\n' );
end;
if bpfilter == 0
    filter = 'Off';
else
    filter = 'On';
end
string2 = sprintf( 'Strain name: %s', strainname );
string3 = sprintf( 'YFP tagged protein: %s', YFPtagname );
string4 = sprintf( 'CFP tagged protein: %s', CFPtagname );
string5 = sprintf( 'AOI lower intensity limit: %5.2f * AOI max', intensitylimit );
string6 = sprintf( 'Maximum AOIs per tif: %3d', maximumpeaks );
string7 = sprintf( 'Input Directory: %s', inputdirectory );
string8 = sprintf( 'Output Directory: %s%s%s', inputdirectory, dirsep, outputdirectory );
if( AOIshape == 1 )
    string9 = sprintf( 'AOI shape: peak pixel' );
else
    string9 = sprintf( 'AOI shape: %d by %d pixels', AOIshape, AOIshape );
end;
string10  = sprintf( 'Background begins %d pixels from AOI', bringincr );
string11 = sprintf( 'Thickness of background ring: %d pixels', bringthick );
string12 = sprintf( 'Distance between AOIs (in pixels): %d', separation );
string34 = sprintf( 'Context for output images: %d pixels', context);
string35 = sprintf( 'Maximum intensity: %5.2f * image max = %5.0f', toobright,toobright*(2^bitdepth) );
string57 = sprintf( 'Max movement: %d pixels', maxmovement);
string50 = sprintf('...............');
string55 = sprintf('Patch filter is %s.  Filter at %d',filter,patchpixel);

pos1 = [ .03 0.01 .31 .99 ];
pos1b =[.02 0 .33 1];
blank = ' ';
InputSummary = {blank,blank,blank,string1,blank,string2,blank,string3,blank,string4,blank,string7,blank,string8,string50,string9,blank,string10,blank,string11,blank,string34,string50,string35,...
    blank,string5,blank,string6,blank,string12,blank,string57,string50,string55};
uicontrol( h_fig,'units','normalized','style','frame','position',pos1b,'HorizontalAlignment', 'left', 'back', m3b, 'fore', yellow, 'fontsize', fontpics );%m3f
uicontrol( h_fig,'units','normalized','style','text','string',InputSummary,'position',pos1,'HorizontalAlignment', 'left', 'back', m3b, 'fore', yellow, 'fontsize', fontpics );%m3f

string52 = sprintf('                                                  AOI signal limits');
string20 = sprintf( '                                                  Search       Cull' );

if frettype == 1
    if limit1 == 0 && limit2 == 0
        string21 = sprintf( 'YFP signal to background:     %5.2f          %5.2f', YFPs2b,     YFPs2bcull );
        string22 = sprintf( 'FRET signal to background:  %5.2f          %5.2f', FRETs2b,    FRETs2bcull );
        string23 = sprintf( 'CFP signal to background:    %5.2f          %5.2f', CFPs2b,     CFPs2bcull );
        string24 = sprintf( 'YFP signal monotonicity:         %5.2f         %5.2f', YFPmono,    YFPmonocull );
        string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
        string26 = sprintf( 'CFP signal monotonicity:        %5.2f         %5.2f', CFPmono,    CFPmonocull );
        string27 = sprintf( 'YFP signal''s FWHM:                %5.2f         %5.2f', YFPFWHM,   YFPFWHMcull );
        string28 = sprintf( 'FRET signal''s FWHM:             %5.2f         %5.2f', FRETFWHM,  FRETFWHMcull );
        string29 = sprintf( 'CFP signal''s FWHM:               %5.2f         %5.2f', CFPFWHM,   CFPFWHMcull );
    end
    if limit1 == 1 && limit2 == 1
        if primary == 1
            string21 = sprintf( 'YFP signal to background:     %5.2f         %5.2f', YFPs2b,     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:     NA            NA');
            string23 = sprintf( 'CFP signal to background:       NA            NA');
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f         %5.2f', YFPmono,    YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:        NA            NA');
            string26 = sprintf( 'CFP signal monotonicity:          NA            NA');
            string27 = sprintf( 'YFP signal''s FWHM:               %5.2f        %5.2f', YFPFWHM,   YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:               NA            NA');
            string29 = sprintf( 'CFP signal''s FWHM:                 NA            NA');
        elseif primary == 2
            string21 = sprintf( 'YFP signal to background:         NA            NA');
            string22 = sprintf( 'FRET signal to background:   %5.2f         %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:        NA            NA');
            string24 = sprintf( 'YFP signal monotonicity:            NA            NA');
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:           NA            NA');
            string27 = sprintf( 'YFP signal''s FWHM:                   NA            NA');
            string28 = sprintf( 'FRET signal''s FWHM:             %5.2f         %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                  NA            NA');
        elseif primary == 3
            string21 = sprintf( 'YFP signal to background:         NA           NA');
            string22 = sprintf( 'FRET signal to background:       NA           NA');
            string23 = sprintf( 'CFP signal to background:     %5.2f        %5.2f', CFPs2b,     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:             NA          NA');
            string25 = sprintf( 'FRET signal monotonicity:          NA          NA');
            string26 = sprintf( 'CFP signal monotonicity:        %5.2f         %5.2f', CFPmono,    CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:                    NA          NA');
            string28 = sprintf( 'FRET signal''s FWHM:                 NA          NA');
            string29 = sprintf( 'CFP signal''s FWHM:               %5.2f         %5.2f', CFPFWHM,   CFPFWHMcull );
        end
    end
    if limit1 == 1 && limit2 == 0
        if primary == 1
            string21 = sprintf( 'YFP signal to background:     %5.2f          %5.2f', YFPs2b,     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:     NA          %5.2f',     FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:       NA          %5.2f',    CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f          %5.2f', YFPmono,    YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:        NA           %5.2f',    FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:          NA           %5.2f',    CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:              %5.2f           %5.2f', YFPFWHM,   YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:               NA           %5.2f',  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                 NA           %5.2f',  CFPFWHMcull );
        elseif primary == 2
            string21 = sprintf( 'YFP signal to background:        NA          %5.2f',     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:   %5.2f         %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:       NA          %5.2f',     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:           NA          %5.2f',     YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:          NA          %5.2f',     CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:                 NA           %5.2f',    YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f          %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                NA           %5.2f',  CFPFWHMcull );
        elseif primary == 3
            string21 = sprintf( 'YFP signal to background:        NA          %5.2f',     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:     NA          %5.2f',    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:    %5.2f          %5.2f', CFPs2b,     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:           NA          %5.2f',     YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:        NA          %5.2f',   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:       %5.2f          %5.2f', CFPmono,    CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:                  NA          %5.2f',    YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:               NA          %5.2f',   FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:              %5.2f          %5.2f', CFPFWHM,   CFPFWHMcull );
        end
    end
    if limit1 == 0 && limit2 == 1
        if primary == 1
            string21 = sprintf( 'YFP signal to background:     %5.2f         %5.2f', YFPs2b,     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:   %5.2f           NA', FRETs2b);
            string23 = sprintf( 'CFP signal to background:     %5.2f           NA', CFPs2b );
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f         %5.2f', YFPmono,    YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f           NA', FRETmono );
            string26 = sprintf( 'CFP signal monotonicity:        %5.2f           NA', CFPmono );
            string27 = sprintf( 'YFP signal''s FWHM:               %5.2f         %5.2f', YFPFWHM,   YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f            NA', FRETFWHM);
            string29 = sprintf( 'CFP signal''s FWHM:               %5.2f           NA', CFPFWHM );
        elseif primary == 2
            string21 = sprintf( 'YFP signal to background:     %5.2f            NA', YFPs2b);
            string22 = sprintf( 'FRET signal to background:   %5.2f        %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:     %5.2f           NA', CFPs2b );
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f            NA', YFPmono );
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f        %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:        %5.2f           NA', CFPmono);
            string27 = sprintf( 'YFP signal''s FWHM:               %5.2f            NA', YFPFWHM );
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f         %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:               %5.2f           NA', CFPFWHM );
        elseif primary == 3
            string21 = sprintf( 'YFP signal to background:     %5.2f           NA', YFPs2b);
            string22 = sprintf( 'FRET signal to background:   %5.2f           NA', FRETs2b );
            string23 = sprintf( 'CFP signal to background:     %5.2f        %5.2f', CFPs2b,     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f           NA', YFPmono );
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f          NA', FRETmono);
            string26 = sprintf( 'CFP signal monotonicity:        %5.2f        %5.2f', CFPmono,    CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:               %5.2f           NA', YFPFWHM );
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f           NA', FRETFWHM );
            string29 = sprintf( 'CFP signal''s FWHM:               %5.2f        %5.2f', CFPFWHM,   CFPFWHMcull );
        end
    end
elseif yfptype == 1
    if limit1 == 0 && limit2 == 0
        string21 = sprintf( 'YFP signal to background:     %5.2f          %5.2f', YFPs2b,     YFPs2bcull );
        string22 = sprintf( 'FRET signal to background:   %5.2f         %5.2f', FRETs2b,    FRETs2bcull );
        string23 = sprintf( 'CFP signal to background:        NA            NA');
        string24 = sprintf( 'YFP signal monotonicity:        %5.2f          %5.2f', YFPmono,    YFPmonocull );
        string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
        string26 = sprintf( 'CFP signal monotonicity:           NA            NA' );
        string27 = sprintf( 'YFP signal''s FWHM:               %5.2f          %5.2f', YFPFWHM,   YFPFWHMcull );
        string28 = sprintf( 'FRET signal''s FWHM:            %5.2f          %5.2f', FRETFWHM,  FRETFWHMcull );
        string29 = sprintf( 'CFP signal''s FWHM:                  NA            NA' );
    end
    if limit1 == 1 && limit2 == 1
        if primary == 1
            string21 = sprintf( 'YFP signal to background:     %5.2f         %5.2f', YFPs2b,     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:     NA            NA');
            string23 = sprintf( 'CFP signal to background:       NA            NA');
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f         %5.2f', YFPmono,    YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:        NA            NA');
            string26 = sprintf( 'CFP signal monotonicity:          NA            NA');
            string27 = sprintf( 'YFP signal''s FWHM:               %5.2f        %5.2f', YFPFWHM,   YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:               NA            NA');
            string29 = sprintf( 'CFP signal''s FWHM:                 NA            NA');
        elseif primary == 2
            string21 = sprintf( 'YFP signal to background:         NA            NA');
            string22 = sprintf( 'FRET signal to background:   %5.2f         %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:        NA            NA');
            string24 = sprintf( 'YFP signal monotonicity:            NA            NA');
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:           NA            NA');
            string27 = sprintf( 'YFP signal''s FWHM:                   NA            NA');
            string28 = sprintf( 'FRET signal''s FWHM:             %5.2f         %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                  NA            NA');
        end
    end
    if limit1 == 1 && limit2 == 0
        if primary == 1
            string21 = sprintf( 'YFP signal to background:     %5.2f          %5.2f', YFPs2b,     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:     NA          %5.2f',     FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:       NA             NA');
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f          %5.2f', YFPmono,    YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:        NA           %5.2f',    FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:          NA              NA' );
            string27 = sprintf( 'YFP signal''s FWHM:              %5.2f           %5.2f', YFPFWHM,   YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:               NA           %5.2f',  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                 NA              NA' );
        elseif primary == 2
            string21 = sprintf( 'YFP signal to background:         NA         %5.2f',     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:   %5.2f         %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:        NA             NA' );
            string24 = sprintf( 'YFP signal monotonicity:            NA         %5.2f',     YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:           NA             NA' );
            string27 = sprintf( 'YFP signal''s FWHM:                   NA          %5.2f',    YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:             %5.2f          %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                   NA            NA' );
        end
    end
    if limit1 == 0 && limit2 == 1
        if primary == 1
            string21 = sprintf( 'YFP signal to background:     %5.2f         %5.2f', YFPs2b,     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:  %5.2f            NA', FRETs2b);
            string23 = sprintf( 'CFP signal to background:       NA            NA' );
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f         %5.2f', YFPmono,    YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:     %5.2f            NA', FRETmono );
            string26 = sprintf( 'CFP signal monotonicity:          NA             NA');
            string27 = sprintf( 'YFP signal''s FWHM:               %5.2f         %5.2f', YFPFWHM,   YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f            NA', FRETFWHM);
            string29 = sprintf( 'CFP signal''s FWHM:                 NA            NA' );
        elseif primary == 2
            string21 = sprintf( 'YFP signal to background:     %5.2f           NA', YFPs2b);
            string22 = sprintf( 'FRET signal to background:   %5.2f        %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:       NA            NA' );
            string24 = sprintf( 'YFP signal monotonicity:        %5.2f           NA', YFPmono );
            string25 = sprintf( 'FRET signal monotonicity:     %5.2f         %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:          NA            NA');
            string27 = sprintf( 'YFP signal''s FWHM:               %5.2f           NA', YFPFWHM );
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f         %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                NA            NA' );
        end
    end
elseif cfptype == 1
    if limit1 == 0 && limit2 == 0
        string21 = sprintf( 'YFP signal to background:        NA            NA');
        string22 = sprintf( 'FRET signal to background:   %5.2f         %5.2f', FRETs2b,    FRETs2bcull );
        string23 = sprintf( 'CFP signal to background:     %5.2f         %5.2f', CFPs2b,     CFPs2bcull );
        string24 = sprintf( 'YFP signal monotonicity:           NA            NA' );
        string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
        string26 = sprintf( 'CFP signal monotonicity:        %5.2f         %5.2f', CFPmono,    CFPmonocull );
        string27 = sprintf( 'YFP signal''s FWHM:                  NA             NA');
        string28 = sprintf( 'FRET signal''s FWHM:            %5.2f          %5.2f', FRETFWHM,  FRETFWHMcull );
        string29 = sprintf( 'CFP signal''s FWHM:               %5.2f         %5.2f', CFPFWHM,   CFPFWHMcull );
    end
    if limit1 == 1 && limit2 == 1
        if primary == 2
            string21 = sprintf( 'YFP signal to background:         NA            NA');
            string22 = sprintf( 'FRET signal to background:   %5.2f         %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:        NA            NA');
            string24 = sprintf( 'YFP signal monotonicity:            NA            NA');
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:           NA            NA');
            string27 = sprintf( 'YFP signal''s FWHM:                   NA            NA');
            string28 = sprintf( 'FRET signal''s FWHM:             %5.2f         %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                  NA            NA');
        elseif primary == 3
            string21 = sprintf( 'YFP signal to background:         NA           NA');
            string22 = sprintf( 'FRET signal to background:       NA           NA');
            string23 = sprintf( 'CFP signal to background:     %5.2f        %5.2f', CFPs2b,     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:             NA          NA');
            string25 = sprintf( 'FRET signal monotonicity:          NA          NA');
            string26 = sprintf( 'CFP signal monotonicity:        %5.2f         %5.2f', CFPmono,    CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:                    NA          NA');
            string28 = sprintf( 'FRET signal''s FWHM:                 NA          NA');
            string29 = sprintf( 'CFP signal''s FWHM:               %5.2f         %5.2f', CFPFWHM,   CFPFWHMcull );
        end
    end
    if limit1 == 1 && limit2 == 0
        if primary == 2
            string21 = sprintf( 'YFP signal to background:        NA            NA' );
            string22 = sprintf( 'FRET signal to background:   %5.2f        %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:       NA         %5.2f',     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:           NA            NA');
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f         %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:          NA          %5.2f',     CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:                 NA             NA');
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f          %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:                NA           %5.2f',  CFPFWHMcull );
        elseif primary == 3
            string21 = sprintf( 'YFP signal to background:        NA          %5.2f',     YFPs2bcull );
            string22 = sprintf( 'FRET signal to background:     NA          %5.2f',    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:    %5.2f          %5.2f', CFPs2b,     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:           NA          %5.2f',     YFPmonocull );
            string25 = sprintf( 'FRET signal monotonicity:        NA          %5.2f',   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:       %5.2f          %5.2f', CFPmono,    CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:                  NA          %5.2f',    YFPFWHMcull );
            string28 = sprintf( 'FRET signal''s FWHM:               NA          %5.2f',   FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:              %5.2f          %5.2f', CFPFWHM,   CFPFWHMcull );
        end
    end
    if limit1 == 0 && limit2 == 1
        if primary == 2
            string21 = sprintf( 'YFP signal to background:        NA            NA');
            string22 = sprintf( 'FRET signal to background:   %5.2f        %5.2f', FRETs2b,    FRETs2bcull );
            string23 = sprintf( 'CFP signal to background:     %5.2f           NA', CFPs2b );
            string24 = sprintf( 'YFP signal monotonicity:           NA            NA');
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f        %5.2f', FRETmono,   FRETmonocull );
            string26 = sprintf( 'CFP signal monotonicity:        %5.2f           NA', CFPmono);
            string27 = sprintf( 'YFP signal''s FWHM:                  NA            NA' );
            string28 = sprintf( 'FRET signal''s FWHM:            %5.2f         %5.2f', FRETFWHM,  FRETFWHMcull );
            string29 = sprintf( 'CFP signal''s FWHM:              %5.2f            NA', CFPFWHM );
        elseif primary == 3
            string21 = sprintf( 'YFP signal to background:         NA           NA');
            string22 = sprintf( 'FRET signal to background:   %5.2f           NA', FRETs2b );
            string23 = sprintf( 'CFP signal to background:     %5.2f        %5.2f', CFPs2b,     CFPs2bcull );
            string24 = sprintf( 'YFP signal monotonicity:           NA            NA' );
            string25 = sprintf( 'FRET signal monotonicity:      %5.2f           NA', FRETmono);
            string26 = sprintf( 'CFP signal monotonicity:        %5.2f        %5.2f', CFPmono,    CFPmonocull );
            string27 = sprintf( 'YFP signal''s FWHM:                  NA            NA' );
            string28 = sprintf( 'FRET signal''s FWHM:             %5.2f           NA', FRETFWHM );
            string29 = sprintf( 'CFP signal''s FWHM:               %5.2f        %5.2f', CFPFWHM,   CFPFWHMcull );
        end
    end
end

pos2 = [.38 .25 .27 .75];
pos2b = [.37 .24 .29 .76];
uicontrol( h_fig,'units','normalized','style','frame','position',pos2b, 'back', m3b, 'fore', yellow );
LimitsSummary ={blank,blank,blank,string52,string20,blank,string21,blank,string22,blank,string23,blank,string24,blank,...
    string25,blank,string26,blank,string27,blank,string28,blank,string29};
% uicontrol( h_fig,'units','normalized','style','frame','position',pos2b, 'back', m3b, 'fore', yellow );
uicontrol( h_fig,'units','normalized','style','text','string',LimitsSummary,'position',pos2,...
    'HorizontalAlignment', 'left', 'back', m3b, 'fore', yellow, 'fontsize', fontpics );

if( frettype == 1 )
    string31 = sprintf( 'CFP spillover factor: %5.3f', CFPspill );
    string32 = sprintf( 'YFP spillover factor: %5.3f', YFPspill );
elseif( cfptype == 1 )
    string31 = sprintf( 'CFP spillover factor: being computed' );
    string32 = sprintf( 'YFP spillover factor: unused' );
else
    string31 = sprintf( 'CFP spillover factor: unused' );
    string32 = sprintf( 'YFP spillover factor: being computed' );
end;
string33 = sprintf( 'Font size for screen display: %d', fontpics);
string36 = sprintf('Bit depth: %d-bit',bitdepth);
string56 = sprintf('Image max: %d',2^(bitdepth));
string37 = sprintf('YFP file''s unique ID: %s',Ysuffix);
string38 = sprintf('FRET file''s unique ID: %s',Fsuffix);
string39 = sprintf('CFP file''s unique ID: %s',Csuffix);
string40 = sprintf('DIC file''s unique ID: %s',Dsuffix);
string51 = sprintf('Characteristics of image files:');
string53 = sprintf('To calculate FRET:');
string54 = sprintf('Muller and Ess');
string57 = sprintf('Output files do not reflect current settings.\nRun SEARCH to update.');
string58 = sprintf('Output files do not reflect current settings.\nRun CULL to update.');
string59 = sprintf('Output files up to date.');

pos3 = [.69 .25 .27 .75];
pos3b = [.68 .24 .29 .76];
uicontrol( h_fig,'units','normalized','style','frame','position',pos3b, 'back', m3b, 'fore', yellow );
SpilloverFactors = {blank,blank,blank,string33,string50, string51,blank,string36,blank,string56,blank,string37,...
    blank,string38,blank,string39,blank,string40,string50,string53,blank,string32,blank,string31};
%uicontrol( h_fig,'units','normalized','style','frame','position',pos3b, 'back', m3b, 'fore', yellow );
uicontrol( h_fig,'units','normalized','style','text','string',SpilloverFactors,'position',pos3,...
    'HorizontalAlignment', 'left', 'back', m3b, 'fore', yellow, 'fontsize', fontpics);
pos4 = [.01 .96 .98 .035 ];
pos4b = [  0 .95 1 .05 ];
uicontrol( h_fig,'units','normalized','style','frame','position',pos4b, 'back', black, 'fore', progbarcol);
uicontrol( h_fig,'units','normalized','style','text','string',string0,'position',pos4, 'HorizontalAlignment', 'center', 'back', black, 'fore', progbarcol, 'fontsize', fontpics );%[outstring,newpos] = textwrap(h,Bigstring);
pos5 = [.82 .012 .12 .045];
pos5b = [.81 .01 .134 .057];
uicontrol( h_fig,'units','normalized','style','frame','position',pos5b, 'back', m3b, 'fore', yellow);
uicontrol( h_fig,'units','normalized','style','text','string',string54,'position',pos5,...
    'HorizontalAlignment', 'left', 'back', m3b, 'fore', yellow, 'fontsize', fontpics);
pos6 = [.74 .11 .245 .06];
pos6b = [.73 .10 .265 .075];
uicontrol( h_fig,'units','normalized','style','frame','position',pos6b, 'back', black, 'fore', progbarcol);
if strcmp(progbarcol,'red') == 1
    uicontrol( h_fig,'units','normalized','style','text','string',string57,'position',pos6,...
        'HorizontalAlignment', 'left', 'back', 'black', 'fore', 'red', 'fontsize', fontpics);
elseif strcmp(progbarcol,'yellow') == 1
    uicontrol( h_fig,'units','normalized','style','text','string',string58,'position',pos6,...
        'HorizontalAlignment', 'left', 'back', 'black', 'fore', 'yellow', 'fontsize', fontpics);
else
    uicontrol( h_fig,'units','normalized','style','text','string',string59,'position',pos6,...
        'HorizontalAlignment', 'left', 'back', 'black', 'fore', 'white', 'fontsize', fontpics);
end

Contact us