strcat to sprintf
This commit is contained in:
@@ -7,6 +7,7 @@ global scansDir
|
||||
global matFile
|
||||
global fhconsole
|
||||
global easyResultsDir
|
||||
global printResultsDir
|
||||
global pointMapsResultsDir
|
||||
global fotosResultsDir
|
||||
global matDir
|
||||
@@ -17,6 +18,7 @@ global numCols
|
||||
global scan
|
||||
global scanMax
|
||||
global tptLength
|
||||
global easyDir
|
||||
|
||||
numRows=24; % for Single Vertical
|
||||
numCols=16; % for Single Vertical
|
||||
@@ -34,10 +36,10 @@ Fflg=1;
|
||||
% fclose('all'); % close all open files
|
||||
|
||||
% Unset some vars just in case they are already set
|
||||
clear('scanIntens','Scanfiles','pathname','tifFileLstP4')
|
||||
clear('scanIntens','Scanfiles','pathname','tifFileLstP4');
|
||||
|
||||
try
|
||||
clf(fhconsole,'reset')
|
||||
clf(fhconsole,'reset');
|
||||
catch
|
||||
end
|
||||
|
||||
@@ -46,42 +48,32 @@ end
|
||||
% EASYconsole
|
||||
|
||||
if exist(matFile, 'file')
|
||||
bkUpMatFile=fullfile(matDir,'BkUp',matFile)
|
||||
copyfile(matFile,(fullfile(matDir,'BkUp',matFile)))
|
||||
bkUpMatFile=fullfile(matDir,'BkUp',matFile);
|
||||
copyfile(matFile,bkUpMatFile);
|
||||
end
|
||||
|
||||
% Reloacated from 'PTmats' to prevent potential overwrite when PTmats is
|
||||
% copied into new job when the PT template is about the same. We also
|
||||
% now have a default template if one is not made. i.e., when the images
|
||||
% from the new experiment are too sketchy to make a good pintool
|
||||
% template. By moving it to 'Fotos' we avoid possible issues due to
|
||||
% copying the Nbdg.mat file along with the default template '.mat' files.
|
||||
% A copy of Ndbg.mat is placed also saved to the 'PTmats' directory
|
||||
% after each run to allow previous version of EASY to access data made
|
||||
% by EASY versions after 20_0819.
|
||||
try
|
||||
load(fullfile(easyResultsDir,'Fotos','Nbdg')) %Modified to load from 'Fotos' 20_0819
|
||||
load(fullfile(fotosResultsDir,'Nbdg')); %Modified to load from 'Fotos' 20_0819
|
||||
catch
|
||||
% Reloacated from 'PTmats' to prevent potential overwrite when PTmats is
|
||||
% copied into new job when the PT template is about the same. We also
|
||||
% now have a default template if one is not made. i.e., when the images
|
||||
% from the new experiment are too sketchy to make a good pintool
|
||||
% template. By moving it to 'Fotos' we avoid possible issues due to
|
||||
% copying the Nbdg.mat file along with the default template '.mat' files.
|
||||
% A copy of Ndbg.mat is placed also saved to the 'PTmats' directory
|
||||
% after each run to allow previous version of EASY to access data made
|
||||
% by EASY versions after 20_0819.
|
||||
load(fullfile(easyResultsDir,'PTmats','Nbdg')) %Left in to accomodate loads of work before 20_0819
|
||||
load(fullfile(pointMapsResultsDir,'Nbdg')); %Left in to accomodate loads of work before 20_0819
|
||||
end
|
||||
% Load Fotos stored data
|
||||
try
|
||||
load(fullfile(easyResultsDir,'Fotos','Coordinates'))
|
||||
catch
|
||||
end
|
||||
try
|
||||
load(fullfile(easyResultsDir,'Fotos','BGatTpts'))
|
||||
catch
|
||||
end
|
||||
try
|
||||
load(fullfile(easyResultsDir,'Fotos','anlZones'))
|
||||
catch
|
||||
end
|
||||
% autoImCF
|
||||
try
|
||||
load(fullfile(easyResultsDir,'PTmats','NCFparms'))
|
||||
catch ME
|
||||
load parameters
|
||||
fotosToLoad = {'Coordinates', 'BGatTpts', 'anlZones', 'NCFparms'};
|
||||
for i = 1:length(fotosToLoad)
|
||||
try
|
||||
load(fullfile(fotosResultsDir, fotosToLoad{i}));
|
||||
catch
|
||||
load(fullfile(easyDir,'parameters'));
|
||||
end
|
||||
end
|
||||
|
||||
% Get Print Times
|
||||
@@ -89,12 +81,12 @@ PrintTimes=[];
|
||||
scLst={};
|
||||
|
||||
% Parameter Entry
|
||||
NImParamRadiusGui(scansDir) % Ncode 122111replaced removed ,numOfPrtTimes)
|
||||
NImParamRadiusGui(scansDir); % Ncode 122111replaced removed ,numOfPrtTimes)
|
||||
width=24;
|
||||
widthEx=width-1; % width extention from reference point
|
||||
dither=ImParMat(6);
|
||||
radius=ImParMat(10);
|
||||
NIcircle
|
||||
NIcircle;
|
||||
|
||||
% Load Stuff
|
||||
lastPlateOnLastScan=1; % Ncode
|
||||
@@ -118,7 +110,7 @@ else
|
||||
end
|
||||
|
||||
SWgrowthArea=ImParMat(9);
|
||||
load(fullfile(pointMapsResultsDir,'NPTmapSearch'))
|
||||
load(fullfile(pointMapsResultsDir,'NPTmapSearch'));
|
||||
PTmapPos=detPos;
|
||||
selScanNumLst=[];
|
||||
Scanfiles=[];
|
||||
@@ -157,10 +149,10 @@ selScanNumLst2=selScanNumLst; % function passthrough, passback to par4gbl_Main 2
|
||||
|
||||
% Preallocation
|
||||
scCount=[];
|
||||
TmpexpScanIntens00=cell(1); % cell(1,scanMax);
|
||||
TmpFexpScanSpots00=cell(1); % cell(1,scanMax);
|
||||
TmpFexpScanBMtp00=cell(1); % cell(1,scanMax);
|
||||
TmpanlZoneRefs00=cell(1); % cell(1,scanMax);
|
||||
TmpexpScanIntens00=cell(1); % cell(1,scanMax);
|
||||
TmpFexpScanSpots00=cell(1); % cell(1,scanMax);
|
||||
TmpFexpScanBMtp00=cell(1); % cell(1,scanMax);
|
||||
TmpanlZoneRefs00=cell(1); % cell(1,scanMax);
|
||||
Tmpsbdg00=cell(1);
|
||||
TmpexpScanIntens4=cell(1,numScans);
|
||||
TmpFexpScanSpots4=cell(1,numScans);
|
||||
@@ -230,9 +222,9 @@ fileExt='.txt';
|
||||
filePrefix='FitResults_';
|
||||
for scanCnt=1:numScans
|
||||
selScan=p4L4{16,scanCnt}; % determine the actual scan in the scanCnt parfor distributed "id"
|
||||
fileSuffix=strcat('Scan', num2str(selScan),'_Plate', num2str(1));
|
||||
fileSuffix=sprintf('Scan%d_Plate%d', selScan, 1);
|
||||
fileNamePlate=[filePrefix fileSuffix fileExt];
|
||||
fileName=fullfile(easyResultsDir,'PrintResults', fileNamePlate); % [outputDirectory fileNamePlate];
|
||||
fileName=fullfile(printResultsDir, fileNamePlate); % [outputDirectory fileNamePlate];
|
||||
|
||||
% This,fprint for loop,is an very old legacy feature which slows processing. Could be
|
||||
% removed but allows easy observation of how a run is progressing and can be
|
||||
@@ -241,7 +233,7 @@ for scanCnt=1:numScans
|
||||
|
||||
fid=fopen(fileName,'w');
|
||||
fprintf(fid, 'Num.\tAUC\tMSR\tK\tr\tl\tR-squared\tK-lower\tK-upper\tr-lower\tr-upper\tl-upper\tl-lower\tArea\tLastInten\tSpineMaxRateTimePt\tLastFitTimePt\n');
|
||||
for n=1:384 % startCount:numCultures
|
||||
for n=1:384 % startCount:numCultures
|
||||
fprintf(fid,'%d\t',n);
|
||||
fprintf(fid, '%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\n',...
|
||||
outCprint{14,scanCnt}(n,1),outCprint{14,scanCnt}(n,2),outCprint{14,scanCnt}(n,3),outCprint{14,scanCnt}(n,4),...
|
||||
|
||||
Reference in New Issue
Block a user