From e05c1416941897bc6b1d5f454557806b83c0099d Mon Sep 17 00:00:00 2001
From: Shaon Ghosh <shaon.ghosh@ligo.org>
Date: Wed, 20 Feb 2019 16:35:02 -0600
Subject: [PATCH] Add MassGap classification

---
 _static/MS181101ab-1-Preliminary.xml | 13 ++++++----
 _static/MS181101ab-2-Initial.xml     | 13 ++++++----
 _static/MS181101ab-3-Update.xml      | 13 ++++++----
 changes.rst                          |  2 ++
 content.rst                          | 37 +++++++++++++++++++---------
 glossary.rst                         |  5 ++++
 procedures/inference.rst             |  3 ++-
 tutorial/receiving.rst               |  1 +
 8 files changed, 59 insertions(+), 28 deletions(-)

diff --git a/_static/MS181101ab-1-Preliminary.xml b/_static/MS181101ab-1-Preliminary.xml
index 5e90eb7d..b4ada9d8 100644
--- a/_static/MS181101ab-1-Preliminary.xml
+++ b/_static/MS181101ab-1-Preliminary.xml
@@ -54,16 +54,19 @@ xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml
         </Group>
         <Group type="Classification">
             <Description>
-                Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), or terrestrial (noise)
+                Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), MassGap, or terrestrial (noise)
             </Description>
             <Param name="BNS" dataType="float" value="0.95" ucd="stat.probability">
-                <Description>Probability that the source is a binary neutron star merger</Description>
+                <Description>Probability that the source is a binary neutron star merger (both objects lighter than 3 solar masses)</Description>
             </Param>
             <Param name="NSBH" dataType="float" value="0.01" ucd="stat.probability">
-                <Description>Probability that the source is a neutron star - black hole merger</Description>
+                <Description>Probability that the source is a neutron star-black hole merger (primary heavier than 5 solar masses, secondary lighter than 3 solar masses)</Description>
             </Param>
             <Param name="BBH" dataType="float" value="0.03" ucd="stat.probability">
-                <Description>Probability that the source is a binary black hole merger</Description>
+                <Description>Probability that the source is a binary black hole merger (both objects heavier than 5 solar masses)</Description>
+            </Param>
+            <Param name="MassGap" dataType="float" value="0.0" ucd="stat.probability">
+                <Description>Probability that the source has at least one object between 3 and 5 solar masses</Description>
             </Param>
             <Param name="Terrestrial" dataType="float" value="0.01" ucd="stat.probability">
                 <Description>Probability that the source is terrestrial (i.e., a background noise fluctuation or a glitch)</Description>
@@ -74,7 +77,7 @@ xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml
                 Qualitative properties of the source, conditioned on the assumption that the signal is an astrophysical compact binary merger
             </Description>
             <Param name="HasNS" dataType="float" value="0.95" ucd="stat.probability">
-                <Description>Probability that at least one object in the binary has a mass that is less than 3 solar masses</Description>
+                <Description>Probability that at least one object in the binary has a mass that is less than 2.83 solar masses</Description>
             </Param>
             <Param name="HasRemnant" dataType="float" value="0.91" ucd="stat.probability">
                 <Description>Probability that a nonzero mass was ejected outside the central remnant object</Description>
diff --git a/_static/MS181101ab-2-Initial.xml b/_static/MS181101ab-2-Initial.xml
index 84d58177..129cdcda 100644
--- a/_static/MS181101ab-2-Initial.xml
+++ b/_static/MS181101ab-2-Initial.xml
@@ -54,16 +54,19 @@ xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml
         </Group>
         <Group type="Classification">
             <Description>
-                Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), or terrestrial (noise)
+                Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), MassGap, or terrestrial (noise)
             </Description>
             <Param name="BNS" dataType="float" value="0.95" ucd="stat.probability">
-                <Description>Probability that the source is a binary neutron star merger</Description>
+                <Description>Probability that the source is a binary neutron star merger (both objects lighter than 3 solar masses)</Description>
             </Param>
             <Param name="NSBH" dataType="float" value="0.01" ucd="stat.probability">
-                <Description>Probability that the source is a neutron star - black hole merger</Description>
+                <Description>Probability that the source is a neutron star-black hole merger (primary heavier than 5 solar masses, secondary lighter than 3 solar masses)</Description>
             </Param>
             <Param name="BBH" dataType="float" value="0.03" ucd="stat.probability">
-                <Description>Probability that the source is a binary black hole merger</Description>
+                <Description>Probability that the source is a binary black hole merger (both objects heavier than 5 solar masses)</Description>
+            </Param>
+            <Param name="MassGap" dataType="float" value="0.0" ucd="stat.probability">
+                <Description>Probability that the source has at least one object between 3 and 5 solar masses</Description>
             </Param>
             <Param name="Terrestrial" dataType="float" value="0.01" ucd="stat.probability">
                 <Description>Probability that the source is terrestrial (i.e., a background noise fluctuation or a glitch)</Description>
