Skip to content

Commit

Permalink
Add Ultralytics actions workflow in format.yml (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: glenn-jocher <[email protected]>
  • Loading branch information
UltralyticsAssistant and glenn-jocher committed Jan 1, 2024
1 parent 3dd9082 commit 5891a8e
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 36 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions GEfiles/KML/reactors_DEC99IAEA.kml
Original file line number Diff line number Diff line change
Expand Up @@ -6924,7 +6924,7 @@
<coordinates>2.5161,47.7339,0 </coordinates>
</Point>
</Placemark>
<Placemark id="EL-4 (MONTS D'ARREE)">
<Placemark id="EL-4 (MONTHS D'ARREE)">
<Style>
<IconStyle>
<Icon>
Expand All @@ -6934,11 +6934,11 @@
<color>ff000000</color>
</IconStyle>
</Style>
<name>EL-4 (MONTS D'ARREE)</name>
<name>EL-4 (MONTHS D'ARREE)</name>
<snippet> </snippet>
<description><![CDATA[<center><table><tr><th colspan='2' align='center'><em>Attributes</em></th></tr>
<th>REACTORNAME</th>
<td>EL-4 (MONTS D'ARREE)</td></tr>
<td>EL-4 (MONTHS D'ARREE)</td></tr>
<th>CODE</th>
<td>FR-6</td></tr>
<th>STATUS</th>
Expand All @@ -6950,7 +6950,7 @@
<th>CAPACITY_THERMAL</th>
<td>212</td></tr>
<th>SITENAME</th>
<td>MONTS D'ARREE</td></tr>
<td>MONTHS D'ARREE</td></tr>
<th>COUNTRY</th>
<td>FRANCE</td></tr>
<th>LONGITUDE</th>
Expand All @@ -6970,13 +6970,13 @@
</table></center>]]></description>
<ExtendedData>
<SchemaData schemaUrl="UNEPGRID99_">
<SimpleData name="REACTORAME">EL-4 (MONTS D'ARREE)</SimpleData>
<SimpleData name="REACTORAME">EL-4 (MONTHS D'ARREE)</SimpleData>
<SimpleData name="CODE">FR-6</SimpleData>
<SimpleData name="STATUS">S</SimpleData>
<SimpleData name="TYPE">HWGCR</SimpleData>
<SimpleData name="CAPACITY_ELECTRIC">70</SimpleData>
<SimpleData name="CAPACITY_THERMAL">212</SimpleData>
<SimpleData name="SITENAME">MONTS D'ARREE</SimpleData>
<SimpleData name="SITENAME">MONTHS D'ARREE</SimpleData>
<SimpleData name="COUNTRY">FRANCE</SimpleData>
<SimpleData name="LONGITUDE">-3.8667</SimpleData>
<SimpleData name="LATITUDE">48.35</SimpleData>
Expand Down
4 changes: 2 additions & 2 deletions ML/exhaustive/fcnML123.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -63,7 +63,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;
Expand Down
2 changes: 1 addition & 1 deletion ML/exhaustive/fcnrpprior.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Pexp = input.reactor.power; %GW
sPexp = .05/.3*Pexp; %GW
for j = 1:input.nrp
P = input.rpVec(j); %unkown reactor mean power
P = input.rpVec(j); %unknown reactor mean power
L(:,j) = L(:,j) - (P-Pexp).^2/sPexp^2;
end
end
Expand Down
8 changes: 4 additions & 4 deletions ML/exhaustive/neutron estimation/fcnML123mobileneutron.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
%om1 = ones(input.nxy^2, input.nrp);
%L = zeros(input.nxy^2, input.nrp);
ov1 = ones(input.nxy^2, 1);
nbatch = 1; %number of measurments per batch max
nbatch = 1; %number of measurements per batch max
sk = table.mev.de/4/pi; %stabilizing constant
pdfur = zeros(input.nxy^2, nbatch);
vnrp = uint16(1:input.nrp);
Expand Down Expand Up @@ -329,7 +329,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;
Expand All @@ -355,7 +355,7 @@
% % L = L + interp1(d1.est.urtable.r, b, d1.est.r) - log(Ti)*Ci;
% % end
% 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 = d1.epdf.fastneutron;
% % if flags.status.CRLB
% % zn = d1.epdf.all*table.mev.de;
Expand Down Expand Up @@ -535,7 +535,7 @@
n1 = size(v1,1); %#ok<*NODEF>
j = ceil(rand(n1*10,1)*n1); v1 = v1(j,:); angle = angle(j,:); %random MC reordering

i = mod(1:n0,n1); i(i==0)=n1; %re-use measurements if necessary
i = mod(1:n0,n1); i(i==0)=n1; %reuse measurements if necessary
roll = pi*(2*rand(n0,1)-1);
udxecefs = fcnrotateW2B(roll,fcnel(v0),fcnaz(v0),v1(i,:));
zas = angle(i); %z angle
Expand Down
8 changes: 4 additions & 4 deletions ML/exhaustive/neutron estimation/fcnML123neutron.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
om1 = ones(input.nxy^2, input.nrp);
L = zeros(input.nxy^2, input.nrp);
ov1 = ones(input.nxy^2, 1);
nbatch = 50; %number of measurments per batch max
nbatch = 50; %number of measurements per batch max
sk = table.mev.de/4/pi; %stabilizing constant
pdfur = zeros(input.nxy^2, nbatch);
vnrp = uint16(1:input.nrp);
Expand Down Expand Up @@ -181,7 +181,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;
Expand All @@ -207,7 +207,7 @@
% L = L + interp1(d1.est.urtable.r, b, d1.est.r) - log(Ti)*Ci;
% end
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 = d1.epdf.fastneutron;
% if flags.status.CRLB
% zn = d1.epdf.all*table.mev.de;
Expand Down Expand Up @@ -313,7 +313,7 @@
n1 = size(v1,1); %#ok<*NODEF>
j = ceil(rand(n1*10,1)*n1); v1 = v1(j,:); angle = angle(j,:); %random MC reordering

i = mod(1:n0,n1); i(i==0)=n1; %re-use measurements if necessary
i = mod(1:n0,n1); i(i==0)=n1; %reuse measurements if necessary
roll = pi*(2*rand(n0,1)-1);
udxecefs = fcnrotateW2B(roll,fcnel(v0),fcnaz(v0),v1(i,:));
zas = angle(i); %z angle
Expand Down
6 changes: 3 additions & 3 deletions ML/exhaustive/neutron estimation/fcnfindplutonium2UNUSED.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,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
Expand Down Expand Up @@ -228,7 +228,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
Expand Down
2 changes: 1 addition & 1 deletion ML/fcnenergycut.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
n.allbackground*input.fluxnoise.uncorrelated.mean(3) ]; %detector uncertainty (i.e. fiducial volume)
ne = numel(npebr1svec);

d1.est.br1s = norm(npebr1svec(1:ne-1)); %backgruond 1sigma only (no fiducial uncertainty)
d1.est.br1s = norm(npebr1svec(1:ne-1)); %background 1sigma only (no fiducial uncertainty)
npebr1svec(ne) = (npebr1svec(ne)^2 + (d1.est.br1s*input.fluxnoise.uncorrelated.mean(3))^2)^.5; %add in detector uncertainty affecting background uncertainty
d1.est.d1s = npebr1svec(ne); %background and detector 1sigma

Expand Down
Binary file modified NONNEUTRINOBACKGROUND/0704 0498v2.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
time=input.detectorCollectTime; %time exposure in days
%Input Arguments
%depth = depth in MWE
%Ecut = energy cut in visibile MeV
%Ecut = energy cut in visible MeV

%Define SNIF physical characteristics
%fiducial_vol=160000; %m^3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%Developed on under contract to the United States Government (USG)
%Classification: Unclassified
%
%Restictions:
%Restrictions:
%1) Do not redistribute without permission from USG and/or IAI
%2) Not reviewed or approved for release under ITAR
%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%Developed on under contract to the United States Government (USG)
%Classification: Unclassified
%
%Restictions:
%Restrictions:
%1) Do not redistribute without permission from USG and/or IAI
%2) Not reviewed or approved for release under ITAR
%
Expand Down
2 changes: 1 addition & 1 deletion NONNEUTRINOBACKGROUND/MULLISS/predict_fastn_background.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%Developed on under contract to the United States Government (USG)
%Classification: Unclassified
%
%Restictions:
%Restrictions:
%1) Do not redistribute without permission from USG and/or IAI
%2) Not reviewed or approved for release under ITAR
%
Expand Down
2 changes: 1 addition & 1 deletion NONNEUTRINOBACKGROUND/MULLISS/predict_muon_intensity.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%Developed on under contract to the United States Government (USG)
%Classification: Unclassified
%
%Restictions:
%Restrictions:
%1) Do not redistribute without permission from USG and/or IAI
%2) Not reviewed or approved for release under ITAR
%==========================================================================
Expand Down
2 changes: 1 addition & 1 deletion TESTS/movingdetector/run1.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

