From 8b71df5712141c1dbd383406755fd7e9351e51e2 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 28 Mar 2025 02:21:33 +0100 Subject: [PATCH] Refactor code for speed and clarity --- DETECTOR/fcnDefinePixels.m | 2 + DETECTOR/fcncylinder.m | 2 + ML/ANTINEUTRINO/fcnantineutrino.m | 2 + ML/ANTINEUTRINO/fcngetcandidates.m | 2 + ML/FASTNEUTRON/E2neutronE.m | 2 + ML/FASTNEUTRON/doubleScatterVerification.m | 2 + ML/FASTNEUTRON/fcnfastneutron.m | 2 + ML/FASTNEUTRON/fcnneutronke.m | 2 + ML/FASTNEUTRON/fcnneutrontheta.m | 2 + ML/FASTNEUTRON/fcnplotcone.m | 2 + ML/FASTNEUTRON/fcnplotneutronMC.m | 2 + ML/FASTNEUTRON/fcnplotneutronTS.m | 2 + ML/FASTNEUTRON/testOrderStatistic.m | 2 + ML/FERMAT/fcnfermatpointvectorized.m | 2 + ML/FERMAT/fcnsolidangle.m | 2 + ML/FERMAT/fcnsolidanglevectorized.m | 2 + ML/FIBER/fiberMuonFitter.m | 2 + ML/FIBER/fiberNeutronFitter.m | 2 + ML/FIBER/fitLineND.m | 2 + ML/FIBER/weightedcov.m | 2 + ML/GAMMA/fcnKleinNishina.m | 2 + ML/GAMMA/plotSkyMap.m | 2 + ML/MUON/fcnmuon.m | 2 + ML/POISSON/fcnMLenergy.m | 2 + ML/POISSON/fcnMLpoint.m | 2 + ML/POISSON/runMLpoint.m | 2 + ML/fcnBuffer2Memory.m | 2 + ML/fcnanalogvoltage.m | 2 + ML/fcnguessinitenergy.m | 2 + ML/fcnoptimizerk.m | 2 + ML/fcnoptimizerkr.m | 2 + ML/oneBookend.m | 2 + MOMENTUM/momentum.m | 2 + MOMENTUM/momentum1event.m | 2 + MOMENTUM/plotPointStats.m | 2 + MTC/DataAnalysis/example_mtcb_commands.sh | 2 + MTC/DataAnalysis/fcnloadMTCQT.m | 2 + MTC/DataAnalysis/fcnprocess1run.m | 2 + MTC/DataAnalysis/firstfour.m | 2 + MTC/DataAnalysis/getRunCategories.m | 2 + MTC/DataAnalysis/lastfour.m | 2 + MTC/DataAnalysis/plotAnalysis.m | 2 + MTC/DataAnalysis/removeSpikes.m | 2 + MTC/DataAnalysis/runAnalysis.m | 2 + MTC/Mapping/MTCSRCCH2pixelID.m | 2 + MTC/Mapping/MTCpixelID2SRCCH.m | 2 + MTC/Mapping/fcnUHShigepixel2jocherpixel.m | 2 + MTC/Mapping/fcnchannels2windows.m | 2 + MTC/Mapping/fcnwindows2channels.m | 2 + MTC/fcngmdistribution.m | 2 + MTC/pedestals/convertData2Pedestals.m | 2 + MTC/pedestals/fcnpruninglist.m | 2 + MTC/pedestals/subtractpedestals.m | 2 + MTC/timebase offsets 2015/fcngettimebases.m | 2 + NN/functions/conventionalFiberFit.m | 2 + NN/functions/gatherTrainingData.m | 2 + NN/functions/trainFiber64.m | 2 + NN/functions/trainNewDetector.m | 2 + PHOTONS/cherenkov_magnitude.m | 2 + PHOTONS/fcnBQF.m | 2 + PHOTONS/fcndetectorintercept.m | 2 + PHOTONS/fcne2wl.m | 2 + PHOTONS/fcngain2ratio.m | 2 + PHOTONS/fcninsidedetector.m | 2 + PHOTONS/fcnke2c.m | 2 + PHOTONS/fcnphotondeconvolution.m | 2 + PHOTONS/fcnphotonsIC.m | 2 + PHOTONS/fcnphotontransport.m | 2 + PHOTONS/fcnratio2gain.m | 2 + PHOTONS/fcnsignalLoss2attenuationLength.m | 2 + PHOTONS/fcnwl2e.m | 2 + README.md | 59 ++++++++++--------- SAVED/fcnsavefile.m | 2 + TSresults/fcnrunTS.m | 2 + TSresults/fcnrunTSCL.m | 2 + TSresults/plotMTCNeutron.m | 2 + TSresults/plotNTCfiber.m | 2 + TSresults/plotTSMTC.m | 2 + TSresults/plotTScontinuous.m | 2 + TSresults/plotTSdiscrete.m | 2 + TSresults/plotTSfiber.m | 2 + TSresults/plotTSmuons.m | 2 + fcn1Event.m | 2 + fcninittables.m | 2 + fcnupdateAxes1.m | 2 + fcnupdateAxes2.m | 2 + initFlags.m | 2 + nView.m | 2 + nViewInit.m | 2 + play.m | 2 + plotFunctions/GUIplotting/eventViewer.m | 2 + plotFunctions/GUIplotting/fcnPhotons.m | 2 + plotFunctions/GUIplotting/fcnResizeAxis.m | 2 + .../GUIplotting/fcnUpdate1ParticleType.m | 2 + plotFunctions/GUIplotting/fcnplotpixels.m | 2 + plotFunctions/GUIplotting/fcnsetGUIclims.m | 2 + plotFunctions/GUIplotting/fcnupdateGUItable.m | 2 + plotFunctions/fcnPlotDendrogram.m | 2 + plotFunctions/fcnPlotDetector.m | 2 + plotFunctions/fcnPlotLorentzFactorGamma.m | 2 + plotFunctions/fcnPlotMTCSRODs.m | 2 + plotFunctions/fcnPlotPhotonEmissionTimes.m | 2 + .../fcnPlotSmearedExponentialTable.m | 2 + plotFunctions/fcnPlotWavelengthDepDist.m | 2 + plotFunctions/fcnplotdetectorprojection.m | 2 + prepareRCDF.m | 2 + tests/2D Cost Function Plots/fcnplot2DCF.m | 2 + tests/NTC/FiberLAPPD.m | 2 + tests/NTC/fcnNeutronExits.m | 2 + tests/NTC/fcndisambiguate.m | 2 + .../Roadside WGP/fcntestranges.m | 2 + tests/Plutonium Simulation/fcnML123.m | 2 + tests/Plutonium Simulation/fcnPuflux.m | 2 + .../Plutonium Simulation/fcnfindplutonium2.m | 2 + .../Gammas/getGammaTransInLead.m | 2 + .../Gammas/plotgammaspectrum.m | 2 + .../neutron sheilding/attenuationLengths.m | 2 + .../neutron sheilding/eV_to_Angstroms.m | 2 + .../Neutrons/plotneutronspectrum.m | 2 + .../Reactor Simulation/fcnReactorCollection.m | 2 + .../fcnenergydistributions.m | 2 + .../fcngetobservedspectra.m | 2 + tests/Scintillator Decay/fcnRun.m | 2 + .../fcngetnoisestatistics1channel.m | 2 + .../fcngetnoisestatistics3channels.m | 2 + tests/Wiener Deconvolution/fcndeconvolve.m | 2 + tests/backprojection/fcnTriangulate.m | 2 + tests/backprojection/rundeconvolution.m | 2 + .../simpleBackprojectionExample.m | 2 + tests/gamma/fcnGammaAngles.m | 2 + tests/neutronStats/neutronpdf.m | 2 + tests/neutronStats/neutronpdfplots.m | 2 + .../testCoincidences.m | 2 + tests/reflection/fcntestreflections.m | 2 + 134 files changed, 296 insertions(+), 29 deletions(-) diff --git a/DETECTOR/fcnDefinePixels.m b/DETECTOR/fcnDefinePixels.m index e75d27c..68d54dd 100644 --- a/DETECTOR/fcnDefinePixels.m +++ b/DETECTOR/fcnDefinePixels.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [input, flags] = fcnDefinePixels(input,flags,handles) if ~flags.update.detectorgeometry; return; end fprintf('Defining Detector Geometry... '); tic diff --git a/DETECTOR/fcncylinder.m b/DETECTOR/fcncylinder.m index f8fe4f7..9da5d82 100644 --- a/DETECTOR/fcncylinder.m +++ b/DETECTOR/fcncylinder.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [P, input] = fcncylinder(input) P = cell(1,6); d2r = pi/180; diff --git a/ML/ANTINEUTRINO/fcnantineutrino.m b/ML/ANTINEUTRINO/fcnantineutrino.m index 604eee5..dc09c75 100644 --- a/ML/ANTINEUTRINO/fcnantineutrino.m +++ b/ML/ANTINEUTRINO/fcnantineutrino.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = fcnantineutrino(input,output,handles,G1,plotflag) zv=zeros(1,10); results.xhat=zv; results.true=zv; if plotflag; try closeallexcept(handles.GUI.figure1); catch; end; tic; end diff --git a/ML/ANTINEUTRINO/fcngetcandidates.m b/ML/ANTINEUTRINO/fcngetcandidates.m index f374ca4..eb2cd3b 100644 --- a/ML/ANTINEUTRINO/fcngetcandidates.m +++ b/ML/ANTINEUTRINO/fcngetcandidates.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [C, XC, TC, EC, EFC, str] = fcngetcandidates(input,N,X,T,F,particleName) %C=candidates, XC = candidate estimates, TC = candidate truths, EC = candidate estimate errors (xhat-xtrue) %N=number of photons, X=xhat estimate, T=xtrue, E=error (xhat-xtrue), F=estimator failure flag, str='antineutrino' diff --git a/ML/FASTNEUTRON/E2neutronE.m b/ML/FASTNEUTRON/E2neutronE.m index 24df617..2c3dece 100644 --- a/ML/FASTNEUTRON/E2neutronE.m +++ b/ML/FASTNEUTRON/E2neutronE.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function Eneutron = E2neutronE(Evis) P = [-0.000169585232527955,0.00783271796930060,-0.167346627765554,2.19492596963189,-19.7793109964175,129.859482522855,-642.770385257028,2448.57093493363,-7265.02204696498,16885.4910975076,-30764.0514123043,43767.5233347055,-48213.5281542030,40568.9020684766,-25563.4422468919,11732.7579233951,-3777.11961099886,813.059509362973,-112.429581800018,13.4656322313572,-0.0243103851590198]; diff --git a/ML/FASTNEUTRON/doubleScatterVerification.m b/ML/FASTNEUTRON/doubleScatterVerification.m index 7b8b1e4..c8da4d7 100644 --- a/ML/FASTNEUTRON/doubleScatterVerification.m +++ b/ML/FASTNEUTRON/doubleScatterVerification.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = doubleScatterVerification(results,input,G1,PE,handles,x,s,particle,plotflag) MTCflag = ischecked(handles.GUI.realdataflag); fiberCaptureFraction=.5; E2PE=input.Material(5).yield*input.cube.QEmean*fiberCaptureFraction; %MeV to PE diff --git a/ML/FASTNEUTRON/fcnfastneutron.m b/ML/FASTNEUTRON/fcnfastneutron.m index 898329a..2aee828 100644 --- a/ML/FASTNEUTRON/fcnfastneutron.m +++ b/ML/FASTNEUTRON/fcnfastneutron.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = fcnfastneutron(input,output,handles,PE,G1,plotflag) MTCflag = ischecked(handles.GUI.realdataflag); results = []; nz = sum(output(1).N); if nz<19 || nz>1E4; return; end; if plotflag; closeallexcept(handles.GUI.figure1); end diff --git a/ML/FASTNEUTRON/fcnneutronke.m b/ML/FASTNEUTRON/fcnneutronke.m index 5460a87..cfcd422 100644 --- a/ML/FASTNEUTRON/fcnneutronke.m +++ b/ML/FASTNEUTRON/fcnneutronke.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function ke = fcnneutronke(x) %x=[xyz t E; xyz t E]; neutronmass = 939.565378; %MeV/c^2 diff --git a/ML/FASTNEUTRON/fcnneutrontheta.m b/ML/FASTNEUTRON/fcnneutrontheta.m index 16cdf12..ff6b0e3 100644 --- a/ML/FASTNEUTRON/fcnneutrontheta.m +++ b/ML/FASTNEUTRON/fcnneutrontheta.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function theta = fcnneutrontheta(ke0,e) ep = e(1); %energy of first proton hit en = ke0; %energy of neutron before first proton hit diff --git a/ML/FASTNEUTRON/fcnplotcone.m b/ML/FASTNEUTRON/fcnplotcone.m index 536d161..b61fca0 100644 --- a/ML/FASTNEUTRON/fcnplotcone.m +++ b/ML/FASTNEUTRON/fcnplotcone.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [X,Y,Z,conevecs] = fcnplotcone(a,b,angle) %function plots a cone with origin 'a', pointing toward 'b', half angle 'angle' vec = b - a; diff --git a/ML/FASTNEUTRON/fcnplotneutronMC.m b/ML/FASTNEUTRON/fcnplotneutronMC.m index 935b85b..5f8acf0 100644 --- a/ML/FASTNEUTRON/fcnplotneutronMC.m +++ b/ML/FASTNEUTRON/fcnplotneutronMC.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnplotneutronMC(input,MC,MeVVector) close all; clc input.neutron = load('dEfit.mat'); diff --git a/ML/FASTNEUTRON/fcnplotneutronTS.m b/ML/FASTNEUTRON/fcnplotneutronTS.m index 372877b..af8a5af 100644 --- a/ML/FASTNEUTRON/fcnplotneutronTS.m +++ b/ML/FASTNEUTRON/fcnplotneutronTS.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnplotneutronTS(input,MC,tsv) if nargin==1 [fname, pname] = uigetfile('*.mat','Pick a TS file'); diff --git a/ML/FASTNEUTRON/testOrderStatistic.m b/ML/FASTNEUTRON/testOrderStatistic.m index 36cbca4..d580a96 100644 --- a/ML/FASTNEUTRON/testOrderStatistic.m +++ b/ML/FASTNEUTRON/testOrderStatistic.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = testOrderStatistic(input) A=input.table.smearExp; diff --git a/ML/FERMAT/fcnfermatpointvectorized.m b/ML/FERMAT/fcnfermatpointvectorized.m index 0474f88..c77779c 100644 --- a/ML/FERMAT/fcnfermatpointvectorized.m +++ b/ML/FERMAT/fcnfermatpointvectorized.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [fx, gx, F, sourceprobability, F1] = fcnfermatpointvectorized(k,X) %X = [xyztw...xyztw] gx = []; %gradient diff --git a/ML/FERMAT/fcnsolidangle.m b/ML/FERMAT/fcnsolidangle.m index f34569e..cd44c1c 100644 --- a/ML/FERMAT/fcnsolidangle.m +++ b/ML/FERMAT/fcnsolidangle.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function sa = fcnsolidangle(r,A) %A=area of surface (units^2) %r=radius (units) diff --git a/ML/FERMAT/fcnsolidanglevectorized.m b/ML/FERMAT/fcnsolidanglevectorized.m index 26d1c8f..4781159 100644 --- a/ML/FERMAT/fcnsolidanglevectorized.m +++ b/ML/FERMAT/fcnsolidanglevectorized.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [fall, r] = fcnsolidanglevectorized(k,X) %mode = 1; %1=simple, 2=reflect np = size(X,1); diff --git a/ML/FIBER/fiberMuonFitter.m b/ML/FIBER/fiberMuonFitter.m index 22aabca..0e388cb 100644 --- a/ML/FIBER/fiberMuonFitter.m +++ b/ML/FIBER/fiberMuonFitter.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = fiberMuonFitter(input,output,flags,PE,G1,handles,x,s,plotflag) results=[]; [~, si] = sortrows(x,4); x=x(si,:); s=s(si,:); %sort by time diff --git a/ML/FIBER/fiberNeutronFitter.m b/ML/FIBER/fiberNeutronFitter.m index b3d476a..2d1fc67 100644 --- a/ML/FIBER/fiberNeutronFitter.m +++ b/ML/FIBER/fiberNeutronFitter.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = fiberNeutronFitter(input,output,flags,PE,G1,handles,plotflag) results.protonprotonflag = [0 0]; results.minangleerror = 0; diff --git a/ML/FIBER/fitLineND.m b/ML/FIBER/fitLineND.m index 3779da2..3fd1c0e 100644 --- a/ML/FIBER/fitLineND.m +++ b/ML/FIBER/fitLineND.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [mu,V] = fitLineND(x,w) %x = [n x nd] vector, nd=number dimensions if numel(x(:,1))==1 diff --git a/ML/FIBER/weightedcov.m b/ML/FIBER/weightedcov.m index e6ad71c..821dbcb 100644 --- a/ML/FIBER/weightedcov.m +++ b/ML/FIBER/weightedcov.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function C = weightedcov(x,w) %x = NxM, weights = Nx1 [N,M]=size(x); diff --git a/ML/GAMMA/fcnKleinNishina.m b/ML/GAMMA/fcnKleinNishina.m index 1d862a9..7a600bf 100644 --- a/ML/GAMMA/fcnKleinNishina.m +++ b/ML/GAMMA/fcnKleinNishina.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnKleinNishina() clc; clear all; close all me = 0.510998910; %electron rest mass (MeV) or (MeV/c^2) diff --git a/ML/GAMMA/plotSkyMap.m b/ML/GAMMA/plotSkyMap.m index b22d8f7..ff0c6f5 100644 --- a/ML/GAMMA/plotSkyMap.m +++ b/ML/GAMMA/plotSkyMap.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotSkyMap(F,v,angles,np,particleName) nr = 100; nc = 200; diff --git a/ML/MUON/fcnmuon.m b/ML/MUON/fcnmuon.m index 1a10d4c..11746ed 100644 --- a/ML/MUON/fcnmuon.m +++ b/ML/MUON/fcnmuon.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = fcnmuon(input,output,handles,photons,G1,plotflag) results=[]; MTCflag=ischecked(handles.GUI.realdataflag); if plotflag; closeallexcept([handles.GUI.figure1, findobj('Name','Event Viewer')]); end nz = output(1).Nsum; if nz<30 || nz>30E4; return; end diff --git a/ML/POISSON/fcnMLenergy.m b/ML/POISSON/fcnMLenergy.m index 1181fc0..25c044c 100644 --- a/ML/POISSON/fcnMLenergy.m +++ b/ML/POISSON/fcnMLenergy.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [x, fx] = fcnMLenergy(input,p0,zN,x0) %vectorized by default if sum(zN>0)<3; x=0; fx=0; return; end k = fcnoptimizerk(input,zN); k.reflections = 0; diff --git a/ML/POISSON/fcnMLpoint.m b/ML/POISSON/fcnMLpoint.m index ae55d34..034bb1c 100644 --- a/ML/POISSON/fcnMLpoint.m +++ b/ML/POISSON/fcnMLpoint.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [x, fx] = fcnMLpoint(input,output,x0) %vectorized by default k = fcnoptimizerk(input,output); k.reflections = 1; zN = k.nhpp; diff --git a/ML/POISSON/runMLpoint.m b/ML/POISSON/runMLpoint.m index 9611c31..9e26208 100644 --- a/ML/POISSON/runMLpoint.m +++ b/ML/POISSON/runMLpoint.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = runMLpoint(input,output,handles,G1,plotflag) results=[]; MTCflag = ischecked(handles.GUI.realdataflag); if MTCflag; A=input.MTC.A; ei=input.eventNumber+1; end; if plotflag; try closeallexcept(handles.GUI.figure1); catch; end; end; tic diff --git a/ML/fcnBuffer2Memory.m b/ML/fcnBuffer2Memory.m index 156714e..cd0090b 100644 --- a/ML/fcnBuffer2Memory.m +++ b/ML/fcnBuffer2Memory.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [input, output] = fcnBuffer2Memory(input,flags,handles,PE) MTCflag = ischecked(handles.GUI.realdataflag); diff --git a/ML/fcnanalogvoltage.m b/ML/fcnanalogvoltage.m index abbbbaf..5b5c45a 100644 --- a/ML/fcnanalogvoltage.m +++ b/ML/fcnanalogvoltage.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [pdf, strip, pid] = fcnanalogvoltage(input,flags,PE,t,ystrip,i,addnoiseflag) pmt = input.cube.pmt; diff --git a/ML/fcnguessinitenergy.m b/ML/fcnguessinitenergy.m index 76dd577..86366fd 100644 --- a/ML/fcnguessinitenergy.m +++ b/ML/fcnguessinitenergy.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function e0hat = fcnguessinitenergy(k,zN,p) %p = sqrt(zN)'*input.cube.all.xyz/sum(sqrt(zN)); %position guess k.reflections=0; diff --git a/ML/fcnoptimizerk.m b/ML/fcnoptimizerk.m index 46fee93..e4285b1 100644 --- a/ML/fcnoptimizerk.m +++ b/ML/fcnoptimizerk.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function k = fcnoptimizerk(input, output) %MTCflag = ischecked(evalin('base','handles.GUI.realdataflag')); MTC766flag = false; diff --git a/ML/fcnoptimizerkr.m b/ML/fcnoptimizerkr.m index 4d1f860..8bef9cd 100644 --- a/ML/fcnoptimizerkr.m +++ b/ML/fcnoptimizerkr.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function k = fcnoptimizerkr(input,output) %reduced version of optimizer constants using only active pixels k = fcnoptimizerk(input,output(1).N); diff --git a/ML/oneBookend.m b/ML/oneBookend.m index 9cdf44f..2835e6c 100644 --- a/ML/oneBookend.m +++ b/ML/oneBookend.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function A = oneBookend(F,I,D,PEs,t0,gain) MTC766flag=false; if MTC766flag diff --git a/MOMENTUM/momentum.m b/MOMENTUM/momentum.m index b152f94..d561a4e 100644 --- a/MOMENTUM/momentum.m +++ b/MOMENTUM/momentum.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + clc; close; format long g MeV = 11; diff --git a/MOMENTUM/momentum1event.m b/MOMENTUM/momentum1event.m index ee36194..4ec4605 100644 --- a/MOMENTUM/momentum1event.m +++ b/MOMENTUM/momentum1event.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + clc; clear; close; format long g MeV = 4; e = 4; %event number diff --git a/MOMENTUM/plotPointStats.m b/MOMENTUM/plotPointStats.m index 31d68c8..c909b39 100644 --- a/MOMENTUM/plotPointStats.m +++ b/MOMENTUM/plotPointStats.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotPointStats(G) p1 = zeros(1,3); diff --git a/MTC/DataAnalysis/example_mtcb_commands.sh b/MTC/DataAnalysis/example_mtcb_commands.sh index d6f58b9..8b12db8 100644 --- a/MTC/DataAnalysis/example_mtcb_commands.sh +++ b/MTC/DataAnalysis/example_mtcb_commands.sh @@ -1,3 +1,5 @@ +# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + # LOGIN TO SERVER: ssh -X -p 25260 m033372@mtc-b.phys.hawaii.edu diff --git a/MTC/DataAnalysis/fcnloadMTCQT.m b/MTC/DataAnalysis/fcnloadMTCQT.m index a9f396a..651f281 100644 --- a/MTC/DataAnalysis/fcnloadMTCQT.m +++ b/MTC/DataAnalysis/fcnloadMTCQT.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [input, D, es] = fcnloadMTCQT(pathname,input,flags,handles,plotflag,ei) if exist('ei','var') && ~isempty(ei) || flags.status.MC; MCflag=true; else MCflag=false; end if MCflag; plotflag = 0; end; fprintf('Loading MTC data... '); tic diff --git a/MTC/DataAnalysis/fcnprocess1run.m b/MTC/DataAnalysis/fcnprocess1run.m index 397bd48..a7f3eb7 100644 --- a/MTC/DataAnalysis/fcnprocess1run.m +++ b/MTC/DataAnalysis/fcnprocess1run.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [A, Cout] = fcnprocess1run(A,handles,plotflag) try closeallexcept(handles.GUI.figure1); end %#ok if ~exist('plotflag','var') || isempty(plotflag); plotflag=false; end diff --git a/MTC/DataAnalysis/firstfour.m b/MTC/DataAnalysis/firstfour.m index 4cf0afe..9194f69 100644 --- a/MTC/DataAnalysis/firstfour.m +++ b/MTC/DataAnalysis/firstfour.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function i=firstfour(w,i) i = i( w<(min(w)+4) ); end diff --git a/MTC/DataAnalysis/getRunCategories.m b/MTC/DataAnalysis/getRunCategories.m index da94e97..4cbeb37 100644 --- a/MTC/DataAnalysis/getRunCategories.m +++ b/MTC/DataAnalysis/getRunCategories.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [run,category] = getRunCategories() X = GetGoogleSpreadsheet('1LEZYzBG8Ae_jQcYmxaTPxrfccSzXTMRNtyozElfS98k'); X=X(3:end,[1 13]); diff --git a/MTC/DataAnalysis/lastfour.m b/MTC/DataAnalysis/lastfour.m index 64264e2..76934bb 100644 --- a/MTC/DataAnalysis/lastfour.m +++ b/MTC/DataAnalysis/lastfour.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function i=lastfour(w,i) i = i( w>(max(w)-4) ); end diff --git a/MTC/DataAnalysis/plotAnalysis.m b/MTC/DataAnalysis/plotAnalysis.m index 542b6d4..72aa383 100644 --- a/MTC/DataAnalysis/plotAnalysis.m +++ b/MTC/DataAnalysis/plotAnalysis.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotAnalysis() clc; clear; close all %MTC RUNS: https://docs.google.com/spreadsheets/d/1LEZYzBG8Ae_jQcYmxaTPxrfccSzXTMRNtyozElfS98k/edit?usp=sharing diff --git a/MTC/DataAnalysis/removeSpikes.m b/MTC/DataAnalysis/removeSpikes.m index facba4f..b16cee4 100644 --- a/MTC/DataAnalysis/removeSpikes.m +++ b/MTC/DataAnalysis/removeSpikes.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function V=removeSpikes(V,threshold) if nargin==1; threshold=50; end diff --git a/MTC/DataAnalysis/runAnalysis.m b/MTC/DataAnalysis/runAnalysis.m index 5d54d6f..545d36e 100644 --- a/MTC/DataAnalysis/runAnalysis.m +++ b/MTC/DataAnalysis/runAnalysis.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = runAnalysis() close all; clc; clear all %#ok load M2.mat; input.MTC.A.x=[]; input.MTC.C=[]; %#ok<*STRNU> diff --git a/MTC/Mapping/MTCSRCCH2pixelID.m b/MTC/Mapping/MTCSRCCH2pixelID.m index 0a3c2eb..f22df36 100644 --- a/MTC/Mapping/MTCSRCCH2pixelID.m +++ b/MTC/Mapping/MTCSRCCH2pixelID.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function ID = MTCSRCCH2pixelID(SRCCH) %load('MTCmapping.mat'); %X = [SRCCH PMT PMTR PMTC ASICs ASICd Si CHs FACE]; X=getmap; diff --git a/MTC/Mapping/MTCpixelID2SRCCH.m b/MTC/Mapping/MTCpixelID2SRCCH.m index 803feb1..91c1323 100644 --- a/MTC/Mapping/MTCpixelID2SRCCH.m +++ b/MTC/Mapping/MTCpixelID2SRCCH.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [S, R, C, CH, PMT, PMTR, PMTC, As, Ad, Si, CHs] = MTCpixelID2SRCCH(i) load('MTCmapping.mat'); %X = [SRCCH PMT PMTR PMTC ASICs ASICd Si CHs FACE]; %SRCCH(SRCCH(:,1)==0, 1)=102; diff --git a/MTC/Mapping/fcnUHShigepixel2jocherpixel.m b/MTC/Mapping/fcnUHShigepixel2jocherpixel.m index f4524cb..cf51858 100644 --- a/MTC/Mapping/fcnUHShigepixel2jocherpixel.m +++ b/MTC/Mapping/fcnUHShigepixel2jocherpixel.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnUHShigepixel2jocherpixel(input) C_uh2j = fcnENU2NED; %x_j = C_uh2j*x_uh; %UH - JOCHER diff --git a/MTC/Mapping/fcnchannels2windows.m b/MTC/Mapping/fcnchannels2windows.m index f9ed750..9d9e957 100644 --- a/MTC/Mapping/fcnchannels2windows.m +++ b/MTC/Mapping/fcnchannels2windows.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function a = fcnchannels2windows(a) %pa = 1536x32768x5 window format (for 5 pedestals) %pb = 786432x64x5 channel format diff --git a/MTC/Mapping/fcnwindows2channels.m b/MTC/Mapping/fcnwindows2channels.m index 56aebe8..1b22162 100644 --- a/MTC/Mapping/fcnwindows2channels.m +++ b/MTC/Mapping/fcnwindows2channels.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function a = fcnwindows2channels(a) %pa = 1536x32768x5 window format (for 5 pedestals) %pb = 786432x64x5 channel format diff --git a/MTC/fcngmdistribution.m b/MTC/fcngmdistribution.m index 383d35b..95e00ac 100644 --- a/MTC/fcngmdistribution.m +++ b/MTC/fcngmdistribution.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [mu,s,k,X] = fcngmdistribution(X) %fits data and tells you how many normals make up the underlying mixture distribution mu=[]; diff --git a/MTC/pedestals/convertData2Pedestals.m b/MTC/pedestals/convertData2Pedestals.m index 5ee3233..1989532 100644 --- a/MTC/pedestals/convertData2Pedestals.m +++ b/MTC/pedestals/convertData2Pedestals.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = convertData2Pedestals(input) A=input.MTC.A; input.MTC.A=[]; fname=A.filename; E = A.E-min(A.E)+1; diff --git a/MTC/pedestals/fcnpruninglist.m b/MTC/pedestals/fcnpruninglist.m index fd823b0..7ebc528 100644 --- a/MTC/pedestals/fcnpruninglist.m +++ b/MTC/pedestals/fcnpruninglist.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [b, i] = fcnpruninglist(a) if nargin==0; a=(1:1536)'; end diff --git a/MTC/pedestals/subtractpedestals.m b/MTC/pedestals/subtractpedestals.m index 8c4ca3f..fd02cc4 100644 --- a/MTC/pedestals/subtractpedestals.m +++ b/MTC/pedestals/subtractpedestals.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function V = subtractpedestals(pedestals,pedestalOutliers,pid,window,V) % load('MTCpedestal') %loads X 98304x71 % pedestals = muvb(:,8:end); %#ok %idxm=load('MTCmapping.mat'); b=b(idxm.X(:,1),:); diff --git a/MTC/timebase offsets 2015/fcngettimebases.m b/MTC/timebase offsets 2015/fcngettimebases.m index e9bf98a..1daa71c 100644 --- a/MTC/timebase offsets 2015/fcngettimebases.m +++ b/MTC/timebase offsets 2015/fcngettimebases.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcngettimebases(input,handles,flags) closeallexcept(handles.GUI.figure1); clc; [pathname]=uigetdir([pwd '/*.*','MultiSelect','On'],'Select folder:'); diff --git a/NN/functions/conventionalFiberFit.m b/NN/functions/conventionalFiberFit.m index 53b430f..aef2bdf 100644 --- a/NN/functions/conventionalFiberFit.m +++ b/NN/functions/conventionalFiberFit.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function xhat = conventionalFiberFit(I, T, threshold) nw=size(I,2)/2; vi{1}=1:nw; vi{2}=vi{1}+nw; if nargin==2 diff --git a/NN/functions/gatherTrainingData.m b/NN/functions/gatherTrainingData.m index 0ed6b3e..d412485 100644 --- a/NN/functions/gatherTrainingData.m +++ b/NN/functions/gatherTrainingData.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = gatherTrainingData(input,output,PE,G1) % mode='trainLAPPDNTC2'; % switch mode diff --git a/NN/functions/trainFiber64.m b/NN/functions/trainFiber64.m index 83004c4..f246d2e 100644 --- a/NN/functions/trainFiber64.m +++ b/NN/functions/trainFiber64.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function trainFiber64(files) if nargin==0 applyFlag=false; diff --git a/NN/functions/trainNewDetector.m b/NN/functions/trainNewDetector.m index 056e114..ff3ffce 100644 --- a/NN/functions/trainNewDetector.m +++ b/NN/functions/trainNewDetector.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function []=trainNewDetector() evalin('base','clc; clear all; close all;'); startclock=clock; diff --git a/PHOTONS/cherenkov_magnitude.m b/PHOTONS/cherenkov_magnitude.m index 37fd77a..edec744 100644 --- a/PHOTONS/cherenkov_magnitude.m +++ b/PHOTONS/cherenkov_magnitude.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function wlpdf = cherenkov_magnitude(wl,ir,speed) %wl (nm) %speed (c) diff --git a/PHOTONS/fcnBQF.m b/PHOTONS/fcnBQF.m index 6e94878..5e3e5e0 100644 --- a/PHOTONS/fcnBQF.m +++ b/PHOTONS/fcnBQF.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function devis = fcnBQF(de,dx,BQF) %converts energy to visible energy using BQF %dx = distance travelled in mm diff --git a/PHOTONS/fcndetectorintercept.m b/PHOTONS/fcndetectorintercept.m index f4997d2..bdb8a6b 100644 --- a/PHOTONS/fcndetectorintercept.m +++ b/PHOTONS/fcndetectorintercept.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [p2,dt] = fcndetectorintercept(input,p1,vel) %p1 is the vector origin, vel is the velocity vector %endPos is the vector intercept on the detector wall, dt is the time it took to get there diff --git a/PHOTONS/fcne2wl.m b/PHOTONS/fcne2wl.m index 658210d..4b00a14 100644 --- a/PHOTONS/fcne2wl.m +++ b/PHOTONS/fcne2wl.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function wl = fcne2wl(e,ir) %energy (MeV) c = 299792458; %m/s, speed of light planck = 4.13566751691E-15; %eV*s diff --git a/PHOTONS/fcngain2ratio.m b/PHOTONS/fcngain2ratio.m index 94456b4..94a3697 100644 --- a/PHOTONS/fcngain2ratio.m +++ b/PHOTONS/fcngain2ratio.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function ratio = fcngain2ratio(gain,type) %gain (dB) %ratio (amplitudeOut/amplitudeIn) diff --git a/PHOTONS/fcninsidedetector.m b/PHOTONS/fcninsidedetector.m index c61fa8b..f7428d9 100644 --- a/PHOTONS/fcninsidedetector.m +++ b/PHOTONS/fcninsidedetector.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function i = fcninsidedetector(x, input, ec) %x is nx3 particle position %ec is edge cut (optional) diff --git a/PHOTONS/fcnke2c.m b/PHOTONS/fcnke2c.m index d9ad90e..092f93e 100644 --- a/PHOTONS/fcnke2c.m +++ b/PHOTONS/fcnke2c.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function c = fcnke2c(ke,mass) % kE in MeV % mass in MeV diff --git a/PHOTONS/fcnphotondeconvolution.m b/PHOTONS/fcnphotondeconvolution.m index ea6dbf2..3e579bf 100644 --- a/PHOTONS/fcnphotondeconvolution.m +++ b/PHOTONS/fcnphotondeconvolution.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [V, QT] = fcnphotondeconvolution(input,flags,X) %signal = 1536x256 if isempty(X); V=X; QT=[]; return; end diff --git a/PHOTONS/fcnphotonsIC.m b/PHOTONS/fcnphotonsIC.m index 433fcdf..1ddc4ab 100644 --- a/PHOTONS/fcnphotonsIC.m +++ b/PHOTONS/fcnphotonsIC.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [P, G] = fcnphotonsIC(input, G, i) ncs = 4; %number of cherenkov segments (between GEANT points) % 1 photons.sourcePos diff --git a/PHOTONS/fcnphotontransport.m b/PHOTONS/fcnphotontransport.m index 3773bd7..2f84f9a 100644 --- a/PHOTONS/fcnphotontransport.m +++ b/PHOTONS/fcnphotontransport.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [photons, PE]= fcnphotontransport(input, P, G1, flags) %fprintf('Photons... '); startclock=clock; photons=[]; PE.n=0; photons.count=0; photons.sourceTime=0; photons.Gppid=0; photons.endID=0; photons.ancestor=0; diff --git a/PHOTONS/fcnratio2gain.m b/PHOTONS/fcnratio2gain.m index 42e87fa..dbcdc26 100644 --- a/PHOTONS/fcnratio2gain.m +++ b/PHOTONS/fcnratio2gain.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function gain = fcnratio2gain(ratio,type) %gain (dB) %ratio (amplitudeOut/amplitudeIn) diff --git a/PHOTONS/fcnsignalLoss2attenuationLength.m b/PHOTONS/fcnsignalLoss2attenuationLength.m index 6af8b91..b23bc7b 100644 --- a/PHOTONS/fcnsignalLoss2attenuationLength.m +++ b/PHOTONS/fcnsignalLoss2attenuationLength.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function al = fcnsignalLoss2attenuationLength(dBpm) %This function converts signal loss (dB/meter) into attenuation length (meters) %Example spectra to apply this function to on page 6 of PDF: http://www.crystals.saint-gobain.com/sites/imdf.crystals.com/files/documents/fiber-brochure.pdf diff --git a/PHOTONS/fcnwl2e.m b/PHOTONS/fcnwl2e.m index facba28..1b3246d 100644 --- a/PHOTONS/fcnwl2e.m +++ b/PHOTONS/fcnwl2e.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function e = fcnwl2e(wl,ir) %wavelength (nm), index of refraction c = 299792458; %m/s, speed of light planck = 4.13566751691E-15; %eV*s diff --git a/README.md b/README.md index bf44ca7..adaf731 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,74 @@ -
-Ultralytics logo +Ultralytics logo # 🌟 Introduction -Welcome to the official repository for the miniTimeCube (mTC) simulation and analysis code. This documentation is meant to guide you through the setup process, describe how to run simulations, and provide an overview of the analysis capabilities included in this project. Whether you are a physicist, a data scientist, or an enthusiast in the field of particle detection, you'll find the tools and information you need to work with the mTC. +Welcome to the official repository for the miniTimeCube (mTC) simulation and analysis code. This documentation guides you through the setup process, describes how to run simulations, and provides an overview of the analysis capabilities included in this project. Whether you are a physicist, a [data scientist](https://www.ultralytics.com/glossary/data-analytics), or an enthusiast in the field of particle detection, you'll find the tools and information needed to work with the mTC. -[![Ultralytics Actions](https://github.com/ultralytics/miniTimeCube/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/miniTimeCube/actions/workflows/format.yml) Discord Ultralytics Forums Ultralytics Reddit +[![Ultralytics Actions](https://github.com/ultralytics/miniTimeCube/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/miniTimeCube/actions/workflows/format.yml) +[![Ultralytics Discord](https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue)](https://discord.com/invite/ultralytics) +[![Ultralytics Forums](https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue)](https://community.ultralytics.com/) +[![Ultralytics Reddit](https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue)](https://reddit.com/r/ultralytics) -# 📚 Description +## 📚 Description -The miniTimeCube (mTC) is an innovative, compact neutrino detector designed as a part of a larger scientific endeavor to study and understand neutrino interactions. This repository, available at https://github.com/ultralytics/mtc, contains all the necessary simulation and analysis code related to the mTC project. +The miniTimeCube (mTC) is an innovative, compact neutrino detector designed as part of a larger scientific endeavor to study and understand neutrino interactions. This repository contains all the necessary simulation and analysis code related to the mTC project. -The scientific paper associated with this project is titled **"Invited Article: miniTimeCube"** and was authored by a team of respected researchers. It presents a deep dive into the design, operation, and capabilities of the mTC. You can access the full article for a comprehensive understanding [here](http://dx.doi.org/10.1063/1.4942243). +The scientific paper associated with this project, titled **"Invited Article: miniTimeCube,"** was authored by a team of respected researchers. It presents a deep dive into the design, operation, and capabilities of the mTC. You can access the full article for a comprehensive understanding via its [DOI link](http://dx.doi.org/10.1063/1.4942243). Understanding concepts like [object detection](https://docs.ultralytics.com/tasks/detect/) can be helpful when working with particle detection data.
mTC
-# 🛠 Requirements +## 🛠 Requirements To work with the miniTimeCube simulation and analysis code, you will need: -- **MATLAB** version 2018a or newer. MATLAB is a high-level language and interactive environment for numerical computation, visualization, and programming. If you do not have MATLAB installed, please visit the [official MATLAB website](https://www.mathworks.com/products/matlab.html). +- **MATLAB** version 2018a or newer. MATLAB is a high-level language and interactive environment for numerical computation, visualization, and programming. If you do not have MATLAB installed, please visit the [official MATLAB website](https://www.mathworks.com/products/matlab.html). Familiarity with [data visualization](https://www.ultralytics.com/glossary/data-visualization) techniques is also beneficial. In addition, please make sure to clone the common functions repository and add it to your MATLAB path: -```matlab -% Clone the functions-matlab repository -$ git clone https://github.com/ultralytics/functions-matlab +```bash +# Clone the functions-matlab repository using Git +git clone https://github.com/ultralytics/functions-matlab +``` +```matlab % Add the repository to the MATLAB path ->> addpath(genpath('/functions-matlab')) +addpath(genpath('/path/to/functions-matlab')) % Replace /path/to/ with the actual path ``` Ensure that the following toolboxes are installed in your MATLAB environment: -- **Statistics and Machine Learning Toolbox**: Provides functions and apps to describe, analyze, and model data using statistics and machine learning. -- **Signal Processing Toolbox**: Offers a variety of tools and algorithms for signal processing tasks. +- **Statistics and Machine Learning Toolbox**: Provides functions and apps to describe, analyze, and model data using statistics and [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml). +- **Signal Processing Toolbox**: Offers a variety of tools and algorithms for signal processing tasks, crucial for analyzing detector outputs. -# 🏃 Running the Code +## 🏃 Running the Code To execute the mTC simulation and analysis code within MATLAB, simply enter the following command in your MATLAB terminal: ```matlab % Launch the nView interface ->> nView +nView ``` -This command starts the `nView` interface, where you can interact with the simulation and analysis tools provided for the miniTimeCube. +This command starts the `nView` interface, where you can interact with the simulation and analysis tools provided for the miniTimeCube. For insights into optimizing performance, consider exploring resources on [real-time inference](https://www.ultralytics.com/glossary/real-time-inference). -# 🤝 Contribute +## 🤝 Contribute We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your input is invaluable. Take a look at our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started. Also, we'd love to hear about your experience with Ultralytics products. Please consider filling out our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A huge 🙏 and thank you to all of our contributors! - - - -Ultralytics open-source contributors +[![Ultralytics open-source contributors](https://raw.githubusercontent.com/ultralytics/assets/main/im/image-contributors.png)](https://github.com/ultralytics/ultralytics/graphs/contributors) -# ÂŠī¸ License +## ÂŠī¸ License -Ultralytics is excited to offer two different licensing options to meet your needs: +Ultralytics offers two licensing options to accommodate diverse needs: -- **AGPL-3.0 License**: Perfect for students and hobbyists, this [OSI-approved](https://opensource.org/license) open-source license encourages collaborative learning and knowledge sharing. Please refer to the [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) file for detailed terms. -- **Enterprise License**: Ideal for commercial use, this license allows for the integration of Ultralytics software and AI models into commercial products without the open-source requirements of AGPL-3.0. For use cases that involve commercial applications, please contact us via [Ultralytics Licensing](https://www.ultralytics.com/license). +- **AGPL-3.0 License**: Ideal for students and enthusiasts, this [OSI-approved](https://opensource.org/license/agpl-3-0/) open-source license promotes collaboration and knowledge sharing. See the [LICENSE](https://github.com/ultralytics/miniTimeCube/blob/main/LICENSE) file for details. +- **Enterprise License**: Designed for commercial use, this license permits seamless integration of Ultralytics software and AI models into commercial products and services. For commercial applications, please contact us via [Ultralytics Licensing](https://www.ultralytics.com/license). -# đŸ“Ŧ Contact Us +## đŸ“Ŧ Contact Us -For bug reports, feature requests, and contributions, head to [GitHub Issues](https://github.com/ultralytics/velocity/issues). For questions and discussions about this project and other Ultralytics endeavors, join us on [Discord](https://discord.com/invite/ultralytics)! +For bug reports, feature requests, and contributions, please visit [GitHub Issues](https://github.com/ultralytics/miniTimeCube/issues). For questions, discussions, and community support regarding this project and other Ultralytics initiatives, join our [Discord](https://discord.com/invite/ultralytics)!
diff --git a/SAVED/fcnsavefile.m b/SAVED/fcnsavefile.m index f2b46b7..6ea224c 100644 --- a/SAVED/fcnsavefile.m +++ b/SAVED/fcnsavefile.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnsavefile(input, flags, handles) %CREATE NAME FOR MAT FILE diff --git a/TSresults/fcnrunTS.m b/TSresults/fcnrunTS.m index 6475e95..90a7531 100644 --- a/TSresults/fcnrunTS.m +++ b/TSresults/fcnrunTS.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function filename=fcnrunTS(input,GEANT,handles,flags,nj) try closeallexcept(handles.GUI.figure1); flags.status.mtc=ischecked(handles.GUI.realdataflag); end %#ok diff --git a/TSresults/fcnrunTSCL.m b/TSresults/fcnrunTSCL.m index b52a832..6250ddf 100644 --- a/TSresults/fcnrunTSCL.m +++ b/TSresults/fcnrunTSCL.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function fcnrunTSCL() close all; clc; clear; evalin('base','close all; clc; clear'); %load M2.mat; input.MTC.A.x=[]; input.MTC.C=[]; diff --git a/TSresults/plotMTCNeutron.m b/TSresults/plotMTCNeutron.m index ab8896e..d38ab41 100644 --- a/TSresults/plotMTCNeutron.m +++ b/TSresults/plotMTCNeutron.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotMTCNeutron() clc; close(findobj(0,'type','figure')); file = uigetfile(); load(file); diff --git a/TSresults/plotNTCfiber.m b/TSresults/plotNTCfiber.m index 74897f3..47461a8 100644 --- a/TSresults/plotNTCfiber.m +++ b/TSresults/plotNTCfiber.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotNTCfiber(files) clc; clear; if nargin==0 diff --git a/TSresults/plotTSMTC.m b/TSresults/plotTSMTC.m index 7606aec..6789b98 100644 --- a/TSresults/plotTSMTC.m +++ b/TSresults/plotTSMTC.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotTSMTC() clc; close(findobj(0,'type','figure')); diff --git a/TSresults/plotTScontinuous.m b/TSresults/plotTScontinuous.m index 4669ac3..22cfcdd 100644 --- a/TSresults/plotTScontinuous.m +++ b/TSresults/plotTScontinuous.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotTScontinuous() clc; close(findobj(0,'type','figure')) diff --git a/TSresults/plotTSdiscrete.m b/TSresults/plotTSdiscrete.m index c8f18d4..c2e7faf 100644 --- a/TSresults/plotTSdiscrete.m +++ b/TSresults/plotTSdiscrete.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotTS(input,MC,tsv) close(findobj(0,'type','figure')) if nargin==0 diff --git a/TSresults/plotTSfiber.m b/TSresults/plotTSfiber.m index fca198c..9cfb2e6 100644 --- a/TSresults/plotTSfiber.m +++ b/TSresults/plotTSfiber.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotTSfiber() clc; %close(findobj(0,'type','figure')); diff --git a/TSresults/plotTSmuons.m b/TSresults/plotTSmuons.m index 580fb99..9f83955 100644 --- a/TSresults/plotTSmuons.m +++ b/TSresults/plotTSmuons.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = plotTSmuons() close(findobj(0,'type','figure')) if nargin==0 diff --git a/fcn1Event.m b/fcn1Event.m index e2dfc49..0ae7d1a 100644 --- a/fcn1Event.m +++ b/fcn1Event.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [input,output,G1,photons,PE,flags] = fcn1Event(input,flags,handles,G,V) photons.count = 0; G1 = []; diff --git a/fcninittables.m b/fcninittables.m index 3f99925..5421479 100644 --- a/fcninittables.m +++ b/fcninittables.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function input = fcninittables(input) input.cube.prettyname = regexprep(input.cube.MCPname,{'.mat','_'},{'',' '}); prettyname = regexprep(input.volumeFilename,{'.mat','_'},{'',' '}); diff --git a/fcnupdateAxes1.m b/fcnupdateAxes1.m index 8272174..4d063f3 100644 --- a/fcnupdateAxes1.m +++ b/fcnupdateAxes1.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [input,output,G1,photons,PE,flags,handles]=fcnupdateAxes1(input,output,GEANT,G1,photons,PE,flags,handles) if flags.update.edit1 %NEW EVENT diff --git a/fcnupdateAxes2.m b/fcnupdateAxes2.m index c9baaf6..dbb30c9 100644 --- a/fcnupdateAxes2.m +++ b/fcnupdateAxes2.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function fcnupdateAxes2(input,handles,G1,photons) h=handles.GUI.axes2; cla(h) diff --git a/initFlags.m b/initFlags.m index 2cc4a2f..cb5ad8a 100644 --- a/initFlags.m +++ b/initFlags.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + flags.update.pushbutton1=0; flags.update.pushbutton2=0; flags.update.edit1=1; diff --git a/nView.m b/nView.m index c58aea1..5d15f6f 100644 --- a/nView.m +++ b/nView.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + %INITIALIZATION FUNCTIONS ------------------------------------------------- function varargout = nView(varargin) % nView M-file for nView.fig diff --git a/nViewInit.m b/nViewInit.m index 3e9bfc7..413cf19 100644 --- a/nViewInit.m +++ b/nViewInit.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + %clc ha = handles.GUI.axes1; rng(1); diff --git a/play.m b/play.m index 9daed00..9fe1d32 100644 --- a/play.m +++ b/play.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + legend hide % %START PLAYBACK WHEN NEUTRINO ENTERS DETECTOR % input.plotTime = get(handles.GUI.slider1,'Value')*input.tMax.current; diff --git a/plotFunctions/GUIplotting/eventViewer.m b/plotFunctions/GUIplotting/eventViewer.m index 0e42246..d58f35c 100644 --- a/plotFunctions/GUIplotting/eventViewer.m +++ b/plotFunctions/GUIplotting/eventViewer.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function []=eventViewer(input,output) type = 'PMT'; meanflag = false; diff --git a/plotFunctions/GUIplotting/fcnPhotons.m b/plotFunctions/GUIplotting/fcnPhotons.m index b3cef56..8e94870 100644 --- a/plotFunctions/GUIplotting/fcnPhotons.m +++ b/plotFunctions/GUIplotting/fcnPhotons.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function x = fcnPhotons(input,handles,flags,photons,PE,G,i) v1 = find(photons.started & photons.Gppid==G.upid(i)); diff --git a/plotFunctions/GUIplotting/fcnResizeAxis.m b/plotFunctions/GUIplotting/fcnResizeAxis.m index 3833334..1e081e8 100644 --- a/plotFunctions/GUIplotting/fcnResizeAxis.m +++ b/plotFunctions/GUIplotting/fcnResizeAxis.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnResizeAxis(flags,handles,input,G1) h = handles.GUI.axes1; padding = [-1 1 -1 1 -1 1]*3; %(mm) extra empty border around event diff --git a/plotFunctions/GUIplotting/fcnUpdate1ParticleType.m b/plotFunctions/GUIplotting/fcnUpdate1ParticleType.m index 24a4f15..90b0187 100644 --- a/plotFunctions/GUIplotting/fcnUpdate1ParticleType.m +++ b/plotFunctions/GUIplotting/fcnUpdate1ParticleType.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function []=fcnUpdate1ParticleType(input, upidhandle, G, i) pid = G.upid(i); %particleid v0 = G.t1 diff --git a/plotFunctions/fcnPlotPhotonEmissionTimes.m b/plotFunctions/fcnPlotPhotonEmissionTimes.m index f3c7ddf..0926089 100644 --- a/plotFunctions/fcnPlotPhotonEmissionTimes.m +++ b/plotFunctions/fcnPlotPhotonEmissionTimes.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function h = fcnPlotPhotonEmissionTimes(input,output,photons,PE,handles,G1) MTCflag = ischecked(handles.GUI.realdataflag); if MTCflag diff --git a/plotFunctions/fcnPlotSmearedExponentialTable.m b/plotFunctions/fcnPlotSmearedExponentialTable.m index 5885590..d6f7113 100644 --- a/plotFunctions/fcnPlotSmearedExponentialTable.m +++ b/plotFunctions/fcnPlotSmearedExponentialTable.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function fcnPlotSmearedExponentialTable(input) fig(1,1,'15cm'); a = input.table.smearExp; diff --git a/plotFunctions/fcnPlotWavelengthDepDist.m b/plotFunctions/fcnPlotWavelengthDepDist.m index 6cfe172..25c9f72 100644 --- a/plotFunctions/fcnPlotWavelengthDepDist.m +++ b/plotFunctions/fcnPlotWavelengthDepDist.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnPlotWavelengthDepDist(input) %Plots wavelength dependent distributions ha = fig(2,3); diff --git a/plotFunctions/fcnplotdetectorprojection.m b/plotFunctions/fcnplotdetectorprojection.m index 44b0333..e0fe35a 100644 --- a/plotFunctions/fcnplotdetectorprojection.m +++ b/plotFunctions/fcnplotdetectorprojection.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function fcnplotdetectorprojection(input,iap,fxva,p0,proj,label) if ~exist('iap','var') || isempty(iap); iap = 1:input.cube.pixels; end %iap = indices of active pixels if ~exist('fxva','var') || isempty(fxva); fxva = ones(size(iap))*100; end %fxva = values of pixels diff --git a/prepareRCDF.m b/prepareRCDF.m index 9efcddd..5f83240 100644 --- a/prepareRCDF.m +++ b/prepareRCDF.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function xa=prepareRCDF(x,c) %(x,cdf) %this function prepares a cdf for random value lookup by randcdfc.cpp %example: fig; fcnhist(randcdfc(xa,5E4),100); diff --git a/tests/2D Cost Function Plots/fcnplot2DCF.m b/tests/2D Cost Function Plots/fcnplot2DCF.m index 24edd42..e09e9c0 100644 --- a/tests/2D Cost Function Plots/fcnplot2DCF.m +++ b/tests/2D Cost Function Plots/fcnplot2DCF.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnplot2DCF(input,output,handles,photons,G1) if output(1).Nsum<19 || output(1).Nsum>1E4; return; end; closeallexcept(handles.GUI.figure1); diff --git a/tests/NTC/FiberLAPPD.m b/tests/NTC/FiberLAPPD.m index bbb98ca..d409acc 100644 --- a/tests/NTC/FiberLAPPD.m +++ b/tests/NTC/FiberLAPPD.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = FiberLAPPD(input,output,handles,PE,flags,plotflag) if plotflag; closeallexcept(handles.GUI.figure1); deleteh(findobj(handles.GUI.figure1,'DisplayName','test')); end A=output(1).D; diff --git a/tests/NTC/fcnNeutronExits.m b/tests/NTC/fcnNeutronExits.m index 209c925..9ff40a1 100644 --- a/tests/NTC/fcnNeutronExits.m +++ b/tests/NTC/fcnNeutronExits.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = fcnNeutronExits(input,output,flags,PE,G1,handles,plotFlag) %x=[G1.p1inside G1.p2inside G1.parentinside]; i=find(G1.p1inside & G1.parentinside & G1.tid==1,1,'last'); diff --git a/tests/NTC/fcndisambiguate.m b/tests/NTC/fcndisambiguate.m index c11246f..b018e6a 100644 --- a/tests/NTC/fcndisambiguate.m +++ b/tests/NTC/fcndisambiguate.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function results = fcndisambiguate(input,output,handles,PE,flags,plotflag) if plotflag; closeallexcept(handles.GUI.figure1); deleteh(findobj(handles.GUI.figure1,'DisplayName','test')); end A=output(1).D; diff --git a/tests/Plutonium Simulation/Roadside WGP/fcntestranges.m b/tests/Plutonium Simulation/Roadside WGP/fcntestranges.m index 46c16cc..a3e39f4 100644 --- a/tests/Plutonium Simulation/Roadside WGP/fcntestranges.m +++ b/tests/Plutonium Simulation/Roadside WGP/fcntestranges.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcntestranges() clc diff --git a/tests/Plutonium Simulation/fcnML123.m b/tests/Plutonium Simulation/fcnML123.m index 92ccb91..70a0f47 100644 --- a/tests/Plutonium Simulation/fcnML123.m +++ b/tests/Plutonium Simulation/fcnML123.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [newHandles, MC, d] = fcnML123(input,handles,flags,d,table) newHandles = []; MC = []; %flags.status.CRLB=1; if input.dValid.count<1 || (flags.status.ML1==0 && flags.status.ML2==0 && flags.status.ML3==0) diff --git a/tests/Plutonium Simulation/fcnPuflux.m b/tests/Plutonium Simulation/fcnPuflux.m index b3930c6..3c48c75 100644 --- a/tests/Plutonium Simulation/fcnPuflux.m +++ b/tests/Plutonium Simulation/fcnPuflux.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [Bi, Si, Ci, Cisb] = fcnPuflux() t = 60; % (s) n = 61000; % (n/s/kgWGP) Luminosity Weapons Grade Plutonium WGP = 6% Pu240, 94% Pu239 diff --git a/tests/Plutonium Simulation/fcnfindplutonium2.m b/tests/Plutonium Simulation/fcnfindplutonium2.m index d0524d7..1599eb3 100644 --- a/tests/Plutonium Simulation/fcnfindplutonium2.m +++ b/tests/Plutonium Simulation/fcnfindplutonium2.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnfindplutonium2() clc; close all %http://www-pub.iaea.org/MTCD/publications/PDF/P1433_CD/datasets/abstracts/sm_en-20.html diff --git a/tests/Reactor Simulation/Gammas/getGammaTransInLead.m b/tests/Reactor Simulation/Gammas/getGammaTransInLead.m index 6cc07b8..c84489d 100644 --- a/tests/Reactor Simulation/Gammas/getGammaTransInLead.m +++ b/tests/Reactor Simulation/Gammas/getGammaTransInLead.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + %Function taken from the NIST website: %http://physics.nist.gov/cgi-bin/Xcom/xcom2 %Determining the throughput of gammas in lead. diff --git a/tests/Reactor Simulation/Gammas/plotgammaspectrum.m b/tests/Reactor Simulation/Gammas/plotgammaspectrum.m index f48ca32..89c1331 100644 --- a/tests/Reactor Simulation/Gammas/plotgammaspectrum.m +++ b/tests/Reactor Simulation/Gammas/plotgammaspectrum.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + clc; clear; close all load gamma.mat MWth=20; diff --git a/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m b/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m index a4394bc..c048cf7 100644 --- a/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m +++ b/tests/Reactor Simulation/Neutrons/neutron sheilding/attenuationLengths.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [ output_args ] = attenuationLengths( input_args ) %Polyethelyne (C25-H42-N2-O6, 1.05g/cm^3) shielding tables from %http://www.ncnr.nist.gov/instruments/bt1/neutron.html diff --git a/tests/Reactor Simulation/Neutrons/neutron sheilding/eV_to_Angstroms.m b/tests/Reactor Simulation/Neutrons/neutron sheilding/eV_to_Angstroms.m index 75f342c..de900b3 100644 --- a/tests/Reactor Simulation/Neutrons/neutron sheilding/eV_to_Angstroms.m +++ b/tests/Reactor Simulation/Neutrons/neutron sheilding/eV_to_Angstroms.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + %Function for calculating the DeBroglie wavelength of a neutron of know Kinetic Energy %for use in...http://www.ncnr.nist.gov/instruments/bt1/neutron.html in diff --git a/tests/Reactor Simulation/Neutrons/plotneutronspectrum.m b/tests/Reactor Simulation/Neutrons/plotneutronspectrum.m index e9415c0..200048e 100644 --- a/tests/Reactor Simulation/Neutrons/plotneutronspectrum.m +++ b/tests/Reactor Simulation/Neutrons/plotneutronspectrum.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + clc; clear all; close all load Goldhagenneutron.mat diff --git a/tests/Reactor Simulation/fcnReactorCollection.m b/tests/Reactor Simulation/fcnReactorCollection.m index 053b114..3a788d6 100644 --- a/tests/Reactor Simulation/fcnReactorCollection.m +++ b/tests/Reactor Simulation/fcnReactorCollection.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function []=fcnReactorCollection() clc; clear; close all; tic t = 60*60*24; %s diff --git a/tests/Reactor Simulation/fcnenergydistributions.m b/tests/Reactor Simulation/fcnenergydistributions.m index 5c25ab0..e1b115b 100644 --- a/tests/Reactor Simulation/fcnenergydistributions.m +++ b/tests/Reactor Simulation/fcnenergydistributions.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function spectra = fcnenergydistributions() plotflag=0; ls = cell(4,1); diff --git a/tests/Reactor Simulation/fcngetobservedspectra.m b/tests/Reactor Simulation/fcngetobservedspectra.m index 304143a..31be410 100644 --- a/tests/Reactor Simulation/fcngetobservedspectra.m +++ b/tests/Reactor Simulation/fcngetobservedspectra.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function s = fcngetobservedspectra(shield,plotflag) if nargin==1; plotflag=1; end close all diff --git a/tests/Scintillator Decay/fcnRun.m b/tests/Scintillator Decay/fcnRun.m index 7f9d9cc..0e92cfb 100644 --- a/tests/Scintillator Decay/fcnRun.m +++ b/tests/Scintillator Decay/fcnRun.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnRun(input) clc; close all % a=find(any(input.MTC.C{1,2},2)); %1089 diff --git a/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics1channel.m b/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics1channel.m index a109814..df04137 100644 --- a/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics1channel.m +++ b/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics1channel.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcngetnoisestatistics() clc; close all h=fig(5,1,4,.5); diff --git a/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics3channels.m b/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics3channels.m index 066fa3d..012312c 100644 --- a/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics3channels.m +++ b/tests/Wiener Deconvolution/Luca Noise/fcngetnoisestatistics3channels.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [ output_args ] = fcngetnoisestatistics3channels() clc; close all h=fig(2,3,1,1); diff --git a/tests/Wiener Deconvolution/fcndeconvolve.m b/tests/Wiener Deconvolution/fcndeconvolve.m index 7f02c13..8c63de4 100644 --- a/tests/Wiener Deconvolution/fcndeconvolve.m +++ b/tests/Wiener Deconvolution/fcndeconvolve.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function fcndeconvolve(input,output,flags) clc; close; pmt = input.cube.pmt; dsp = input.cube.dsp; diff --git a/tests/backprojection/fcnTriangulate.m b/tests/backprojection/fcnTriangulate.m index 166b982..8e5c31a 100644 --- a/tests/backprojection/fcnTriangulate.m +++ b/tests/backprojection/fcnTriangulate.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [voxels, error, handlesOut] = fcnTriangulate(input,output,handles,photons) error.flags = [output(1).Nsum<10 output(2).Nsum<3 0]; %last flag is fminsearch 'exitflag' handlesOut = []; diff --git a/tests/backprojection/rundeconvolution.m b/tests/backprojection/rundeconvolution.m index 38367eb..80bf06e 100644 --- a/tests/backprojection/rundeconvolution.m +++ b/tests/backprojection/rundeconvolution.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + clc close all diff --git a/tests/backprojection/simpleBackprojectionExample.m b/tests/backprojection/simpleBackprojectionExample.m index 0b1c2f4..88eb897 100644 --- a/tests/backprojection/simpleBackprojectionExample.m +++ b/tests/backprojection/simpleBackprojectionExample.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = simpleBackprojectionExample() clc; close all; clear; reset(RandStream.getGlobalStream) diff --git a/tests/gamma/fcnGammaAngles.m b/tests/gamma/fcnGammaAngles.m index bff9311..f5cebca 100644 --- a/tests/gamma/fcnGammaAngles.m +++ b/tests/gamma/fcnGammaAngles.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcnGammaAngles(input,flags,handles,GEANT,G1) clc %fig; plot(theta*r2d,de,'.','markersize',25) diff --git a/tests/neutronStats/neutronpdf.m b/tests/neutronStats/neutronpdf.m index 0de4c85..2983e4f 100644 --- a/tests/neutronStats/neutronpdf.m +++ b/tests/neutronStats/neutronpdf.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function neutronpdf(input,flags,handles,GEANT) clc; tic r2d = 180/pi; diff --git a/tests/neutronStats/neutronpdfplots.m b/tests/neutronStats/neutronpdfplots.m index 1f489c1..795b13a 100644 --- a/tests/neutronStats/neutronpdfplots.m +++ b/tests/neutronStats/neutronpdfplots.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function neutronpdfplots(input,G1,handles,x,xcapture) mnp = 3; %min number of photons nb = 2; %size(x,3); %number of bounces diff --git a/tests/prompt-delayed time coincidences/testCoincidences.m b/tests/prompt-delayed time coincidences/testCoincidences.m index 2da945a..e3d2444 100644 --- a/tests/prompt-delayed time coincidences/testCoincidences.m +++ b/tests/prompt-delayed time coincidences/testCoincidences.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + clc; clear all; close all tic ns = 60*60*1; %number of seconds diff --git a/tests/reflection/fcntestreflections.m b/tests/reflection/fcntestreflections.m index 5a4134f..9802e81 100644 --- a/tests/reflection/fcntestreflections.m +++ b/tests/reflection/fcntestreflections.m @@ -1,3 +1,5 @@ +% Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license + function [] = fcntestreflections(input,output,handles,G1,photons) clc; close all ha = fig(1,2,2.5,2); sca(ha(1));