dust.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:sbpy 作者: mommermi 项目源码 文件源码
def to_phase(self, to_phase, from_phase, Phi=None):
        """Scale Af? to another phase angle.

        Parameters
        ----------
        to_phase : `~astropy.units.Quantity`
          New target phase angle.

        from_phase : `~astropy.units.Quantity`
          Current target phase angle.

        Phi : callable or `None`
          Phase function, a callable object that takes a single
          parameter, phase angle as a `~astropy.units.Quantity`, and
          returns a scale factor.  If `None`, `phase_HalleyMarcus` is
          used.  The phase function is expected to be 1.0 at 0 deg.


        Returns
        -------
        afrho : `~Afrho`
          The scaled Af? quantity.


        Examples
        --------
        >>> from sbpy.activity import Afrho
        >>> afrho = Afrho(10 * u.cm).to_phase(15 * u.deg, 0 * u.deg)
        >>> afrho.cm                                     # doctest: +FLOAT_CMP
        5.87201

        """

        if Phi is None:
            Phi = phase_HalleyMarcus

        return self * Phi(to_phase) / Phi(from_phase)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号