diff --git a/BecquerelMonitor/BecquerelMonitor.csproj b/BecquerelMonitor/BecquerelMonitor.csproj index 9a2ec49..7d536ae 100644 --- a/BecquerelMonitor/BecquerelMonitor.csproj +++ b/BecquerelMonitor/BecquerelMonitor.csproj @@ -35,8 +35,8 @@ 2022.07.08.7 true index.html - 6 - 2024.04.24.6 + 1 + 2024.04.25.1 true true true diff --git a/BecquerelMonitor/Properties/AssemblyInfo.cs b/BecquerelMonitor/Properties/AssemblyInfo.cs index 11607d2..a5aa23b 100644 --- a/BecquerelMonitor/Properties/AssemblyInfo.cs +++ b/BecquerelMonitor/Properties/AssemblyInfo.cs @@ -4,13 +4,13 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyVersion("2024.04.24.6")] +[assembly: AssemblyVersion("2024.04.25.1")] [assembly: AssemblyProduct("BecquerelMonitor")] [assembly: AssemblyCopyright("free")] [assembly: AssemblyTrademark("none")] [assembly: AssemblyConfiguration("")] [assembly: Guid("40110b38-4882-47c1-ad94-a71e58dcb5f8")] -[assembly: AssemblyFileVersion("2024.04.24.6")] +[assembly: AssemblyFileVersion("2024.04.25.1")] [assembly: AssemblyDescription("")] [assembly: AssemblyCompany("free")] [assembly: CompilationRelaxations(8)] diff --git a/BecquerelMonitor/Utils/SpectrumAriphmetics.cs b/BecquerelMonitor/Utils/SpectrumAriphmetics.cs index f6a0d63..67bc1c3 100644 --- a/BecquerelMonitor/Utils/SpectrumAriphmetics.cs +++ b/BecquerelMonitor/Utils/SpectrumAriphmetics.cs @@ -48,7 +48,12 @@ public int FindCentroid(EnergySpectrum energySpectrum, int centroid, int low_bou } } - int poly_order = 18; + int poly_order = 16; + if (energySpectrum.NumberOfChannels <= 1024) + { + poly_order = 8; + } + if (high_boundary - low_boundary < poly_order) { poly_order = high_boundary - low_boundary;