def simpleSubtractDictionaries(d1,d2):
        """
        Subtract the elements of the second dictionary from the ones in the first dictionary. Assumes both share the same keys.
        """
        assert set(d1.keys()) == set(d2.keys())
        return  dict([ (key, d1[key]-d2[key]) for key in d1])