def center_of_mass( df ):
    """
    Retuns a Pandas Series of the center of mass for the spectra.

    :param df: DataFrame to calaculate the center of mass on.
    :returns: Pandas Series of center of masses.
    """
    idx = df.index
    weights = df/ df.sum()
    com = weights.multiply( idx, axis = 0 ).sum()
    return com