Manage streams. More...
#include <Streams.h>
Public Member Functions | |
void | GetDetAMResponse (double &fplus, double &fcross, const double ra, const double dec, const double psi, const double gmst) |
Computes F+ and Fx. | |
int | GetDetIndex (void) |
Returns the detector index for this stream. | |
string | GetDetPrefix (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. | |
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. | |
bool | SetName (const string aNewName) |
Sets a new name to the stream. | |
Constructors and destructors | |
Streams (const string aName, const int aVerbose=0) | |
Constructor of the Streams class. | |
virtual | ~Streams (void) |
Destructor of the ReadCoinc class. |
Manage streams.
This class was designed to manage data streams as defined in the GWOLLUM convention for streams. In particular, the Stream object can be converted into one detector of the LIGO-virgo 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 int | aVerbose = 0 | |||
) |
Constructor of the Streams class.
The stream is defined by its name which should respect the stream name convention: [prefix]:[suffix], where [prefix] is 2 characters exactly. If the prefix matches a known LIGO-Virgo detector, the stream is turned into a LV detector. In that case many specific functions are provided to access the detector properties.
aName | stream name | |
aVerbose | verbosity level |
Streams::~Streams | ( | void | ) | [virtual] |
Destructor of the ReadCoinc class.
void Streams::GetDetAMResponse | ( | double & | fplus, | |
double & | fcross, | |||
const double | ra, | |||
const double | dec, | |||
const double | psi, | |||
const double | gmst | |||
) |
Computes F+ and Fx.
Returns F+ and Fx values for a source at a specified sky position, polarization angle, and sidereal time. This function only works if the stream has been turned into a LV detector.
fplus | returned F+ value | |
fcross | returned Fx value | |
ra | right ascension [rad] | |
dec | declination [rad] | |
psi | polarisation angle [rad] | |
gmst | sideral time [s] |
int Streams::GetDetIndex | ( | void | ) | [inline] |
Returns the detector index for this stream.
Returns -1 if this stream was not identified as a LV detector.
string Streams::GetDetPrefix | ( | void | ) | [inline] |
Returns the detector prefix for this stream.
Returns "" if this stream was not identified as a LV detector.
string Streams::GetDirectory | ( | const string | aOutDir = "." |
) | [inline] |
Returns the stream directory.
Convention: ./[name]
Optionally, a root directory can be added: [aOutDir]/[name]
aOutDir | root directory |
double Streams::GetLocalTime | ( | const double | aRa, | |
const double | aDec, | |||
const double | aGeocentricTime | |||
) | [inline] |
Converts the geocentric time to the detector local time.
The light propagation direction must be given by the right ascension and declination. This function only works if the stream has been turned into a LV detector. It returns -1.0 if this function fails.
aRa | right ascension | |
aDec | declination | |
aGeocentricTime | geocentric time |
string Streams::GetName | ( | void | ) | [inline] |
Returns the stream full name.
string Streams::GetNameConv | ( | void | ) | [inline] |
Returns the stream name using the LIGO-Virgo file name convention.
string Streams::GetNamePrefix | ( | void | ) | [inline] |
Returns the stream name prefix.
string Streams::GetNameSuffix | ( | void | ) | [inline] |
Returns the stream name suffix.
string Streams::GetNameSuffixUnderScore | ( | void | ) | [inline] |
Returns the stream name suffix with only underscores.
Dash characters are turned into underscore characters.
bool Streams::SetName | ( | const string | aNewName | ) |
Sets a new name to the stream.
The stream is defined by its name which should respect the stream name convention: [prefix]:[suffix], where [prefix] is 2 characters exactly. If the prefix matches a known LIGO-Virgo detector, the stream is turned into a LV detector.
aNewName | new name |