GWOLLUM  4.2.0
Tools for gravitational-wave analyses
Streams Class Reference

Manage streams. More...

#include <Streams.h>

Inheritance diagram for Streams:
Collaboration diagram for Streams:

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\). More...
 
unsigned int GetDetectorIndex (void)
 Returns the detector index for this stream. More...
 
string GetDetectorPrefix (void)
 Returns the detector prefix for this stream. More...
 
string GetDirectory (const string aOutDir=".")
 Returns the stream directory. More...
 
double GetLocalTime (const double aRa, const double aDec, const double aGeocentricTime)
 Converts the geocentric time to the detector local time [s]. More...
 
string GetName (void)
 Returns the stream full name. More...
 
string GetNameConv (void)
 Returns the stream name using the LIGO-Virgo file name convention. More...
 
string GetNamePrefix (void)
 Returns the stream name prefix. More...
 
string GetNameSuffix (void)
 Returns the stream name suffix. More...
 
string GetNameSuffixUnderScore (void)
 Returns the stream name suffix with only underscores. More...
 
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. More...
 
void SetName (const string aName)
 Sets a new name to the stream. More...
 
Constructors and destructors
 Streams (const string aName, const unsigned int aVerbose=0)
 Constructor of the Streams class. More...
 
virtual ~Streams (void)
 Destructor of the Streams class. More...
 
- Public Member Functions inherited from Sample
double GetHighPassFrequency (void)
 Returns the current highpass frequency. More...
 
unsigned int GetNativeFrequency (void)
 Returns the current native sampling frequency [Hz]. More...
 
unsigned int GetWindowSize (void)
 Returns the window size (=0 if no windowing). More...
 
unsigned int GetWorkingFrequency (void)
 Returns the current working sampling frequency [Hz]. More...
 
void SetDCRemoval (const bool aDCremove=true)
 Activates/Deactivates the DC removal. More...
 
bool SetFrequencies (const unsigned int aNativeFrequency, const unsigned int aWorkingFrequency, const double aHighPassFrequency=0.0)
 Defines frequencies for the transformation. More...
 
bool SetHighPassFrequency (const double aHighPassFrequency)
 Defines a highpass frequency. More...
 
bool SetNativeFrequency (const int aNativeFrequency)
 Sets a new native sampling frequency. More...
 
void SetWindow (const unsigned int aWindowSize, double *aWindow)
 Defines the window. More...
 
bool SetWorkingFrequency (const unsigned int aWorkingFrequency)
 Sets a new working sampling frequency. More...
 
bool Transform (const unsigned int aInSize, double *aInData, const unsigned int aOutSize, double *aOutData)
 Transforms data. More...
 
 Sample (const unsigned int aVerbosity=0)
 Constructor of the Sample class. More...
 
virtual ~Sample (void)
 Destructor of the Sample class. More...
 

Protected Attributes

string Name
 Stream name. More...
 
- Protected Attributes inherited from Sample
double fHighPassFrequency
 Cutoff frequency. More...
 
unsigned int fNativeFrequency
 Native sampling frequency. More...
 
bool fRemoveDC
 DC removal flag. More...
 
unsigned int fVerbosity
 Verbosity level. More...
 
double * fWindow
 Window. More...
 
unsigned int fWindowSize
 Window size. More...
 
unsigned int fWorkingFrequency
 Working sampling frequency. More...
 

Private Member Functions

void ComputeDetectorResponse (void)
 Computes the detector spatial response matrix. More...
 
void MakeDetector (void)
 Associates detector's properties to the stream (based on prefix). More...
 

Private Attributes

unsigned int DetIndex
 Detector index. More...
 
double DetLoc [3]
 Detector location (vertex) on Earth. More...
 
string NamePrefix
 Stream prefix. More...
 
string NameSuffix
 Stream suffix. More...
 
string NameSuffixUnderScore
 Stream suffix with only underscores. More...
 
double Response [3][3]
 Detector response. More...
 
unsigned int verbose
 Verbosity level. More...
 

