Skip to content

Optimize the evaluation of beam pattern functions

Soichiro Morisaki requested to merge soichiro/bilby:faster_beam_pattern into master

This MR is to speed up the evaluation of beam pattern functions, which partially eases #576 (closed), but does not solve it fully as the speed-up gain is not large enough.

This MR

  1. reduces the number of computations of cosine and sine by storing their values at the first stage of computations, and
  2. enables ifo.antenna_pattern to compute the beam patterns for plus and cross simultaneously so that the vectors u, v, m and n in bilby.gw.utils.get_polarization_tensor do not need to be calculated twice.

I found that this change speeds up the evaluations of plus and cross beam patterns by a factor of ~1.5.

Edited by Soichiro Morisaki

Merge request reports

Loading