def adjustHue(self, MshSat, Munsat):
        """
        Function to provide an adjusted hue when interpolating to an
        unsaturated color in Msh space.
        """

        # unpack the saturated Msh-array
        Msat, ssat, hsat = MshSat.tolist()

        if Msat >= Munsat:
            return hsat
        else:
            hSpin = ssat * np.sqrt(Munsat**2 - Msat**2) / \
                    (Msat * np.sin(ssat))
            if hsat > -np.pi/3:
                return hsat + hSpin
            else:
                return hsat - hSpin
    #-
dataset/ETHPy150Open ethankruse/kepler_orrery/diverging_map.py/ColorMapCreator.adjustHue/original