From 6ca0e633cb04bb81427fe8d38581af0803888479 Mon Sep 17 00:00:00 2001 From: Ultralytics AI Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Date: Mon, 1 Jan 2024 03:04:29 +0100 Subject: [PATCH] Add Ultralytics actions workflow in `format.yml` (#4) Co-authored-by: glenn-jocher --- .github/workflows/format.yml | 20 ++++++++++++++++++ C/solidanglec.cpp | 2 +- .../MATERIALS/CERN Index of Refraction.pdf | Bin 5357224 -> 5357247 bytes LIBRARIES/MATERIALS/NIMA522-439PKL.pdf | Bin 241135 -> 241137 bytes LIBRARIES/MATERIALS/OlegThesis.pdf | Bin 1921193 -> 1921200 bytes ML/FASTNEUTRON/fcnplotneutronMC.m | 2 +- ML/FASTNEUTRON/fcnplotneutronTS.m | 2 +- ML/fcnoptimizerkr.m | 2 +- MTC/DataAnalysis/plotAnalysis.m | 6 +++--- plotFunctions/fcnplotdetectorprojection.m | 2 +- tests/NTC/fcndisambiguate.m | 2 +- tests/Plutonium Simulation/fcnML123.m | 4 ++-- .../Plutonium Simulation/fcnfindplutonium2.m | 6 +++--- .../Muons/rastin_JoPG10_1984_1609.pdf | Bin 943414 -> 943417 bytes .../Neutrons/Goldhagen IEEE.pdf | Bin 908591 -> 908603 bytes .../neutron sheilding/attenuationLengths.m | 2 +- .../Reactor Simulation/fcnReactorCollection.m | 2 +- .../fcngetobservedspectra.m | 2 +- .../pdfs/4 Particle Efficiencies v2.pdf | Bin 250724 -> 250724 bytes .../pdfs/4 particle Efficiencies v3.pdf | Bin 621788 -> 621791 bytes .../pdfs/4 particle Efficiencies v6.pdf | Bin 608337 -> 608339 bytes 21 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/format.yml 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 187fb46d98274326580cecb2f9cb35d28d2e7f43..b21982eaad1c7cdc397d5e79b9ce02bdf63d0d87 100644 GIT binary patch delta 816 zcmXBSNla5=5CGu(|9hZ-EXB46h=Ph>0a*l#plr4X6vV2HG;n#qgI6gn`r1^CpqRq% z!s5vq6E$K|jWGci94`tch!PGEH6)@3gD1rh!Ig;7K@MO3`7?8v$;_=kBXkg*auYXo za}W4N6%}1zSMky$6`I+b86Nq-n;GBZsa&lnFjLeDFh#BW<)wnm%7<4%`LN&pSJY(# z{*wPmFK@S5o1r5opevMfNFq}k1JEi^8w0I{)K&{_PvB`kBEpL6f%T)Dv#}bQ4hJQh zh>Kkt3_`(hZ7{@R!isQ{;)xQzZBfJ~EdRR8c$dW?!R=nf{v;WTRu1U77fSM!Ak0Af~s!ykr@84 zQ+BY4J~d4Ah21S6de$}{hSosae7Js^*xAVI2o#CdqA0Wutw+%)25mqaVdV9u7h#-W zt%D1nH>va#2lS@K4jHK208&e=By&!i1zvuM9UsS;ZwzgQ8$)p+A=K`Ifr+>a?|B?T zgrd9gV^cI=2dd63!Ck}xo5MBl{P5*BYMxC}i@?S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<4AeIDTDIk{K-g7}lwgCVeu47OD delta 218 zcmdn6uyp0Z(uNksElkGt%vFg&?dJAO+s*BnJq+6$3YfPy6tDKf zwtdP=_LIKtapoLA%(*?zoa=AP_Lx0f!fMR^A*I`k9&vTgXL9ptYvOKe;%RH*-PXi6 zGlZ!)v3>S6J|N}?Vu9_muL;&1WcEmRZI_%O1jNGIC1;3C(q$_3*}nFu2**pt%I(|M zi5`8$6z<<%J5y|X?M(3_olLHg+ntpq3jLY 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 e782eb8128c95d6cfe9693daf15e1bb4c574d556..775689e5e18aff05256403bb21d006575430bb3e 100644 GIT binary patch delta 137 zcmdmX%5vu^%MChOj780QTJ3sTj6lq^T~CYo`EADH?V@Zf#}_bX=A>@Fw~XcUBj)_v z)b`7rtU%1R{cGNO?uJGBO)W&n<1+z!7<95w_-bjh<&F#F~?g9Ykt2Q(M diff --git a/tests/Reactor Simulation/Neutrons/Goldhagen IEEE.pdf b/tests/Reactor Simulation/Neutrons/Goldhagen IEEE.pdf index 9110da9854358e33e63a0d2e5145e97a7f7b41ff..6e443424c8223031887d1668a1749a84fcd117f2 100644 GIT binary patch delta 218 zcmV<0044vgx;MMJH-NMOKYX`9d;ujf0aS-&tpT@XtpfR50dKcn2?IAh17UM{x0gl( z0n!3;WVf0a1S4w#Y-G2;g9P>g0(Wk=w}k{75dvjyx6_sc`z`@#x6Z``#}xrcx0c%k zHw~U|&kPQT5Z*_3DAFc@f?gMmaWrrS}3AY}d3PV=| zbZBL_Wb_J&MFK%Yx9>R%CZz&yWVaXJ3-Gc5Ww!^C3}mkXR<~ 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 8a5130b0262921755d82ce5723d349e32b2725da..6c34c86fa5c8100ad96ebe9672c55eeb28ec40d8 100644 GIT binary patch delta 29 kcmaE|jQ`0p{tb(BnetMam*%!F&1D2)rtM2}nfIpx0Mv~QfdBvi delta 29 kcmaE|jQ`0p{tb(BnNs|km*%!F&1D2)rtM2}nfIpx0MbJZVE_OC diff --git a/tests/Reactor Simulation/pdfs/4 particle Efficiencies v3.pdf b/tests/Reactor Simulation/pdfs/4 particle Efficiencies v3.pdf index 6aecddcb33ba552971fabfe7b12a41034f48ef23..32a3618bf9a86ec590036c48f5b7d414b69341d2 100644 GIT binary patch delta 87 zcmccfQ}zB&)eSe37}J_>CvCr-#8@xFQl62T*B)EW2*gZ4%)C9eoJF*Pr93q!XM5>; q7MXm;^!ABytlKBXu_er6%y0krgKhiAAM8T6nF@2ZvtHr2z5)Q45+&9E delta 82 zcmccrQ}xbI)eSe3nB4rEZzXNNmBd&t!W^FA*B)EW2*gZ4%)C9eoJF*PIXu;8d)a#y lnf&(2aje@X$FU{MYX9_WGhd;+&~T;aIB0szv6Bc}iW diff --git a/tests/Reactor Simulation/pdfs/4 particle Efficiencies v6.pdf b/tests/Reactor Simulation/pdfs/4 particle Efficiencies v6.pdf index e2c9cd842682aada082f1264bea84f02953686f2..2f60bdc14955f71a78a8542ed9d3f84044dbded6 100644 GIT binary patch delta 133 zcmcaOLG|(k)eTbO%=x7Sn`OjJRx!G64m>FGhp8lad-`6+wI`TMGE%pTw=r#0XGu)X zDA|5$Ez^=V#-jED6J{W0*O?5@(apGFCVSW}W{(ud?XxFyaLIvLD>ibho(2HwUopl2