All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.profi.mzdb.util.ms.MsUtils Maven / Gradle / Ivy

There is a newer version: 0.0.27
Show newest version
package fr.profi.mzdb.util.ms;

public class MsUtils {

    /** The proton mass. */
    public static double protonMass = 1.007276466812;

    /**
     * 
     * @param mz
     * @param errorInPPM
     * @return
     */
    public static double ppmToDa(double mz, double errorInPPM) {
	return mz * errorInPPM / 1e6;
    }

    /**
     * 
     * @param mz
     * @param d
     * @return
     */
    public static double DaToPPM(double mz, double d) {
	return d * 1e6 / mz;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy