def multiifo_signal_coincident_area(ifos):
    """
    Calculate the area in which signal time differences are physically allowed

    Parameters
    ----------
    ifos: list of strings
        list of interferometers

    Returns
    -------
    allowed_area: float
        area in units of seconds^(n_ifos-1) that coincident signals will occupy
    """
    n_ifos = len(ifos)

    if n_ifos == 2:
        det0 = pycbc.detector.Detector(ifos[0])
        det1 = pycbc.detector.Detector(ifos[1])
        allowed_area = 2 * det0.light_travel_time_to_detector(det1)
    elif n_ifos == 3:
        dets = {}
        tofs = numpy.zeros(n_ifos)
        ifo2_num = []
        # set up detector objects
        for ifo in ifos:
            dets[ifo] = pycbc.detector.Detector(ifo)

        # calculate travel time between detectors
        for i, ifo in enumerate(ifos):
            ifo2_num.append(int(numpy.mod(i + 1, n_ifos)))
            det0 = dets[ifo]
            det1 = dets[ifos[ifo2_num[i]]]
            tofs[i] = det0.light_travel_time_to_detector(det1)

        # calculate allowed area
        phi_12 = numpy.arccos((tofs[0]**2 + tofs[1]**2 - tofs[2]**2)
                              / (2 * tofs[0] * tofs[1]))
        allowed_area = numpy.pi * tofs[0] * tofs[1] * numpy.sin(phi_12)
    else:
        raise NotImplementedError("Not able to deal with more than 3 ifos")

    return allowed_area
def multiifo_signal_coincident_area ( ifos ) : n_ifos = len ( ifos ) if n_ifos == 2 : det0 = pycbc . detector . Detector ( ifos [ 0 ] ) det1 = pycbc . detector . Detector ( ifos [ 1 ] ) allowed_area = 2 * det0 . light_travel_time_to_detector ( det1 ) elif n_ifos == 3 : dets = { } tofs = numpy . zeros ( n_ifos ) ifo2_num = [ ] for ifo in ifos : dets [ ifo ] = pycbc . detector . Detector ( ifo ) for i , ifo in enumerate ( ifos ) : ifo2_num . append ( int ( numpy . mod ( i + 1 , n_ifos ) ) ) det0 = dets [ ifo ] det1 = dets [ ifos [ ifo2_num [ i ] ] ] tofs [ i ] = det0 . light_travel_time_to_detector ( det1 ) phi_12 = numpy . arccos ( ( tofs [ 0 ] ** 2 + tofs [ 1 ] ** 2 - tofs [ 2 ] ** 2 ) / ( 2 * tofs [ 0 ] * tofs [ 1 ] ) ) allowed_area = numpy . pi * tofs [ 0 ] * tofs [ 1 ] * numpy . sin ( phi_12 ) else : raise NotImplementedError ( "Not able to deal with more than 3 ifos" ) return allowed_area
Calculate the area in which signal time differences are physically allowed

    Parameters
    ----------
    ifos: list of strings
        list of interferometers

    Returns
    -------
    allowed_area: float
        area in units of seconds^(n_ifos-1) that coincident signals will occupy