Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions InstrumentControl/CommandLineOptions/CommandLineParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InstrumentControl.CommandLineOptions
{
public static class CommandLineParser
{

}
}
34 changes: 34 additions & 0 deletions InstrumentControl/CommandLineOptions/CommonOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommandLine;

namespace InstrumentControl.CommandLineOptions
{
public class CommonOptions
{

}
public class SpectrumAveragerOptions : CommonOptions
{
[Option(Default = (string)"NoRejection")]
public string? RejectionType { get; set; }
[Option(Default = (string)"NoWeight")]
public string? WeightingType { get; set; }
[Option(Default = (string)"SpectrumBinning")]
public string? SpectrumMergeType { get; set; }
[Option(Default = (double)0.9)]
public double Percentile { get; set; }
[Option(Default = (double)1.3)]
public double MinSigmaValue { get; set; }
[Option(Default = (double)1.3)]
public double MaxSigmaValue { get; set; }
[Option(Default = (double)0.02)]
public double BinSize { get; set; }

}


}
1 change: 1 addition & 0 deletions InstrumentControl/InstrumentControl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="mzLib" Version="1.0.529" />
<PackageReference Include="System.Resources.Extensions" Version="6.0.0" />
</ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions InstrumentControl/Tasks/InstrumentControlTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using CommandLine;
namespace InstrumentControl
{
public abstract class InstrumentControlTask
Expand All @@ -26,7 +26,6 @@ public void Run()
Console.WriteLine("Executed {0} Task in {1} ms", TaskType, watch.ElapsedMilliseconds);
}

public abstract void RunSpecific();

public virtual void RunSpecific() { }
}
}
1 change: 1 addition & 0 deletions InstrumentControl/Tasks/SpectrumAveragingTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using InstrumentControl.CommandLineOptions;

namespace InstrumentControl
{
Expand Down