Detailed Description

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.

Author
Florent Robinet

Constructor & Destructor Documentation

◆ Streams()

Streams::Streams ( const string  aName,
const unsigned int  aVerbose = 0 
)

Constructor of the Streams class.

A stream is identified by its name which shall follow the stream name convention.

See also
SetName()
Parameters
[in]aNameStream name.
[in]aVerboseVerbosity level.

◆ ~Streams()

Streams::~Streams ( void  )
virtual

Destructor of the Streams class.

Member Function Documentation

◆ ComputeDetectorResponse()

void Streams::ComputeDetectorResponse ( void  )
private

Computes the detector spatial response matrix.

◆ GetDetectorAMResponse()

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)

Parameters
[out]aFplusReturned \(F_+\) value.
[out]aFcrossReturned \(F_\times\) value.
[in]aRaRight ascension [rad].
[in]aDecDeclination [rad].
[in]aPsiPolarisation angle [rad].
[in]aGmstSideral time [s].

◆ GetDetectorIndex()

unsigned int Streams::GetDetectorIndex ( void  )
inline

Returns the detector index for this stream.

◆ GetDetectorPrefix()

string Streams::GetDetectorPrefix ( void  )
inline

Returns the detector prefix for this stream.

◆ GetDirectory()

string Streams::GetDirectory ( const string  aOutDir = ".")
inline

Returns the stream directory.

Convention: ./[name]

Optionally, a root directory can be added: [aOutDir]/[name]

Parameters
[in]aOutDirRoot directory.

◆ GetLocalTime()

double Streams::GetLocalTime ( const double  aRa,
const double  aDec,
const double  aGeocentricTime 
)
inline

Converts the geocentric time to the detector local time [s].

The wave propagation direction must be given by the right ascension and declination.

Parameters
[in]aRaRight ascension [rad].
[in]aDecDeclination [rad].
[in]aGeocentricTimeGeocentric time [s].

◆ GetName()

string Streams::GetName ( void  )
inline

Returns the stream full name.

◆ GetNameConv()

string Streams::GetNameConv ( void  )
inline

Returns the stream name using the LIGO-Virgo file name convention.

◆ GetNamePrefix()

string Streams::GetNamePrefix ( void  )
inline

Returns the stream name prefix.

◆ GetNameSuffix()

string Streams::GetNameSuffix ( void  )
inline

Returns the stream name suffix.

◆ GetNameSuffixUnderScore()

string Streams::GetNameSuffixUnderScore ( void  )
inline

Returns the stream name suffix with only underscores.

Dash characters are turned into underscore characters.

◆ GetTriggerFileName()

string Streams::GetTriggerFileName ( const unsigned int  aGpsStart,
const unsigned int  aDuration,
const string  aFileFormat = "root",
const string  aProcessName = "PROC",
const string  aOutDir = "." 
)
inline

Returns the stream trigger file name.

Parameters
[in]aGpsStartGPS start [s].
[in]aDurationDuration [s].
[in]aFileFormatFile format (extension).
[in]aProcessNameProcess name.
[in]aOutDirOutput directory.

◆ MakeDetector()

void Streams::MakeDetector ( void  )
private

Associates detector's properties to the stream (based on prefix).

◆ SetName()

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.

Parameters
[in]aNameStream name.

Member Data Documentation

◆ DetIndex

unsigned int Streams::DetIndex
private

Detector index.

◆ DetLoc

double Streams::DetLoc[3]
private

Detector location (vertex) on Earth.

◆ Name

string Streams::Name
protected

Stream name.

◆ NamePrefix

string Streams::NamePrefix
private

Stream prefix.

◆ NameSuffix

string Streams::NameSuffix
private

Stream suffix.

◆ NameSuffixUnderScore

string Streams::NameSuffixUnderScore
private

Stream suffix with only underscores.

◆ Response

double Streams::Response[3][3]
private

Detector response.

◆ verbose

unsigned int Streams::verbose
private

Verbosity level.


The documentation for this class was generated from the following files: