Add verification binary parametrization
Verification binaries are common (and certain) LISA sources. A catalog is available at https://gitlab.in2p3.fr/LISA/lisa-verification-binaries.
We should allow the user to use verification binary parametrization. There is a simple map between these parameters and the traditional parametrization used in GalacticBinary
.
def compute_gb(lG, bG, P, m1, m2, DL, logger):
"""Convert galactic binary parameter into LDC conventions.
Args:
lG, bG: galactic coordinates
P: period
m1, m2: in solar mass
DL: distance in pc
Returns:
bE, lE: ecliptic coordinates
fGW: frequency
Amp: amplitude
dfodt: frequency derivative
>>> bE, lE, fGW, Amp, dfodt = compute_gb(328.5, 53.1, 943.8, 0.8, 0.1, 1317)
"""
logger.debug(f"lG = {lG}, bG = {bG}, P = {P}, m1 = {m1}, m2 = {m2}, DL = {DL}")
xg = SkyCoord(lG, bG, unit='deg', frame='galactic')
xe = xg.transform_to(BarycentricTrueEcliptic())
bE = xe.lat.rad
lE = xe.lon.rad
M = (m1+m2) * MT_SUN
eta = m1*m2 / (m1+m2)**2
Mc = M * eta**(3./5.)
DLs = DL*pc/c
fGW = 2. / P
Amp = 2 * (M**(5./3.) * eta/DLs) * (np.pi*fGW)**(2./3.)
dfodt = (96./5.) * Mc**(5./3.) * np.pi**(8./3.) * fGW**(11./3.)
return bE, lE, fGW, Amp, dfodt
Two solutions:
- Create a subclass of
GalacticBinary
that override the init method to take the verification binary parametrization as arguments (Galactic coordinates, period, masses, separation) - Add a class method to
GalacticBinary
that takes the verification binary parametrization as arguments (Galactic coordinates, period, masses, separation) and initializes aGalacticBinary
instance by converting these parameters