% %ML2-------------------------------------------------------------------
% if Ci>0
% zn = accumarray(d1.z.eic, 1, [table.mev.ne 1]); %measurments per bin; %CRLB
% zn = accumarray(d1.z.eic, 1, [table.mev.ne 1]); %measurements per bin; %CRLB
% %zn = d1.epdf.all*table.mev.de;
%
% zei = find(zn); zn=zn(zei); ne=numel(zei);
Expand Down
4 changes: 2 additions & 2 deletions TESTS/movingdetector/run1static.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
nd=200; %input.detectorCollectTime=365/nd; %days
% **** MUST PUT THIS IN AS OBSERVATION TIME IN INIT.M **** -----------------------
sk = table.mev.de/4/pi; %ML3 stabilizing constant
nbatch = 100; %number of measurments per batch max
nbatch = 100; %number of measurements per batch max
om1 = ones(input.nxy^2, input.nrp);
vnrp = 1:input.nrp;
rpscale = input.rpVec; irpscale=1./rpscale;
Expand Down Expand Up @@ -79,7 +79,7 @@

% %ML2-------------------------------------------------------------------
% if Ci>0
% zn = accumarray(d1.z.eic, 1, [table.mev.ne 1]); %measurments per bin; %CRLB
% zn = accumarray(d1.z.eic, 1, [table.mev.ne 1]); %measurements per bin; %CRLB
% %zn = d1.epdf.all*table.mev.de;
%
% zei = find(zn); zn=zn(zei); ne=numel(zei);
Expand Down
2 changes: 1 addition & 1 deletion TESTS/movingdetector/test (portugal pass crlb).m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

