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)
评论列表
文章目录