@@ -74,7 +77,7 @@ xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml
                 Qualitative properties of the source, conditioned on the assumption that the signal is an astrophysical compact binary merger
             </Description>
             <Param name="HasNS" dataType="float" value="0.95" ucd="stat.probability">
-                <Description>Probability that at least one object in the binary has a mass that is less than 3 solar masses</Description>
+                <Description>Probability that at least one object in the binary has a mass that is less than 2.83 solar masses</Description>
             </Param>
             <Param name="HasRemnant" dataType="float" value="0.91" ucd="stat.probability">
                 <Description>Probability that a nonzero mass was ejected outside the central remnant object</Description>
diff --git a/_static/MS181101ab-3-Update.xml b/_static/MS181101ab-3-Update.xml
index d4656867..aedfbb39 100644
--- a/_static/MS181101ab-3-Update.xml
+++ b/_static/MS181101ab-3-Update.xml
@@ -54,16 +54,19 @@ xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml
         </Group>
         <Group type="Classification">
             <Description>
-                Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), or terrestrial (noise)
+                Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), MassGap, or terrestrial (noise)
             </Description>
             <Param name="BNS" dataType="float" value="0.95" ucd="stat.probability">
-                <Description>Probability that the source is a binary neutron star merger</Description>
+                <Description>Probability that the source is a binary neutron star merger (both objects lighter than 3 solar masses)</Description>
             </Param>
             <Param name="NSBH" dataType="float" value="0.01" ucd="stat.probability">
-                <Description>Probability that the source is a neutron star - black hole merger</Description>
+                <Description>Probability that the source is a neutron star-black hole merger (primary heavier than 5 solar masses, secondary lighter than 3 solar masses)</Description>
             </Param>
             <Param name="BBH" dataType="float" value="0.03" ucd="stat.probability">
-                <Description>Probability that the source is a binary black hole merger</Description>
+                <Description>Probability that the source is a binary black hole merger (both objects heavier than 5 solar masses)</Description>
+            </Param>
+            <Param name="MassGap" dataType="float" value="0.0" ucd="stat.probability">
+                <Description>Probability that the source has at least one object between 3 and 5 solar masses</Description>
             </Param>
             <Param name="Terrestrial" dataType="float" value="0.01" ucd="stat.probability">
                 <Description>Probability that the source is terrestrial (i.e., a background noise fluctuation or a glitch)</Description>
@@ -74,7 +77,7 @@ xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml
                 Qualitative properties of the source, conditioned on the assumption that the signal is an astrophysical compact binary merger
             </Description>
             <Param name="HasNS" dataType="float" value="0.95" ucd="stat.probability">
-                <Description>Probability that at least one object in the binary has a mass that is less than 3 solar masses</Description>
+                <Description>Probability that at least one object in the binary has a mass that is less than 2.83 solar masses</Description>
             </Param>
             <Param name="HasRemnant" dataType="float" value="0.91" ucd="stat.probability">
                 <Description>Probability that a nonzero mass was ejected outside the central remnant object</Description>
diff --git a/changes.rst b/changes.rst
index 40974be2..dde02219 100644
--- a/changes.rst
+++ b/changes.rst
@@ -14,6 +14,8 @@ Version 5 (unreleased)
 
 .. rubric:: Alert Contents
 
+* Add MassGap classification for compact binary mergers.
+
 .. rubric:: Sample Code
 
 Version 4 (2019-02-15)
diff --git a/content.rst b/content.rst
index 8672f3ac..62030c96 100644
--- a/content.rst
+++ b/content.rst
@@ -99,8 +99,8 @@ LIGO/Virgo GCN Notice.
 | Fluence           |                                                           | Gravitational-wave fluence in erg cm\ :math:`^{-2}`       |
 +-------------------+-----------------------------------------------------------+-----------------------------------------------------------+
 | BNS, NSBH, BBH,   | Probability that the source is a :term:`BNS`,             | N/A                                                       |
-| Terrestrial       | :term:`NSBH`, :term:`NSBH` merger, or terrestrial (i.e.,  |                                                           |
-|                   | noise) respectively                                       |                                                           |
+| MassGap, Noise    | :term:`NSBH`, :term:`BBH` merger, :term:`MassGap` or      |                                                           |
+|                   | terrestrial (i.e, noise) respectively                     |                                                           |
 +-------------------+-----------------------------------------------------------+                                                           +
 | HasNS, HasRemnant | Probability, under the assumption that the source is not  |                                                           |
 |                   | noise, that at least one of the compact objects was a     |                                                           |
@@ -172,14 +172,15 @@ NSBH, and BBH) in terms of the component masses :math:`m_1` and :math:`m_2`.
 
     min_mass = 1
     ns_max_mass = 3
-    max_mass = 9
+    bh_min_mass = 5
+    max_mass = 11
     ax = plt.axes(aspect=1)
     ax.set_xlim(min_mass, max_mass)
     ax.set_ylim(min_mass, max_mass)
     ax.spines['top'].set_visible(False)
     ax.spines['right'].set_visible(False)
 
