EASY refactor: First attempt
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
%% CALLED BY par4GblFnc8c.m %%
|
||||
function [Tmpsbdg2, scanIntens, F_spots, bmtp, optomizedPos, TmpexpScanIntens2, TmpFexpScanSpots2, TmpFexpScanBMtp2, TmpanlZoneRefs2,areaOfIntensAboveBG]= ...
|
||||
NIscanIntensBGpar4GblFnc(Fflg, tifFileLst, ImParMat,PTmapPos,optCirMask,diaExt,doCircle,cirPixA,numRows,numCols,ImHeigth,ImWidth,cirMask, ...
|
||||
tptLength,selScan,Empsc,~, ~, ~, ~,resDir, Tmpsbdg1)
|
||||
tptLength,selScan,Empsc,~, ~, ~, ~,easyResultsDir, Tmpsbdg1)
|
||||
|
||||
global ExpOutmat
|
||||
global matFile
|
||||
global CSrchRng
|
||||
global figsResultsDir
|
||||
global fotosResultsDir
|
||||
|
||||
searchIntens=[]; intensMax=[]; detMaxPos=[]; scIntens=[]; areaOfIntensAboveBG=[]; BkgrdMat=[];
|
||||
|
||||
@@ -33,7 +35,8 @@ function [Tmpsbdg2, scanIntens, F_spots, bmtp, optomizedPos, TmpexpScanIntens2,
|
||||
PTmapOnesDbl(PTrefPtR:(PTrefPtR+(diaExt-1)),PTrefPtC:(PTrefPtC+(diaExt-1)))=optCirMask;
|
||||
end
|
||||
end
|
||||
end %if Fflg==1
|
||||
end
|
||||
|
||||
% Zeroth Initial Search Parameters
|
||||
rRangeUpper=-12;
|
||||
rRangeLower=12;
|
||||
@@ -73,11 +76,12 @@ function [Tmpsbdg2, scanIntens, F_spots, bmtp, optomizedPos, TmpexpScanIntens2,
|
||||
intensPrev=zeros(24,16);
|
||||
cent=cell(24,16);
|
||||
BGTav=zeros(numRows,numCols);
|
||||
BGthres(1:numRows,1:numCols)=95; %70;before incr.to95 to accommodate dark media %50forEpson;%Initialize for first tPt run *****************************************************<<
|
||||
if length(tifFileLst) >2
|
||||
%******Determine a good Plate Image from all the timepoints to use for Registration
|
||||
%Plate Intensity curve over time points
|
||||
%clear plateImage
|
||||
% 7 0;before incr.to95 to accommodate dark media %50forEpson;%Initialize for first tPt run
|
||||
BGthres(1:numRows,1:numCols)=95;
|
||||
if length(tifFileLst)>2
|
||||
% Determine a good Plate Image from all the timepoints to use for Registration
|
||||
% Plate Intensity curve over time points
|
||||
% clear plateImage
|
||||
plateImage={};
|
||||
%{
|
||||
% Version compatability fixes
|
||||
@@ -517,8 +521,8 @@ function [Tmpsbdg2, scanIntens, F_spots, bmtp, optomizedPos, TmpexpScanIntens2,
|
||||
% NIgenBkGrdDataPar4Fnc(ImParMat, tifFileLst, lastDetMaxPos, numRows, numCols, fullsc, tPt, BGthres, doCircle, cirPixA, diaExt, cirMask, BGTav)
|
||||
% Called by NIscanIntensBG.m
|
||||
|
||||
% global resDir
|
||||
global ExpOutmat
|
||||
% global easyResultsDir
|
||||
global matFile
|
||||
% global pixsAboveBG
|
||||
MPnum=ImParMat(1);
|
||||
destPerMP=ImParMat(2);
|
||||
@@ -1146,24 +1150,23 @@ function [Tmpsbdg2, scanIntens, F_spots, bmtp, optomizedPos, TmpexpScanIntens2,
|
||||
title(strcat('Scan',num2str(selScan),'timePt-',num2str(tPt)));
|
||||
clf(hfscanIm,'reset');
|
||||
set(hfIm,'NumberTitle','off')
|
||||
set(hfIm,'Name', char(ExpOutmat)) % strcat('EASYconsole- ',char(resDir)))
|
||||
if Fflg==1
|
||||
resDir; % for debugging
|
||||
fullfile(resDir,'Fotos',strcat('Scan',num2str(selScan),'_timePt-',num2str(tPt)))
|
||||
hgsave(fullfile(resDir,'Fotos',strcat('Scan',num2str(selScan),'_timePt-',num2str(tPt)))); %F 14_0626
|
||||
set(hfIm,'Name', char(matFile)) % strcat('EASYconsole- ',char(easyResultsDir)))
|
||||
if Fflg==1
|
||||
fullfile(fotosResultsDir,strcat('Scan',num2str(selScan),'_timePt-',num2str(tPt)))
|
||||
hgsave(fullfile(fotosResultsDir,strcat('Scan',num2str(selScan),'_timePt-',num2str(tPt)))); %F 14_0626
|
||||
else
|
||||
hgsave(fullfile(resDir,'figs',strcat('Scan',num2str(selScan),'_timePt-',num2str(tPt))));
|
||||
hgsave(fullfile(figsResultsDir,strcat('Scan',num2str(selScan),'_timePt-',num2str(tPt))));
|
||||
end
|
||||
else
|
||||
selScan;
|
||||
%tifFile
|
||||
% tifFile
|
||||
end
|
||||
|
||||
BkgrdMat=totBkgrd; % BkgrdMat(:,:,tPt)=totBkgrd; %debug parfor effort
|
||||
areaOfIntensAboveBG(:,:,tPt)=pixsAboveBG; % actual area of growth for each timepoint (used for printout of grArea ?not used in previous analysis)
|
||||
scanIntens(:,:,tPt)=intens-BkgrdMat;
|
||||
|
||||
% capture first and last background values
|
||||
% Capture first and last background values
|
||||
if tPt==1
|
||||
bdg(:,:,1)=bmm;
|
||||
bdg(:,:,3)=rwm;
|
||||
|
||||
Reference in New Issue
Block a user