|
| 1 | + |
| 2 | +r"""Binary merger rate module. |
| 3 | +This module provides functions to calculate compact binary merger rates |
| 4 | +for individual galaxies. |
| 5 | +
|
| 6 | +""" |
| 7 | + |
| 8 | +from astropy import constants, units |
| 9 | + |
| 10 | + |
| 11 | +__all__ = [ |
| 12 | + 'b_band_merger_rate', |
| 13 | +] |
| 14 | + |
| 15 | + |
| 16 | +abadie_table_III = { |
| 17 | + 'NS-NS': { |
| 18 | + 'low': 0.6, |
| 19 | + 'realistic': 60, |
| 20 | + 'high': 600, |
| 21 | + 'max': 2000}, |
| 22 | + 'NS-BH': { |
| 23 | + 'low': 0.03, |
| 24 | + 'realistic': 2, |
| 25 | + 'high': 60}, |
| 26 | + 'BH-BH': { |
| 27 | + 'low': 0.006, |
| 28 | + 'realistic': 0.2, |
| 29 | + 'high': 20} |
| 30 | +} |
| 31 | + |
| 32 | + |
| 33 | +def b_band_merger_rate(luminosity, |
| 34 | + population='NS-NS', |
| 35 | + optimism='low'): |
| 36 | + |
| 37 | + r"""Model of Abadie et al (2010), Table III |
| 38 | +
|
| 39 | + Compact binary merger rates as a linear function of a galaxies |
| 40 | + B-band luminosity. |
| 41 | +
|
| 42 | + Parameters |
| 43 | + ---------- |
| 44 | + luminosity : (ngal,) array-like |
| 45 | + The B-band luminosity of the galaxies to generate merger |
| 46 | + rates for, in units of solar luminosity. |
| 47 | + population : {'NS-NS', 'NS-BH', 'BH-BH'} |
| 48 | + Compact binary population to get rate for. |
| 49 | + 'NS-NS' is neutron star - neutron star |
| 50 | + 'NS-BH' is neutron star - black hole |
| 51 | + 'BH-BH' is black hole - black hole |
| 52 | + optimism : {'low', 'realistic', 'high'} |
| 53 | + Optimism of predicted merger rates. |
| 54 | + For 'NS-NS' there is an extra option 'max'. |
| 55 | +
|
| 56 | + Returns |
| 57 | + ------- |
| 58 | + merger_rate : array_like |
| 59 | + Merger rates for the galaxies in units of year^-1 |
| 60 | +
|
| 61 | + Notes |
| 62 | + ----- |
| 63 | +
|
| 64 | + References |
| 65 | + ---------- |
| 66 | + .. Abadie et al. 2010, Classical and Quantum Gravity, |
| 67 | + Volume 27, Issue 17, article id. 173001 (2010) |
| 68 | + https://arxiv.org/abs/1003.2480 |
| 69 | +
|
| 70 | + Examples |
| 71 | + -------- |
| 72 | + >>> import numpy as np |
| 73 | + >>> from skypy.gravitational_waves import b_band_merger_rate |
| 74 | +
|
| 75 | + Sample 100 luminosity values near absolute magnitude -20.5. |
| 76 | +
|
| 77 | + >>> luminosities = 10.**(-0.4*(-20.5 + np.random.randn(100))) |
| 78 | +
|
| 79 | + Generate merger rates for these luminosities. |
| 80 | +
|
| 81 | + >>> rates = b_band_merger_rate(luminosities, |
| 82 | + ... population='NS-NS', |
| 83 | + ... optimism='low') |
| 84 | +
|
| 85 | + """ |
| 86 | + |
| 87 | + # Convert luminosity to units of L_10 defined in Abadie et. al. 2010 |
| 88 | + L_10 = luminosity * constants.L_sun.to_value('erg/s') / (1e10 * 2.16e33) |
| 89 | + return abadie_table_III[population][optimism] * L_10 / units.year |
0 commit comments