diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..053645d --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,20 @@ +# Ultralytics 🚀, AGPL-3.0 license +# Ultralytics Format Workflow +# This workflow automatically formats code and documentation in pull requests and pushes to main branch + +name: Ultralytics Actions + +on: + push: + branches: [main,master] + pull_request: + branches: [main,master] + +jobs: + format: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run Ultralytics Formatting Actions + uses: ultralytics/actions@main diff --git a/C/solidanglec.cpp b/C/solidanglec.cpp index 2126a6f..44a994f 100644 --- a/C/solidanglec.cpp +++ b/C/solidanglec.cpp @@ -48,7 +48,7 @@ void cfunction(double* X, double* P, double* N, double* pa, double* al, double* dz = P[j+2*MP] - z; dotproduct = N[j]*dx + N[j+MP]*dy + N[j+2*MP]*dz; - if (dotproduct>0) // possible transmition + if (dotproduct>0) // possible transmission { rs = dx*dx + dy*dy + dz*dz; r[k] = sqrt(rs); diff --git a/LIBRARIES/MATERIALS/CERN Index of Refraction.pdf b/LIBRARIES/MATERIALS/CERN Index of Refraction.pdf index 187fb46..b21982e 100644 Binary files a/LIBRARIES/MATERIALS/CERN Index of Refraction.pdf and b/LIBRARIES/MATERIALS/CERN Index of Refraction.pdf differ diff --git a/LIBRARIES/MATERIALS/NIMA522-439PKL.pdf b/LIBRARIES/MATERIALS/NIMA522-439PKL.pdf index 77d9160..b304993 100644 Binary files a/LIBRARIES/MATERIALS/NIMA522-439PKL.pdf and b/LIBRARIES/MATERIALS/NIMA522-439PKL.pdf differ diff --git a/LIBRARIES/MATERIALS/OlegThesis.pdf b/LIBRARIES/MATERIALS/OlegThesis.pdf index ec5be46..b56d9d1 100644 Binary files a/LIBRARIES/MATERIALS/OlegThesis.pdf and b/LIBRARIES/MATERIALS/OlegThesis.pdf differ diff --git a/ML/FASTNEUTRON/fcnplotneutronMC.m b/ML/FASTNEUTRON/fcnplotneutronMC.m index 3485070..935b85b 100644 --- a/ML/FASTNEUTRON/fcnplotneutronMC.m +++ b/ML/FASTNEUTRON/fcnplotneutronMC.m @@ -31,7 +31,7 @@ a(:,4) = MC.xhat(:,10,i) - MC.xhat(:,4,i) > 1; %dt > 1ns a(:,5) = fcnrange(MC.xhat(:,1:3,i) - MC.xhat(:,7:9,i)) > 10; %dx > 10mm a(:,6) = MC.xhat(:,5,i)>0.200; %.3 %first bounce > 100keV - a(:,7) = MC.xhat(:,6,i)./MC.xhat(:,12,i) > .2; %dE1/dE2 must be greather than 0.20 + a(:,7) = MC.xhat(:,6,i)./MC.xhat(:,12,i) > .2; %dE1/dE2 must be greater than 0.20 a(:,8) = MC.xhat(:,5,i)./MC.xhat(:,18,i) < .9; %dE1./E0 < 0.9 a(:,9) = MC.xhat(:,5,i)./MC.xhat(:,18,i) > .1; %dE1./E0 > 0.1 a(:,10) = MC.xhat(:,18,i) < 6; %(MeV) E0<20MeV diff --git a/ML/FASTNEUTRON/fcnplotneutronTS.m b/ML/FASTNEUTRON/fcnplotneutronTS.m index 3ff988e..372877b 100644 --- a/ML/FASTNEUTRON/fcnplotneutronTS.m +++ b/ML/FASTNEUTRON/fcnplotneutronTS.m @@ -32,7 +32,7 @@ a(:,4) = MC.xhat(:,10,i) - MC.xhat(:,4,i) > 1; %dt > 1ns a(:,5) = fcnrange(MC.xhat(:,1:3,i) - MC.xhat(:,7:9,i)) > 10; %dx > 10mm a(:,6) = MC.xhat(:,5,i)>0.200; %.3 %first bounce > 100keV - a(:,7) = MC.xhat(:,6,i)./MC.xhat(:,12,i) > .2; %dE1/dE2 must be greather than 0.20 + a(:,7) = MC.xhat(:,6,i)./MC.xhat(:,12,i) > .2; %dE1/dE2 must be greater than 0.20 a(:,8) = MC.xhat(:,5,i)./MC.xhat(:,18,i) < .9; %dE1./E0 < 0.9 a(:,9) = MC.xhat(:,5,i)./MC.xhat(:,18,i) > .1; %dE1./E0 > 0.1 %a(:,10) = fcninsidedetector(MC.xhat(:,1:3,i), input, 10); %P1 wall cut diff --git a/ML/fcnoptimizerkr.m b/ML/fcnoptimizerkr.m index 4b8cf2c..4d1f860 100644 --- a/ML/fcnoptimizerkr.m +++ b/ML/fcnoptimizerkr.m @@ -1,5 +1,5 @@ function k = fcnoptimizerkr(input,output) -%reduced version of optimzer constants using only active pixels +%reduced version of optimizer constants using only active pixels k = fcnoptimizerk(input,output(1).N); ti = output.t~=0; diff --git a/MTC/DataAnalysis/plotAnalysis.m b/MTC/DataAnalysis/plotAnalysis.m index 083ff99..542b6d4 100644 --- a/MTC/DataAnalysis/plotAnalysis.m +++ b/MTC/DataAnalysis/plotAnalysis.m @@ -31,8 +31,8 @@ c = ones(size(X,1),1); end -i=any(c==[1 2 4 5],2); fprintf('%g category (1,2,4,5) events over %g runs for %.4g days of reactor ON live-time\n',sum(i),numel(unique(X(i,1))),livetime(X(i,:))); -i=any(c==6,2); fprintf('%g category 6 events over %g runs for %.4g days of reactor OFF live-time\n',sum(i),numel(unique(X(i,1))),livetime(X(i,:))); +i=any(c==[1 2 4 5],2); fprintf('%g category (1,2,4,5) events over %g runs for %.4g days of reactor ON live-time\n',sum(i),numel(unique(X(i,1))),lifetime(X(i,:))); +i=any(c==6,2); fprintf('%g category 6 events over %g runs for %.4g days of reactor OFF live-time\n',sum(i),numel(unique(X(i,1))),lifetime(X(i,:))); i=any(c==[1 2 4 5],2); X=X(i,:); ne=sum(i); @@ -215,7 +215,7 @@ function gfit(X,filename) fclose(fid); end -function days=livetime(X) +function days=lifetime(X) runs=unique(X(:,1)); n=numel(runs); T=X(:,3)/1E6; i=T~=0 & ~isnan(T); T=T(i); X=X(i,:); t=0; for i=1:n ti=T(X(:,1)==runs(i)); diff --git a/plotFunctions/fcnplotdetectorprojection.m b/plotFunctions/fcnplotdetectorprojection.m index 2daafcf..44b0333 100644 --- a/plotFunctions/fcnplotdetectorprojection.m +++ b/plotFunctions/fcnplotdetectorprojection.m @@ -29,7 +29,7 @@ function fcnplotdetectorprojection(input,iap,fxva,p0,proj,label) i=find(cm(:,1)<-100 & cm(:,2)>100); %j = cm(i,1)==-180; j=i(j); i=i(~j); cm(j,[1 4]) = cm(j,[1 4])+360; if any(i) %pixels wrapping around the 180deg line - if all(p0==0) %we can split pixels, but p0 must be in center of detector to make left and right symetric! + if all(p0==0) %we can split pixels, but p0 must be in center of detector to make left and right symmetric! cm(i,2:3)=-180; cm=[cm; -cm(i,:)]; rm=[rm; rm(i,:)]; fxva=[fxva; fxva(i)]; %SPLIT PIXELS IN HALF LEFT AND RIGHT else cm(i,2:3) = cm(i,2:3)-360; %EXTEND WRAPPED PIXELS TO THE LEFT diff --git a/tests/NTC/fcndisambiguate.m b/tests/NTC/fcndisambiguate.m index 88fe2cc..c11246f 100644 --- a/tests/NTC/fcndisambiguate.m +++ b/tests/NTC/fcndisambiguate.m @@ -129,7 +129,7 @@ t = (t1+t2 - l/speed)/2; %ns y = interp1c(1:pmt.strips,pmt.stripx, (L(:,2)+R(:,2))/2); %mm from center -%BREAK DOWN LARGE PULSES INTO SMALLER SINLGES +%BREAK DOWN LARGE PULSES INTO SMALLER SINGLES a=floor( (L(:,3)+R(:,3))/2/dSPRamplitude ); ma=max(a); if ma>1 c=cell(ma,1); tb=c; xb=c; yb=c; tb{1}=t; xb{1}=x; yb{1}=y; diff --git a/tests/Plutonium Simulation/fcnML123.m b/tests/Plutonium Simulation/fcnML123.m index 99c601c..92ccb91 100644 --- a/tests/Plutonium Simulation/fcnML123.m +++ b/tests/Plutonium Simulation/fcnML123.m @@ -11,7 +11,7 @@ om1 = ones(input.nxy^2, input.nrp); L = zeros(input.nxy^2, input.nrp); ov1 = ones(input.nxy^2, 1); -nbatch = 100; %number of measurments per batch max +nbatch = 100; %number of measurements per batch max sk = table.mev.de/4/pi; %stabilizing constant pdfur = zeros(input.nxy^2, nbatch); vnrp = 1:input.nrp; @@ -65,7 +65,7 @@ %ML2------------------------------------------------------------------- if flags.status.ML2 && Ci>0 - zn = accumarray(d1.z.eic, 1, [table.mev.ne 1]); %measurments per bin; + zn = accumarray(d1.z.eic, 1, [table.mev.ne 1]); %measurements per bin; epdf = e(1)*d1.epdf.kr + e(2)*d1.epdf.mantle + e(3)*d1.epdf.crust + e(4)*d1.epdf.fastneutron + e(5)*d1.epdf.accidental + e(6)*d1.epdf.cosmogenic; if flags.status.CRLB zn = d1.epdf.all*table.mev.de; diff --git a/tests/Plutonium Simulation/fcnfindplutonium2.m b/tests/Plutonium Simulation/fcnfindplutonium2.m index 3356216..d0524d7 100644 --- a/tests/Plutonium Simulation/fcnfindplutonium2.m +++ b/tests/Plutonium Simulation/fcnfindplutonium2.m @@ -157,8 +157,8 @@ function [d, s, DEM] = fcngetpositions() %GET GE IMAGE ------------------------------------------------------------- %cam.ssge = [8 2560-720-77 1280 720]; %1080x720; 27" 27" dual monitor hack -%hge = actxserver('googleearth.ApplicationGE'); %Create a COM server running Google Earth -%DEM = fcngetGEDEM(hge,70); fcnFinishStreamProgress(hge); x=getscreen(cam.ssge); DEM.cdata = x.cdata; save DEMHamburg.mat DEM +%he = actxserver('googleearth.ApplicationGE'); %Create a COM server running Google Earth +%DEM = fcngetGEDEM(he,70); fcnFinishStreamProgress(he); x=getscreen(cam.ssge); DEM.cdata = x.cdata; save DEMHamburg.mat DEM %MOL Cosmos, Panama load DEMHamburg @@ -229,7 +229,7 @@ a(:,4) = MC.xhat(:,10,i) - MC.xhat(:,4,i) > 1; %dt > 1ns a(:,5) = fcnrange(MC.xhat(:,1:3,i) - MC.xhat(:,7:9,i)) > 10; %dx > 10mm a(:,6) = MC.xhat(:,5,i)>0.200; %.3 %first bounce > 100keV - a(:,7) = MC.xhat(:,6,i)./MC.xhat(:,12,i) > .2; %dE1/dE2 must be greather than 0.20 + a(:,7) = MC.xhat(:,6,i)./MC.xhat(:,12,i) > .2; %dE1/dE2 must be greater than 0.20 a(:,8) = MC.xhat(:,5,i)./MC.xhat(:,18,i) < .9; %dE1./E0 < 0.9 a(:,9) = MC.xhat(:,5,i)./MC.xhat(:,18,i) > .1; %dE1./E0 > 0.1 a(:,10) = MC.xhat(:,5,i)<3; %.3 %first bounce > 100keV diff --git a/tests/Reactor Simulation/Muons/rastin_JoPG10_1984_1609.pdf b/tests/Reactor Simulation/Muons/rastin_JoPG10_1984_1609.pdf index e782eb8..775689e 100644 Binary files a/tests/Reactor Simulation/Muons/rastin_JoPG10_1984_1609.pdf and b/tests/Reactor Simulation/Muons/rastin_JoPG10_1984_1609.pdf differ diff --git a/tests/Reactor Simulation/Neutrons/Goldhagen IEEE.pdf b/tests/Reactor Simulation/Neutrons/Goldhagen IEEE.pdf index 9110da9..6e44342 100644 Binary files a/tests/Reactor Simulation/Neutrons/Goldhagen IEEE.pdf and b/tests/Reactor Simulation/Neutrons/Goldhagen IEEE.pdf differ diff --git a/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m b/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m index 33f95ac..a4394bc 100644 --- a/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m +++ b/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m @@ -8,7 +8,7 @@ [angstroms x] %[nuetron_angstroms, neutron_MeV, 'Linear Attenuation Factor (cm^-1)'] -tabel=[ 8.941 1.0233e-09 4.690 +table=[ 8.941 1.0233e-09 4.690 6.3917 2.0024e-09 4.655 4.6935 3.7135e-09 4.632 3.6366 6.1854e-09 4.618 diff --git a/tests/Reactor Simulation/fcnReactorCollection.m b/tests/Reactor Simulation/fcnReactorCollection.m index a86c400..053b114 100644 --- a/tests/Reactor Simulation/fcnReactorCollection.m +++ b/tests/Reactor Simulation/fcnReactorCollection.m @@ -32,7 +32,7 @@ flux(4) = 51 * area * rp/20; %Reactor Gammas/s flux(5) = 25 * area; %Atmospheric Gammas/s flux(6) = .0165 * area; %Muons/s .0165/cm^2/s -%flux = flux.*(1-[0 .9869 .9869 .9923 .9923 .6242]'); %Sheilding fractions +%flux = flux.*(1-[0 .9869 .9869 .9923 .9923 .6242]'); %Shielding fractions %flux = [snuebar.n, 0, 0.05, 0, 13, 4]'; diff --git a/tests/Reactor Simulation/fcngetobservedspectra.m b/tests/Reactor Simulation/fcngetobservedspectra.m index ab25832..304143a 100644 --- a/tests/Reactor Simulation/fcngetobservedspectra.m +++ b/tests/Reactor Simulation/fcngetobservedspectra.m @@ -34,7 +34,7 @@ case {4,5} %reactor and atmospheric gammas MC = getcandidatefractions(fnames{fi}); - pf = getGammaTransInLead(MC.MeVVector, shield.lead)'; sf = 1-pf; %pass and sheilded fractions (5cm lead) + pf = getGammaTransInLead(MC.MeVVector, shield.lead)'; sf = 1-pf; %pass and shielded fractions (5cm lead) MC.fraction = MC.fraction.*pf; MC.fraction(:,end+1) = sf; legendstr{9} = sprintf('Shielded %.0fcm lead',shield.lead); diff --git a/tests/Reactor Simulation/pdfs/4 Particle Efficiencies v2.pdf b/tests/Reactor Simulation/pdfs/4 Particle Efficiencies v2.pdf index 8a5130b..6c34c86 100644 Binary files a/tests/Reactor Simulation/pdfs/4 Particle Efficiencies v2.pdf and b/tests/Reactor Simulation/pdfs/4 Particle Efficiencies v2.pdf differ diff --git a/tests/Reactor Simulation/pdfs/4 particle Efficiencies v3.pdf b/tests/Reactor Simulation/pdfs/4 particle Efficiencies v3.pdf index 6aecddc..32a3618 100644 Binary files a/tests/Reactor Simulation/pdfs/4 particle Efficiencies v3.pdf and b/tests/Reactor Simulation/pdfs/4 particle Efficiencies v3.pdf differ diff --git a/tests/Reactor Simulation/pdfs/4 particle Efficiencies v6.pdf b/tests/Reactor Simulation/pdfs/4 particle Efficiencies v6.pdf index e2c9cd8..2f60bdc 100644 Binary files a/tests/Reactor Simulation/pdfs/4 particle Efficiencies v6.pdf and b/tests/Reactor Simulation/pdfs/4 particle Efficiencies v6.pdf differ