Omicron
4.2.0
An algorithm to detect and characterize transient events in gravitational-wave detectors
|
Create a time-frequency map for the Q-transform. More...
#include <Omap.h>
Public Member Functions | |
double | GetBandEnd (const unsigned int aBandIndex) |
Returns the band frequency end [Hz]. More... | |
double | GetBandFrequency (const unsigned int aBandIndex) |
Returns the band central frequency [Hz]. More... | |
int | GetBandIndex (const double aFrequency) |
Returns the band index for a given frequency. More... | |
unsigned int | GetBandN (void) |
Returns the number of frequency bands in the map. More... | |
double * | GetBands (void) |
Returns the list of frequency bands. More... | |
double | GetBandStart (const unsigned int aBandIndex) |
Returns the band frequency start [Hz]. More... | |
unsigned int | GetBandTileN (const unsigned int aBandIndex) |
Returns the number of tiles in a band. More... | |
double | GetBandWidth (const unsigned int aBandIndex) |
Returns the band width [Hz]. More... | |
double | GetFrequencyMax (void) |
Returns the map frequency maximum [Hz]. More... | |
double | GetFrequencyMin (void) |
Returns the map frequency minimum [Hz]. More... | |
double | GetQ (void) |
Returns the Q factor. More... | |
double | GetTileContent (const unsigned int aTimeTileIndex, const unsigned int aBandIndex) |
Returns the content of a tile. More... | |
double | GetTileDuration (const unsigned int aBandIndex) |
Returns the tile duration [s]. More... | |
long unsigned int | GetTileN (const double aPadding) |
Returns the number of tiles in the map. More... | |
long unsigned int | GetTileN (void) |
Returns the number of tiles in the map. More... | |
double | GetTileTime (const unsigned int aTimeTileIndex, const unsigned int aBandIndex) |
Returns the central time of a tile [s]. More... | |
double | GetTileTimeEnd (const unsigned int aTimeTileIndex, const unsigned int aBandIndex) |
Returns the end time of a tile [s]. More... | |
double | GetTileTimeStart (const unsigned int aTimeTileIndex, const unsigned int aBandIndex) |
Returns the start time of a tile [s]. More... | |
double | GetTimeMax (void) |
Returns the map time maximum [s]. More... | |
double | GetTimeMin (void) |
Returns the map time minimum [s]. More... | |
unsigned int | GetTimeRange (void) |
Returns the map time range [s]. More... | |
int | GetTimeTileIndex (const unsigned int aBandIndex, const double aTime) |
Returns the index of a tile in a band. More... | |
void | PrintParameters (void) |
Prints the map parameters. More... | |
void | SetTileContent (const unsigned int aTimeTileIndex, const unsigned int aBandIndex, const double aContent) |
Sets the content of a tile. More... | |
int | Write (TFile *aFile, const string aName) |
Writes the time-frequency map to a ROOT file. More... | |
Constructors and destructors | |
Omap (const double aQ, const unsigned int aSampleFrequency, const double aFrequencyMin, const double aFrequencyMax, const unsigned int aTimeRange, const double aMaximumMismatch) | |
Constructor of the Omap class. More... | |
virtual | ~Omap (void) |
Destructor of the Omap class. More... | |
Protected Attributes | |
TH2D * | tfmap |
Time-frequency map. More... | |
Private Attributes | |
unsigned int * | bandMultiple |
Band multiple (time resolution). More... | |
long unsigned int | Ntiles |
Number of tiles in the tf map. More... | |
double | q |
Q factor. More... | |
Friends | |
class | Otile |
Create a time-frequency map for the Q-transform.
This class is designed to create and use a multi-resolution time-frequency map. The time-frequency map is represented by a 2-dimensional histogram with a TH2D object. The vertical axis is binned logarithmically in frequency [Hz]. Each frequency band is simply called a band. Each band is binned linearly in time (horizontal axis), and the number of bins in a band is a power of two.
Omap::Omap | ( | const double | aQ, |
const unsigned int | aSampleFrequency, | ||
const double | aFrequencyMin, | ||
const double | aFrequencyMax, | ||
const unsigned int | aTimeRange, | ||
const double | aMaximumMismatch | ||
) |
Constructor of the Omap class.
An empty time-frequency map is created.
[in] | aQ | Q factor \(Q\). |
[in] | aSampleFrequency | Sampling frequency [Hz] \(f_s\). |
[in] | aFrequencyMin | Minimum frequency [Hz]. |
[in] | aFrequencyMax | Maximum frequency [Hz]. |
[in] | aTimeRange | Time range \(T\) [s]. The map is centered on 0. |
[in] | aMaximumMismatch | Maximum mismatch between 2 consecutive tiles. |
|
virtual |
Destructor of the Omap class.
|
inline |
Returns the band frequency end [Hz].
[in] | aBandIndex | Band index. |
|
inline |
Returns the band central frequency [Hz].
[in] | aBandIndex | Band index. |
|
inline |
Returns the band index for a given frequency.
[in] | aFrequency | Frequency [Hz]. |
|
inline |
Returns the number of frequency bands in the map.
double * Omap::GetBands | ( | void | ) |
Returns the list of frequency bands.
The returned array is of size GetBandN()+1 and contains the bin limits.
|
inline |
Returns the band frequency start [Hz].
[in] | aBandIndex | Band index. |
|
inline |
Returns the number of tiles in a band.
[in] | aBandIndex | Band index. |
|
inline |
Returns the band width [Hz].
[in] | aBandIndex | Band index. |
|
inline |
Returns the map frequency maximum [Hz].
|
inline |
Returns the map frequency minimum [Hz].
|
inline |
Returns the Q factor.
|
inline |
Returns the content of a tile.
[in] | aTimeTileIndex | Tile index in the band. |
[in] | aBandIndex | Band index. |
|
inline |
Returns the tile duration [s].
[in] | aBandIndex | Band index. |
long unsigned int Omap::GetTileN | ( | const double | aPadding | ) |
Returns the number of tiles in the map.
[in] | aPadding | Number of seconds excluded on both sides of the time range. |
|
inline |
Returns the number of tiles in the map.
|
inline |
Returns the central time of a tile [s].
[in] | aTimeTileIndex | Tile index in the band. |
[in] | aBandIndex | Band index. |
|
inline |
Returns the end time of a tile [s].
[in] | aTimeTileIndex | Tile index in the band. |
[in] | aBandIndex | Band index. |
|
inline |
Returns the start time of a tile [s].
[in] | aTimeTileIndex | Tile index in the band. |
[in] | aBandIndex | Band index. |
|
inline |
Returns the map time maximum [s].
|
inline |
Returns the map time minimum [s].
|
inline |
Returns the map time range [s].
|
inline |
Returns the index of a tile in a band.
[in] | aBandIndex | Band index. |
[in] | aTime | Time [s]. |
void Omap::PrintParameters | ( | void | ) |
Prints the map parameters.
|
inline |
Sets the content of a tile.
[in] | aTimeTileIndex | Tile index in the band. |
[in] | aBandIndex | Band index. |
[in] | aContent | Content. |
|
inline |
Writes the time-frequency map to a ROOT file.
[in] | aFile | Pointer to an open TFile. |
[in] | aName | Map name. |
|
friend |
|
private |
Band multiple (time resolution).
|
private |
Number of tiles in the tf map.
|
private |
Q factor.
|
protected |
Time-frequency map.