-    ticks = [min_mass, ns_max_mass]
+    ticks = [min_mass, ns_max_mass, bh_min_mass]
     ax.set_xticks(ticks)
     ax.set_yticks(ticks)
 
@@ -193,28 +194,40 @@ NSBH, and BBH) in terms of the component masses :math:`m_1` and :math:`m_2`.
     ax.xaxis.set_label_coords(1.0, -0.025)
     ax.yaxis.set_label_coords(-0.025, 1.0)
 
-    bns_color, nsbh_color, bbh_color = seaborn.color_palette('pastel', 3)
+    bns_color, nsbh_color, gap_color, bbh_color = seaborn.color_palette(
+        'pastel', 4)
 
     p = ax.add_patch(Rectangle((min_mass, min_mass),
                                ns_max_mass - min_mass, ns_max_mass - min_mass,
                                color=bns_color, linewidth=0))
     ax.text(*get_center(p.get_bbox()), 'BNS', ha='center', va='center')
 
-    p = ax.add_patch(Rectangle((ns_max_mass, ns_max_mass),
-                               max_mass - ns_max_mass, max_mass - ns_max_mass,
+    p = ax.add_patch(Rectangle((bh_min_mass, bh_min_mass),
+                               max_mass - bh_min_mass, max_mass - bh_min_mass,
                                color=bbh_color, linewidth=0))
     ax.text(*get_center(p.get_bbox()), 'BBH', ha='center', va='center')
 
-    p = ax.add_patch(Rectangle((min_mass, ns_max_mass),
-                     ns_max_mass - min_mass, max_mass - ns_max_mass,
-                     color=nsbh_color, linewidth=0))
+    p = ax.add_patch(Rectangle((min_mass, bh_min_mass),
+                               ns_max_mass - min_mass, max_mass - bh_min_mass,
+                               color=nsbh_color, linewidth=0))
     ax.text(*get_center(p.get_bbox()), 'NSBH', ha='center', va='center')
 
-    p = ax.add_patch(Rectangle((ns_max_mass, min_mass),
-                               max_mass - ns_max_mass, ns_max_mass - min_mass,
+    p = ax.add_patch(Rectangle((bh_min_mass, min_mass),
+                               max_mass - bh_min_mass, ns_max_mass - min_mass,
                                color=nsbh_color, linewidth=0))
     ax.text(*get_center(p.get_bbox()), 'NSBH', ha='center', va='center')
 
+    ax.add_patch(Rectangle((min_mass, ns_max_mass),
+                           max_mass - min_mass, bh_min_mass - ns_max_mass,
+                           color=gap_color, linewidth=0))
+    ax.add_patch(Rectangle((ns_max_mass, min_mass),
+                           bh_min_mass - ns_max_mass, max_mass - min_mass,
+                           color=gap_color, linewidth=0))
+    p = ax.add_patch(Rectangle((ns_max_mass, ns_max_mass),
+                               bh_min_mass - ns_max_mass, bh_min_mass - ns_max_mass,
+                               color=gap_color, linewidth=0))
+    ax.text(*get_center(p.get_bbox()), 'MassGap', ha='center', va='center')
+
     for args in [[1, 0, 0.025, 0], [0, 1, 0, 0.025]]:
         ax.arrow(*args,
                  transform=ax.transAxes, clip_on=False,
diff --git a/glossary.rst b/glossary.rst
index ce17c33c..625fa3d5 100644
--- a/glossary.rst
+++ b/glossary.rst
@@ -9,6 +9,11 @@ Glossary
     BNS
         Binary neutron star, a binary system composed of two neutron stars.
 
+    MassGap
+        Compact binary systems with at least one compact object whose mass is 
+        in the hypothetical "mass gap" between neutron stars and black holes, 
+        defined here as 3-5 solar masses.
+
     CBC
         Compact binary coalescence.
 
diff --git a/procedures/inference.rst b/procedures/inference.rst
index ec6cd31c..690ceead 100644
--- a/procedures/inference.rst
+++ b/procedures/inference.rst
@@ -12,7 +12,8 @@ Classification
 
 The classification consists of four numbers, summing to unity, that give the
 probability that the source is a :term:`BNS`, :term:`NSBH`, :term:`BBH` merger,
-or terrestrial (i.e. a background fluctuation or a glitch).
+falls in :term:`mass gap <MassGap>` or terrestrial (i.e. a background fluctuation 
+or a glitch).
 
 This assumes that terrestrial and astrophysical events occur as independent
 Poisson processes. A source-dependent weighting of matched-filter templates is
diff --git a/tutorial/receiving.rst b/tutorial/receiving.rst
index 133e0ed7..f910d6cb 100644
--- a/tutorial/receiving.rst
+++ b/tutorial/receiving.rst
@@ -149,6 +149,7 @@ Upon running this, you should see:
     BNS = 0.95
     NSBH = 0.01
     BBH = 0.03
+    MassGap = 0.0
     Terrestrial = 0.01
     HasNS = 0.95
     HasRemnant = 0.91
-- 
GitLab