Post

FileReader.SetFilter

Sets the MS levels to read.


Remarks

The new filter applies from the next read, to the file already open and to any file opened later.


Syntax

SyntaxDescription
SetFilter(MSFilter filter)Sets the MS levels to read, for this reader and any file it has open.

Parameters

NameTypeDescription
filterMSFilterThe MS levels to read.

Example

1
2
3
4
5
6
7
8
9
10
using Nova.Data;
using Nova.Io.Read;

FileReader reader = new FileReader("DDA.raw", MSFilter.MS1);
int ms1 = 0;
foreach (Spectrum spectrum in reader) ms1++;

reader.SetFilter(MSFilter.MS2 | MSFilter.MS3);
int msn = 0;
foreach (Spectrum spectrum in reader) msn++;
This post is licensed under CC BY 4.0 by the author.

Trending Tags