From 513f531fa4a2f5b5eb0790dd3d8927f1e5a084f8 Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Thu, 25 Jul 2024 14:38:26 -0400 Subject: [PATCH] Tighten up formatting --- workflow/templates/easy/NCscurImCF_3parfor.m | 33 +++++++++----------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/workflow/templates/easy/NCscurImCF_3parfor.m b/workflow/templates/easy/NCscurImCF_3parfor.m index 608cb46e..f557671b 100755 --- a/workflow/templates/easy/NCscurImCF_3parfor.m +++ b/workflow/templates/easy/NCscurImCF_3parfor.m @@ -5,6 +5,7 @@ function [resMatStd, resMat, selTimesStd, selIntensStd, FiltTimesELr, NormIntens % Preallocate resMatStd=zeros(1,27); resMat=zeros(1,27); + % Set internal variables sent to matlab fit function me=200; meL=750; @@ -17,6 +18,7 @@ function [resMatStd, resMat, selTimesStd, selIntensStd, FiltTimesELr, NormIntens normIntens=[]; nn=1; numFitTpts=0; + % Build filterTimes and normIntens from spot dataMatrix selection codes produced in filter section for n=1:size(dataMatrix,2) if (((dataMatrix(3,n)==1))||(dataMatrix(3,n)==3)||(dataMatrix(3,n)==2)... @@ -114,32 +116,27 @@ function [resMatStd, resMat, selTimesStd, selIntensStd, FiltTimesELr, NormIntens resMatStd(12)=lup; resMatStd(13)=currSpotArea; resMatStd(14)=lastIntensUsedStd; % filtNormIntens(length(filtNormIntens)); - maxRateTime=0; %[]; %Std shows []; ELr shows 0; %parfor resMatStd(15)=0; %maxRateTimestdMeth; - resMatStd(16)=lastTptUsedStd; if isempty(Tpt1Std) Tpt1Std=777; end resMatStd(17)=Tpt1Std; - resMatStd(18)=bl; %perform in the filter section of NCfitImCFparfor - resMatStd(19)=fitblStd; %Taken from NCfil... and not affected by NCscur...changes - resMatStd(20)=minTime; %Not affected by changes made in NCscur...for refined 'r' + resMatStd(18)=bl; % perform in the filter section of NCfitImCFparfor + resMatStd(19)=fitblStd; % taken from NCfil... and not affected by NCscur...changes + resMatStd(20)=minTime; % not affected by changes made in NCscur...for refined 'r' resMatStd(21)=thresGT2TmStd; resMatStd(22)=numFitTptsStd; resMatStd(23)=numTptsGT2Std; - resMatStd(24)=999; %The Standard method has no cuts .:.no cutTm + resMatStd(24)=999; % yhe Standard method has no cuts .:.no cutTm resMatStd(25)=999; resMatStd(26)=999; resMatStd(27)=999; - %if SwitchEvsEL==3 %Remove 'SwitchEvsEL==...' temporary SWITCH when Hartman decides what he wants - %********************************************************************************* - %ELr New Experimental data through L+deltaS Logistic fit for 'Improved r' Fitting - %********************************************************************************* - FiltTimesELr=[]; %{ii}= filterTimes; - NormIntensELr=[]; %{ii}= normIntens; + % ELr New Experimental data through L+deltaS Logistic fit for 'Improved r' Fitting + FiltTimesELr=[]; %{ii}=filterTimes; + NormIntensELr=[]; %{ii}=normIntens; normIntens=selIntensStd; filterTimes=selTimesStd; stdIntens=selIntensStd; @@ -215,20 +212,20 @@ function [resMatStd, resMat, selTimesStd, selIntensStd, FiltTimesELr, NormIntens ftype=fittype('K / (1 + exp(-r* (t - l )))','independent','t','dependent',['K','l','r'],'options',opts); fitObject=[]; errObj=[]; - % carry out the curve fitting process + % carry out the curve fitting process [fitObject, errObj]=fit(Tms,Ints,ftype); coeffsArray=coeffvalues(fitObject); - r3=coeffsArray(3); %sDat(slps,4)=coeffsArray(3); % rateS + r3=coeffsArray(3); % sDat(slps,4)=coeffsArray(3); % rateS if (exist('K','var')&& exist('r','var') && exist('l','var')) t=(0:1:200); - GrowthELr = K ./ (1 + exp(-r.* (t - l ))); - fitblELr= min(GrowthELr); %jh diag + GrowthELr=K ./ (1 + exp(-r.* (t - l ))); + fitblELr=min(GrowthELr); %jh diag end catch ME % if no data is given, return zeros - AUC = 0;MSR = 0;K = 0;r = 0;l = 0;rsquare = 0;Klow = 0;Kup = 0; - rlow = 0;rup = 0;lup = 0;llow = 0; %normIntens=[]; + AUC=0;MSR=0;K=0;r=0;l=0;rsquare=0;Klow=0;Kup=0; + rlow=0;rup=0;lup=0;llow=0; %normIntens=[]; end end