%ML2-------------------------------------------------------------------
if 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;
zn = d1.epdf.all*table.mev.de;

zei = find(zn); zn=zn(zei); ne=numel(zei);
Expand Down
10 changes: 5 additions & 5 deletions functions/fcnPlotSNR.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@

subplot(3,1,1)
bar(e,u,.8,'EdgeColor',[.7 .7 .7],'FaceColor','b'); ylabel('\mu (mm)'); axis tight; xlabel('E_{\nu} (MeV)','Interpreter','tex')
title({'Direction Vector Magnitude \mu',sprintf('Detector Type %.0f, Candidate Critera %.0f', input.di, input.ci)})
title({'Direction Vector Magnitude \mu',sprintf('Detector Type %.0f, Candidate Criteria %.0f', input.di, input.ci)})
fcncontextmenuexpand(gca)

subplot(3,1,2)
bar(e,s,.8,'EdgeColor',[.7 .7 .7],'FaceColor','b'); ylabel('1\sigma (mm)'); axis tight; xlabel('E_{\nu} (MeV)','Interpreter','tex')
title({'Direction Vector 1\sigma Standard Deviation Per Axis', sprintf('Detector Type %.0f, Candidate Critera %.0f', input.di, input.ci)})
title({'Direction Vector 1\sigma Standard Deviation Per Axis', sprintf('Detector Type %.0f, Candidate Criteria %.0f', input.di, input.ci)})
fcncontextmenuexpand(gca)

subplot(3,1,3)
bar(e,snr,.8,'EdgeColor',[.7 .7 .7],'FaceColor','b'); ylabel('SNR'); axis tight; xlabel('E_{\nu} (MeV)','Interpreter','tex')
title(sprintf('Direction Vector SNR\nDetector Type %.0f, Candidate Critera %.0f', input.di, input.ci))
title(sprintf('Direction Vector SNR\nDetector Type %.0f, Candidate Criteria %.0f', input.di, input.ci))
fcncontextmenuexpand(gca)

%FIGURE 1
Expand Down Expand Up @@ -65,14 +65,14 @@
end
xlabel(h1, 'cos\theta')
ylabel(h1, 'p(cos\theta)')
title(h1, sprintf('Smeared Angular Probability\nDetector Type %.0f, Candidate Critera %.0f', input.di, input.ci))
title(h1, sprintf('Smeared Angular Probability\nDetector Type %.0f, Candidate Criteria %.0f', input.di, input.ci))
pos = get(h1,'Position');
set(h1,'Position',pos.*[1 1 .9 1])
fcncontextmenuexpand(h1)

xlabel(h2, '\theta (deg)')
ylabel(h2, 'p(\theta)')
title(h2, sprintf('Smeared Angular Probability\nDetector Type %.0f, Candidate Critera %.0f', input.di, input.ci))
title(h2, sprintf('Smeared Angular Probability\nDetector Type %.0f, Candidate Criteria %.0f', input.di, input.ci))
axis(h2,'tight')
fcncontextmenuexpand(h2)
end
Expand Down
2 changes: 1 addition & 1 deletion iDND.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function iDND_OpeningFcn(hObject, eventdata, handles, varargin)
% varargout cell array for returning output args (see VARARGOUT);
% Get default command line output from handles structure
varargout{1} = handles.output;
%fprintf('AntiNeutrino Source Simulation Succesfully Opened.\n')
%fprintf('AntiNeutrino Source Simulation Successfully Opened.\n')

function figure1_CloseRequestFcn(hObject, eventdata, handles)
evalin('base','delete(get(0,''Children'')); clear')
Expand Down

0 comments on commit 5891a8e

Please sign in to comment.