def _det_tc(detector_name, ra, dec, tc, ref_frame='geocentric'): """Returns the coalescence time of a signal in the given detector. Parameters ---------- detector_name : string The name of the detector, e.g., 'H1'. ra : float The right ascension of the signal, in radians. dec : float The declination of the signal, in radians. tc : float The GPS time of the coalescence of the signal in the `ref_frame`. ref_frame : {'geocentric', string} The reference frame that the given coalescence time is defined in. May specify 'geocentric', or a detector name; default is 'geocentric'. Returns ------- float : The GPS time of the coalescence in detector `detector_name`. """ if ref_frame == detector_name: return tc detector = Detector(detector_name) if ref_frame == 'geocentric': return tc + detector.time_delay_from_center(ra, dec, tc) else: other = Detector(ref_frame) return tc + detector.time_delay_from_detector(other, ra, dec, tc)