forked from PNNL-Comp-Mass-Spec/MASIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clsCustomMZSearchSpec.cs
53 lines (47 loc) · 1.69 KB
/
clsCustomMZSearchSpec.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
namespace MASIC
{
/// <summary>
/// Metadata for creating a selected ion chromatogram of a custom m/z value
/// </summary>
public class clsCustomMZSearchSpec
{
/// <summary>
/// m/z to find
/// </summary>
public double MZ { get; set; }
/// <summary>
/// If 0, uses the global search tolerance defined
/// </summary>
public double MZToleranceDa { get; set; }
/// <summary>
/// This is an Integer if ScanType = CustomSICScanTypeConstants.Absolute
/// It is a Single if ScanType = .Relative or ScanType = .AcquisitionTime
/// </summary>
public float ScanOrAcqTimeCenter { get; set; }
/// <summary>
/// This is an Integer if ScanType = CustomSICScanTypeConstants.Absolute
/// It is a Single if ScanType = .Relative or ScanType = .AcquisitionTime
/// </summary>
/// <remarks>Set to 0 to search the entire file for the given mass</remarks>
public float ScanOrAcqTimeTolerance { get; set; }
/// <summary>
/// Description of the custom m/z value
/// </summary>
public string Comment { get; set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="targetMz"></param>
public clsCustomMZSearchSpec(double targetMz)
{
MZ = targetMz;
}
/// <summary>
/// Show the m/z value and search tolerance
/// </summary>
public override string ToString()
{
return "m/z: " + MZ.ToString("0.0000") + " ±" + MZToleranceDa.ToString("0.0000");
}
}
}