Detector networks¶
The network module allows to build a detector network, made up of single gwfast.signal.GWSignal objects. We here present the core class, gwfast.network.DetNet, and its methods.
Initialising a detector network¶
A detector network object can be initialised as follows from multiple gwfast.signal.GWSignal objects
- class gwfast.network.DetNet(signals, verbose=True)[source]¶
Class to build a network of multiple detectors.
The functions defined within this class allow to get e.g. the network SNR and Fisher matrix.
It is possible to initialise all the seed s for the duty cycle, i.e. the percentage of time each detector is supposed to be operational, using
- DetNet._update_all_seeds(seeds=[], verbose=True)[source]¶
Update the seeds for the duty cycle in each individual detector with user input values.
Also, to store a detector configuration in a json file, it is possible to use the function
- gwfast.gwfastUtils.save_detectors(fname, detectors)[source]¶
Store a collection of dictionaries containing the detector characteristics in
jsonfile.- Parameters
fname (str) – The name of the file to store the detector characteristics in. This has to include the path and the
jsonextension.detectors (dict(dict, dict, ...)) – The collection of dictionaries conatining the detector characteristics (
lat,long,xaxandpsd_pathif desired), as ingwfast.gwfastGlobals.detectors.
Definition of SNR and Fisher for a detector network¶
In Formalism setup we introduced how the SNRs and FIM for a single detector are defined. We here generalise the definition to a detector network.
When considering a detector network, the network SNR can be simply computed as the sum in quadrature of the SNRs in each individual detector
Similarly, when considering a detector network, the total FIM can be simply computed as the sum of the FIMs in each individual detector
SNR computation in a detector network¶
To compute the network SNR defined in eq. (1), for one or multiple events, it is sufficient to use the function
- DetNet.SNR(evParams, res=1000, return_all=False)[source]¶
Compute the network signal-to-noise-ratio, SNR, as a function of the parameters of the event(s).
- Parameters
evParams (dict(array, array, ...)) – Dictionary containing the parameters of the event(s), as in
events.res (int) – The resolution of the frequency grid to use.
return_all (bool, optional) – Boolean specifying if the SNRs of the individual detectors have to be returned separately, together with the network SNR(s). In this case the return type is dict(array, array, …).
- Returns
Network SNR(s) as a function of the parameters of the event(s). The shape is \((N_{\rm events})\).
- Return type
1-D array
Fisher matrix computation in a detector network¶
To compute the total network FIM defined in eq. (2), for one or multiple events, it is sufficient to use the function
- DetNet.FisherMatr(evParams, return_all=False, return_derivatives=False, return_SNR_derivatives=False, **kwargs)[source]¶
Compute the total Fisher information matrix, FIM, as a function of the parameters of the event(s).
- Parameters
evParams (dict(array, array, ...)) – Dictionary containing the parameters of the event(s), as in
events.return_all (bool, optional) – Boolean specifying if the FIMs of the individual detectors have to be returned separately, together with the network FIM(s). In this case the return type is dict(array, array, …).
return_derivatives (bool, optional) – Boolean specifying if the derivatives of the individual detectors have to be returned (all separately). In this case
return_allis set toTruethe return type is dict(array, array, …), dict(array, array, …).return_SNR_derivatives (bool, optional) – Boolean specifying if the derivatives of the SNR have to be returned. In this case
return_allis set toTrue,return_derivativesis set toFalseand the return type is dict(array, array, …), dict(array, array, …).kwargs – Optional arguments to be passed to
gwfast.signal.GWSignal.FisherMatr, such asresoruse_m1m2.
- Returns
FIM(s) as a function of the parameters of the event(s). The shape is \((N_{\rm parameters}\), \(N_{\rm parameters}\), \(N_{\rm events})\).
- Return type
3-D array
Note
We recall that the order (row/column numbers) in which the parameters appear in the FIM is stored in the gwfast.waveforms.WaveFormModel.ParNums attribute of the gwfast.waveforms.WaveFormModel object.
Optimal location for a detector network¶
gwfast provides a method to compute the optimal location in the sky for a signal to be detected with the highest possible SNR at a given time. This is obtained maximising the sum in quadrature of the Pattern functions of the individual detectors, and the computation assumes \(\psi=0\).
To compute the optimal \(\theta\) and \(\phi\) sky coordinates for a detector network it is possible to use
- DetNet.optimal_location(tcoal, is_tGPS=False)[source]¶
Compute the optimal sky position for a signal to be seen by the detector at a given time.
The computation assumes \(\psi = 0\).
- Parameters
- Returns
Optimal \(\theta\) and \(\phi\) sky coordinates, in \(\rm rad\).
- Return type
Warning
The estimate provided by this function works only if the detectors in the network have comparable characteristics, i.e. PSDs and shape. See the gwfast code paper for discussion.
Note
Even if considering Earth rotation, the highest SNR is still be obtained if the source is in the optimal location close to the merger.
Waveform overlap for a detector network¶
New in version 1.0.2.
In Waveform overlap for a single detector we introduced the overlap between two waveform models in a single detector. Similarly to the SNR and FIM, also this definition can be generalised to a network of detectors, as
gwfast offers the possibility to compute this quantity for a detector network on two sets of events parameters (for one or multiple events at a time), using the function
- DetNet.WFOverlap(WF1, WF2, evParams1, evParams2, res=1000, **kwargs)[source]¶
Compute the overlap of two waveforms in a detector network on two sets of parameters, for one or multiple events.
- Parameters
WF1 (WaveFormModel) – Object containing the first waveform model to analyse.
WF2 (WaveFormModel) – Object containing the second waveform model to analyse.
evParams1 (dict(array, array, ...)) – Dictionary containing the parameters of the event(s) for the first waveform model, as in
events.evParams2 (dict(array, array, ...)) – Dictionary containing the parameters of the event(s) for the second waveform model, as in
events.res (int) – The resolution of the frequency grid to use.
kwargs (unused) – Optional arguments.
- Returns
Overlap(s) of the two waveforms. The shape is \((N_{\rm events})\).
- Return type
1-D array
Relative orientation and distance between detectors¶
New in version 1.1.0.
Relative orientation¶
The relative orientation of two detectors with respect to the great circle that joins them can be computed using the function
- gwfast.gwfastUtils.ang_btw_dets_GC(det1, det2)[source]¶
Compute the angle between two detectors with respect to the great circle that joins them, see https://en.wikipedia.org/wiki/Great-circle_navigation.
- Parameters
det1 (dict(float, float, float)) – Dictionary containing the latitude,
'lat', longitude,'long', and orientation,'xax', of the first detector (all in degrees), as ingwfast.gwfastGlobals.detectors.det2 (dict(float, float, float)) – Dictionary containing the latitude,
'lat', longitude,'long', and orientation,'xax', of the second detector (all in degrees), as ingwfast.gwfastGlobals.detectors.
- Returns
Angle between the two detectors, in \(\rm deg\).
- Return type
Detector distance¶
The great circle distance between two detectors can be computed using the function
- gwfast.gwfastUtils.dist_btw_dets_GC(det1, det2)[source]¶
Compute the great circle distance between two detectors using the Vincenty formula in spherical case, see https://en.wikipedia.org/wiki/Great-circle_distance.
- Parameters
det1 (dict(float, float, float)) – Dictionary containing the latitude,
'lat', longitude,'long', and orientation,'xax', of the first detector (all in degrees), as ingwfast.gwfastGlobals.detectors.det2 (dict(float, float, float)) – Dictionary containing the latitude,
'lat', longitude,'long', and orientation,'xax', of the second detector (all in degrees), as ingwfast.gwfastGlobals.detectors.
- Returns
Great circle distance between the detectors, in \(\rm km\).
- Return type
The great circle chord length between two detectors can be computed using the function
- gwfast.gwfastUtils.dist_btw_dets_Chord(det1, det2)[source]¶
Compute the great circle chord length between two detectors, see https://en.wikipedia.org/wiki/Great-circle_distance.
- Parameters
det1 (dict(float, float, float)) – Dictionary containing the latitude,
'lat', longitude,'long', and orientation,'xax', of the first detector (all in degrees), as ingwfast.gwfastGlobals.detectors.det2 (dict(float, float, float)) – Dictionary containing the latitude,
'lat', longitude,'long', and orientation,'xax', of the second detector (all in degrees), as ingwfast.gwfastGlobals.detectors.
- Returns
Great circle chord length between the detectors, in \(\rm km\).
- Return type