use of net.sf.mzmine.datamodel.IonizationType in project mzmine2 by mzmine.
the class MzRangeFormulaCalculatorModule method getMzRangeFromFormula.
@Nullable
public static Range<Double> getMzRangeFromFormula(ParameterSet myParameters) {
String formula = myParameters.getParameter(MzRangeFormulaCalculatorParameters.formula).getValue().trim();
IonizationType ionType = myParameters.getParameter(MzRangeFormulaCalculatorParameters.ionType).getValue();
MZTolerance mzTolerance = myParameters.getParameter(MzRangeFormulaCalculatorParameters.mzTolerance).getValue();
Integer charge = myParameters.getParameter(MzRangeFormulaCalculatorParameters.charge).getValue();
return getMzRangeFromFormula(formula, ionType, mzTolerance, charge);
}
use of net.sf.mzmine.datamodel.IonizationType in project mzmine2 by mzmine.
the class NeutralMassComponent method updateNeutralMass.
private void updateNeutralMass() {
Integer charge = getCharge();
if (charge == null)
return;
Double ionMass = getIonMass();
if (ionMass == null)
return;
IonizationType ionType = getIonType();
double neutral = (ionMass.doubleValue() - ionType.getAddedMass()) * charge.intValue();
neutralMassField.setText(MZmineCore.getConfiguration().getMZFormat().format(neutral));
}
Aggregations