Admin message

Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 17 March 2026 starting at approximately 1200 EDT (1600 UTC). It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk.

Evaluating beam pattern functions is >10 times slower than LAL

Evaluating beam pattern functions is >10 times slower than LAL, which is one of the bottlenecks for low-latency analysis.

Script:

import numpy as np
import time
import bilby
import lal
import lalsimulation

ifos = bilby.gw.detector.InterferometerList(["L1"])
ifo = ifos[0]
gpstime = 1305303144
trial = 100

ts_bilby, ts_lal = [], []
for i in range(trial):
    ra, dec, psi = 2. * np.pi * np.random.uniform(), np.pi * np.random.uniform() - np.pi / 2., np.pi * np.random.uniform()
    # measure bilby's run time
    s = time.time()
    fplus, fcross = ifo.antenna_response(ra, dec, gpstime, psi, "plus"), ifo.antenna_response(ra, dec, gpstime, psi, "cross")
    e = time.time()
    ts_bilby.append(e - s)
    # measure lal's run time
    s = time.time()
    gmst = lal.GreenwichMeanSiderealTime(gpstime)
    fplus, fcross = lal.ComputeDetAMResponse(
        lalsimulation.DetectorPrefixToLALDetector("L1").response, ra, dec, psi, gmst)
    e = time.time()
    ts_lal.append(e - s)


print("Bilby's method takes {} seconds.".format(np.mean(ts_bilby)))
print("LAL's method takes {} seconds.".format(np.mean(ts_lal)))

Output:

Bilby's method takes 6.371736526489258e-05 seconds.
LAL's method takes 4.072189331054687e-06 seconds.
Edited May 17, 2021 by Soichiro Morisaki
Assignee Loading
Time tracking Loading