private bool IsVisibleIon(MatchedFragmentIon mfi) { // Show precursor ions when they are supposed to be shown, regardless of charge // N.B. for fragments, we look at abs value of charge. CONSIDER(bspratt): for small mol libs we may want finer per-adduct control return(mfi.Ordinal > 0 && ShowTypes.Contains(mfi.IonType) && (mfi.IonType == IonType.precursor || ShowCharges.Contains(Math.Abs(mfi.Charge.AdductCharge)))); }
private bool IsVisibleIon(IonType type, int ordinal, int charge) { // Show precursor ions when they are supposed to be shown, regardless of charge return(ordinal > 0 && ShowTypes.Contains(type) && (type == IonType.precursor || ShowCharges.Contains(charge))); }