public static void CleanETD(List<IRange<double>> rangesToRemove, double precursorMass, int precursorZ, double lowWindow, double highWindow)
{
int sign = Math.Sign(precursorZ);
for (int z = sign; sign*z < sign*precursorZ; z += sign)
{
double lowMZ = Mass.MzFromMass(precursorMass - lowWindow, z);
double highMZ = Mass.MzFromMass(precursorMass + highWindow, z);
rangesToRemove.Add(new MzRange(lowMZ, highMZ));
}
}