![]() |
GWOLLUM 4.2.0
Tools for gravitational-wave analyses
|
Manage streams. More...
#include <Streams.h>
Public Member Functions | |
void | GetDetectorAMResponse (double &aFplus, double &aFcross, const double aRa, const double aDec, const double aPsi, const double aGmst) |
Computes antenna factors \(F_+\) and \(F_\times\). | |
unsigned int | GetDetectorIndex (void) |
Returns the detector index for this stream. | |
string | GetDetectorPrefix (void) |
Returns the detector prefix for this stream. | |
string | GetDirectory (const string aOutDir=".") |
Returns the stream directory. | |
double | GetLocalTime (const double aRa, const double aDec, const double aGeocentricTime) |
Converts the geocentric time to the detector local time [s]. | |
string | GetName (void) |
Returns the stream full name. | |
string | GetNameConv (void) |
Returns the stream name using the LIGO-Virgo file name convention. | |
string | GetNamePrefix (void) |
Returns the stream name prefix. | |
string | GetNameSuffix (void) |
Returns the stream name suffix. | |
string | GetNameSuffixUnderScore (void) |
Returns the stream name suffix with only underscores. | |
TH2D * | GetSkyAntennaFactor (const unsigned int aGpsTime) |
Returns the sky map of the detector antenna factor for a given time. | |
bool | GetSkyRingPoint (double &aThetaS, double &aPhiS, const double aGmst, const double aDeltaT, const double aOmegaS, Streams *aDprime) |
Returns the sky position of a GW signal when detected by two detectors. | |
bool | GetSkyRingPointRaDec (double &aDecS, double &aRaS, const double aGmst, const double aDeltaT, const double aOmegaS, Streams *aDprime) |
Returns the sky position of a GW signal when detected by two detectors (radec). | |
string | GetTriggerFileName (const unsigned int aGpsStart, const unsigned int aDuration, const string aFileFormat="root", const string aProcessName="PROC", const string aOutDir=".") |
Returns the stream trigger file name. | |
void | SetName (const string aName) |
Sets a new name to the stream. | |
Constructors and destructors | |
Streams (const string aName, const unsigned int aVerbose=0) | |
Constructor of the Streams class. | |
virtual | ~Streams (void) |
Destructor of the Streams class. | |
![]() | |
double | GetHighPassFrequency (void) |
Returns the current highpass frequency. | |
unsigned int | GetNativeFrequency (void) |
Returns the current native sampling frequency [Hz]. | |
bool | GetStatus (void) |
Returns the class status. | |
unsigned int | GetWindowSize (void) |
Returns the window size (=0 if no windowing). | |
unsigned int | GetWorkingFrequency (void) |
Returns the current working sampling frequency [Hz]. | |
void | SetDCRemoval (const bool aDCremove=true) |
Activates/Deactivates the DC removal. | |
bool | SetFrequencies (const unsigned int aNativeFrequency, const unsigned int aWorkingFrequency, const double aHighPassFrequency=0.0) |
Defines frequencies for the transformation. | |
bool | SetHighPassFrequency (const double aHighPassFrequency) |
Defines a highpass frequency. | |
bool | SetNativeFrequency (const int aNativeFrequency) |
Sets a new native sampling frequency. | |
void | SetWindow (const unsigned int aWindowSize, double *aWindow) |
Defines the window. | |
bool | SetWorkingFrequency (const unsigned int aWorkingFrequency) |
Sets a new working sampling frequency. | |
bool | Transform (const unsigned int aInSize, double *aInData, const unsigned int aOutSize, double *aOutData) |
Transforms data. | |
Sample (const unsigned int aVerbosity=0) | |
Constructor of the Sample class. | |
virtual | ~Sample (void) |
Destructor of the Sample class. | |
Protected Attributes | |
string | Name |
Stream name. | |
![]() | |
double | fHighPassFrequency |
Cutoff frequency. | |
unsigned int | fNativeFrequency |
Native sampling frequency. | |
bool | fRemoveDC |
DC removal flag. | |
double * | fWindow |
Window. | |
unsigned int | fWindowSize |
Window size. | |
unsigned int | fWorkingFrequency |
Working sampling frequency. | |
Monitor * | mon |
Class monitor. | |
Private Member Functions | |
void | ComputeDetectorResponse (void) |
Computes the detector spatial response matrix. | |
void | MakeDetector (void) |
Associates detector's properties to the stream (based on prefix). | |
Private Attributes | |
unsigned int | DetIndex |
Detector index. | |
double | DetLoc [3] |
Detector location (vertex) on Earth. | |
string | NamePrefix |
Stream prefix. | |
string | NameSuffix |
Stream suffix. | |
string | NameSuffixUnderScore |
Stream suffix with only underscores. | |
double | Response [3][3] |
Detector response. | |
unsigned int | verbose |
Verbosity level. | |
Manage streams.
This class is designed to identify data streams. In particular, the Stream object can be converted into one detector of the LIGO-virgo-KAGRA global network if the stream name is recognized as such. In that case many specific functions are provided to access the detector properties.
Streams::Streams | ( | const string | aName, |
const unsigned int | aVerbose = 0 |
||
) |
|
virtual |
Destructor of the Streams class.
|
private |
Computes the detector spatial response matrix.
void Streams::GetDetectorAMResponse | ( | double & | aFplus, |
double & | aFcross, | ||
const double | aRa, | ||
const double | aDec, | ||
const double | aPsi, | ||
const double | aGmst | ||
) |
Computes antenna factors \(F_+\) and \(F_\times\).
Antenna factors are calculated for a source at a specified sky position, polarization angle, and sidereal time. The implementation follows the formulae given in Anderson et al., PRD 63 042003 (2001)
[out] | aFplus | Returned \(F_+\) value. |
[out] | aFcross | Returned \(F_\times\) value. |
[in] | aRa | Right ascension [rad]. |
[in] | aDec | Declination [rad]. |
[in] | aPsi | Polarisation angle [rad]. |
[in] | aGmst | Sideral time [rad]. |
|
inline |
Returns the detector index for this stream.
|
inline |
Returns the detector prefix for this stream.
|
inline |
Returns the stream directory.
Convention: ./[name]
Optionally, a root directory can be added: [aOutDir]/[name]
[in] | aOutDir | Root directory. |
|
inline |
Converts the geocentric time to the detector local time [s].
The wave propagation direction must be given by the right ascension and declination.
[in] | aRa | Right ascension [rad]. |
[in] | aDec | Declination [rad]. |
[in] | aGeocentricTime | Geocentric time [s]. |
|
inline |
Returns the stream full name.
|
inline |
Returns the stream name using the LIGO-Virgo file name convention.
|
inline |
Returns the stream name prefix.
|
inline |
Returns the stream name suffix.
|
inline |
Returns the stream name suffix with only underscores.
Dash characters are turned into underscore characters.
TH2D * Streams::GetSkyAntennaFactor | ( | const unsigned int | aGpsTime | ) |
Returns the sky map of the detector antenna factor for a given time.
The returned histogram (declination vs right ascension) is filled with the antenna factor values: \(\sqrt{F_{+}^2 + F_{\times}^2}\).
[in] | aGpsTime | GPS time [s]. |
bool Streams::GetSkyRingPoint | ( | double & | aThetaS, |
double & | aPhiS, | ||
const double | aGmst, | ||
const double | aDeltaT, | ||
const double | aOmegaS, | ||
Streams * | aDprime | ||
) |
Returns the sky position of a GW signal when detected by two detectors.
When detected by two detectors, a gravitational-wave source can be located along a ring in the sky. The GW event is detected at time \(t\) in this detector and at \(t^\prime\) in another detector. We note \(\delta t = t^\prime-t\) the gravitational-wave travel time between the two detectors. We parameterize the position on the ring using the angle \(\omega\) which can take values between \(0\) and \(2\pi\).
We define the reference frame \(\cal{R}\) with an origin positioned at the vertex of this detector, \(D\), and the axes \((x, y, z)\) oriented along the celestial axes. In this reference frame, the vertex of the second detector, \(D^\prime\), is located at \(D^\prime = (d_x,\, d_y,\, d_z)_{\cal{R}}\), or, in spherical coordinates \(D^\prime = (d\sin\theta\cos\varphi,\, d\sin\theta\sin\varphi,\, d\cos\theta)_{\cal{R}}\), where \(d\) is the distance between the two detectors.
We define a second reference frame \(\cal{R}^\prime\) with an origin positioned at the vertex of the other detector ( \(D^\prime\)). The reference frame \(\cal{R}^\prime\) is obtained after rotating \(\cal{R}\) with the rotation matrix \(R\). The rotation \(R\) is a sequence of two extrinsic rotations: first a rotation about the \(y\) axis with a \(\theta\) angle, then a rotation about the \(z\) axis with a \(\varphi\) angle. The rotation matrix can be written as:
\[ R = \left[ {\begin{array}{ccc} \cos\varphi\cos\theta & \sin\varphi\cos\theta & -\sin\theta \\ -\sin\varphi & \cos\theta & 0 \\ \cos\varphi\sin\theta & \sin\varphi\sin\theta & \cos\theta \end{array} } \right] \]
The two reference frames are represented in the following figure. Solid lines (resp. dashed lines) are used to represent the axis of \(\cal{R}\) (resp. \(\cal{R}^\prime\)).
The unit vector pointing in the direction of the GW source is noted \(\vec{u}_s=(\sin\theta_s\cos\varphi_s,\, \sin\theta_s\sin\varphi_s,\, \cos\theta_s)_{\cal{R}}\). The position of the source must therefore verify:
\[ \vec{u}_s\cdot\overrightarrow{DD^\prime} = -c\delta t = d\cos\gamma_s \]
where \(c\) is the speed of light in vacuum and \(\gamma_s\) is the angle between the \(\overrightarrow{DD^\prime}\) axis and the source vector \(\vec{u}_s\). The source position is degenerated and can be anywhere along the ring defined by the cone with an opening angle \(\gamma_s\). The angle \(\gamma_s\) is completely determined by the previous equation, assuming the time delay \(\delta t\) is known: \(\gamma_s = \arccos(-c\delta t / d)\). In \(\cal{R}^\prime\), the source vector \(\vec{u}_s\) coordinates are \(\vec{u}_s=(\sin\gamma_s\cos\omega_s,\, \sin\gamma_s\sin\omega_s,\, \cos\gamma_s)_{\cal{R}^\prime}\). The \(\gamma_s\) angle is derived from the time delay and \(\omega_s\) must be provided by the user.
The rotation to move from \(\cal{R}^\prime\) to \(\cal{R}\) is described by the inverse of \(R\). For a rotation matrix, we simply use the transpose matrix: \(R^{-1} = R^T\):
\[ \left( {\begin{array}{c} \sin\theta_s\cos\varphi_s \\ \sin\theta_s\sin\varphi_s \\ \cos\theta_s \end{array} } \right)_{\cal{R}} = R^T \times \left( {\begin{array}{c} \sin\gamma_s\cos\omega_s \\ \sin\gamma_s\sin\omega_s \\ \cos\gamma_s \end{array} } \right)_{\cal{R}^\prime} \]
Finally, the sideral time must be added to the \(\varphi_s\) angle to account for the Earth roatation.
[out] | aThetaS | Source position in the Earth reference frame (celestial coordinates): polar angle \(\theta_s\) [rad]. |
[out] | aPhiS | Source position in the Earth reference frame (celestial coordinates): azimuthal angle \(\varphi_s\) [rad]. |
[in] | aGmst | Sideral time for this stream [rad]. |
[in] | aDeltaT | Time delay between detectors: \(\delta t = t^\prime-t\) [s]. |
[in] | aOmegaS | Ring angle as defined in \(\cal{R}^\prime\): \(\omega_s\) [rad]. |
[in] | aDprime | Pointer to the other detector \(D^\prime\). |
|
inline |
Returns the sky position of a GW signal when detected by two detectors (radec).
[out] | aDecS | Source position in the Earth reference frame (celestial coordinates): declination [rad]. |
[out] | aRaS | Source position in the Earth reference frame (celestial coordinates): right ascension [rad]. |
[in] | aGmst | Sideral time for this stream [rad]. |
[in] | aDeltaT | Time delay between detectors: \(\delta t = t^\prime-t\) [s]. |
[in] | aOmegaS | Ring angle as defined in \(\cal{R}^\prime\): \(\omega_s\) [rad]. |
[in] | aDprime | Pointer to the other detector \(D^\prime\). |
|
inline |
Returns the stream trigger file name.
[in] | aGpsStart | GPS start [s]. |
[in] | aDuration | Duration [s]. |
[in] | aFileFormat | File format (extension). |
[in] | aProcessName | Process name. |
[in] | aOutDir | Output directory. |
|
private |
Associates detector's properties to the stream (based on prefix).
void Streams::SetName | ( | const string | aName | ) |
Sets a new name to the stream.
A stream is identified by its name which shall follow the stream name convention: [prefix]:[suffix], where [prefix] is 2-characters string exactly.
[in] | aName | Stream name. |
|
private |
Detector index.
|
private |
Detector location (vertex) on Earth.
|
protected |
Stream name.
|
private |
Stream prefix.
|
private |
Stream suffix.
|
private |
Stream suffix with only underscores.
|
private |
Detector response.
|
private |
Verbosity level.