Map triggers. More...
#include <EventMap.h>
Public Member Functions | |
bool | BuildClusterMap (const int aMapIndex, const int aCl, const double aTimeCenter=0.0) |
Builds the map of a given cluster. | |
bool | BuildMap (const int aMapIndex, const double aTime) |
Builds the map centered on given GPS time. | |
int | GetMapFrequencyMax (const int aMapIndex) |
Returns the map maximum frequency. | |
int | GetMapFrequencyMin (const int aMapIndex) |
Returns the map minimum frequency. | |
int | GetMapFrequencyResolution (const int aMapIndex) |
Returns the map frequency resolution. | |
double | GetMapLoudestFrequency (const int aMapIndex) |
Returns the frequency value of the (SNR) loudest tile of a given map. | |
double | GetMapLoudestSNR (const int aMapIndex) |
Returns the SNR value of the loudest (SNR) tile of a given map. | |
double | GetMapLoudestTime (const int aMapIndex) |
Returns the time value of the loudest (SNR) tile of a given map. | |
double | GetMapMatch (double &aTimeShift, double &aMatchSumw2, const int aMapIndex, EventMap *aExtMap, const int aExtMapIndex, const double aTimeJitter=0.0) |
Measures and returns the morphology match with an external map. | |
double | GetMapMatch (double &aTimeShift, double &aMatchSumw2, const int aMapIndex1, const int aMapIndex2, const double aTimeJitter=0.0) |
Measures and returns the morphology match between 2 maps. | |
int | GetMapTimeRange (const int aMapIndex) |
Returns the map time range. | |
int | GetMapTimeResolution (const int aMapIndex) |
Returns the map time resolution. | |
bool | NormalizeMap (const int aMapIndex) |
Normalizes the map pixels by the highest pixel value. | |
bool | NormalizeMapLoudest (const int aMapIndex) |
Normalizes the map pixels by the value of the loudest (SNR) tile. | |
bool | PrintMap (const int aMapIndex) |
Prints the map with a given index. | |
bool | PrintMapLive (const double aDuration, const string aOutFile="none") |
Prints a live movie of maps incrementing the current central time. | |
bool | PrintMapNext (const double aTimeFraction=0.25) |
Prints the map incrementing the current central time. | |
void | SetMapAmplitudeContent (void) |
Sets map content to tile amplitude. | |
bool | SetMapFrequencyRange (const int aMapIndex, const double aFreqMin, const double aFreqMax) |
Sets a new map frequency range. | |
bool | SetMapQRange (const int aMapIndex, const double aQMin, const double aQMax) |
Sets a new map Q range. | |
bool | SetMapResolution (const int aMapIndex, const int aTresolution, const int aFresolution) |
Sets a new map resolution. | |
void | SetMapSNRContent (void) |
Sets map content to tile SNR. | |
bool | SetMapTimeRange (const int aMapIndex, const double aTimeRange) |
Sets a new map time range. | |
Constructors and destructors | |
EventMap (const int aNmaps, const string aPattern, const string aDirectory="", const int aVerbose=0) | |
Constructor of the EventMap class. | |
virtual | ~EventMap (void) |
Destructor of the EventMap class. |
Map triggers.
This class was designed to plot time-frequency maps of triggers. When initialized, the EventMap object creates map containers centered on 0. These containers can be filled with trigger SNR or amplitude. Maps can be used interactively or saved on disk. This class offers functions to interact with the maps, to compare maps, to animate the maps etc...
EventMap::EventMap | ( | const int | aNmaps, | |
const string | aPattern, | |||
const string | aDirectory = "" , |
|||
const int | aVerbose = 0 | |||
) |
Constructor of the EventMap class.
aNmaps map containers are initialized. The map parameters are set to default using input triggers (see TriggerSelect). The time range is set to +/- 2 seconds with a 201-pixels resolution and the frequency resolution is set to 200 pixels. By default, maps are filled with tile SNR.
aNmaps | number of map containers | |
aPattern | input file pattern | |
aDirectory | trigger ROOT directory | |
aVerbose | verbosity level |
EventMap::~EventMap | ( | void | ) | [virtual] |
Destructor of the EventMap class.
bool EventMap::BuildClusterMap | ( | const int | aMapIndex, | |
const int | aCl, | |||
const double | aTimeCenter = 0.0 | |||
) |
Builds the map of a given cluster.
Only tiles of a given cluster are represented on the map. By default, the map is centered on the cluster peak time. Use PrintMap() to update the interactive pad.
aMapIndex | map index | |
aCl | cluster index | |
aTimeCenter | if this value is non 0.0, the map is centered on this time value. |
bool EventMap::BuildMap | ( | const int | aMapIndex, | |
const double | aTime | |||
) |
Builds the map centered on given GPS time.
Use PrintMap() to update the interactive pad.
aMapIndex | map index | |
aTime | central GPS time |
int EventMap::GetMapFrequencyMax | ( | const int | aMapIndex | ) | [inline] |
Returns the map maximum frequency.
aMapIndex | map index |
int EventMap::GetMapFrequencyMin | ( | const int | aMapIndex | ) | [inline] |
Returns the map minimum frequency.
aMapIndex | map index |
int EventMap::GetMapFrequencyResolution | ( | const int | aMapIndex | ) | [inline] |
Returns the map frequency resolution.
aMapIndex | map index |
double EventMap::GetMapLoudestFrequency | ( | const int | aMapIndex | ) |
Returns the frequency value of the (SNR) loudest tile of a given map.
Returns 0.0 if failure.
aMapIndex | map index |
double EventMap::GetMapLoudestSNR | ( | const int | aMapIndex | ) |
Returns the SNR value of the loudest (SNR) tile of a given map.
Returns -1.0 if failure.
aMapIndex | map index |
double EventMap::GetMapLoudestTime | ( | const int | aMapIndex | ) |
Returns the time value of the loudest (SNR) tile of a given map.
Returns 0.0 if failure.
aMapIndex | map index |
double EventMap::GetMapMatch | ( | double & | aTimeShift, | |
double & | aMatchSumw2, | |||
const int | aMapIndex, | |||
EventMap * | aExtMap, | |||
const int | aExtMapIndex, | |||
const double | aTimeJitter = 0.0 | |||
) |
Measures and returns the morphology match with an external map.
FIXME: explain the match algorithm. Returns -1.0 if this function fails.
double EventMap::GetMapMatch | ( | double & | aTimeShift, | |
double & | aMatchSumw2, | |||
const int | aMapIndex1, | |||
const int | aMapIndex2, | |||
const double | aTimeJitter = 0.0 | |||
) |
Measures and returns the morphology match between 2 maps.
FIXME: explain the match algorithm. Returns -1.0 if this function fails.
aTimeShift | time-shift used to get the best match (applied to pixels of aMapIndex2) | |
aMatchSumw2 | sum of weights squared | |
aMapIndex1 | first map index | |
aMapIndex2 | second map index | |
aTimeJitter | time jitter +/- [s] |
int EventMap::GetMapTimeRange | ( | const int | aMapIndex | ) | [inline] |
Returns the map time range.
aMapIndex | map index |
int EventMap::GetMapTimeResolution | ( | const int | aMapIndex | ) | [inline] |
Returns the map time resolution.
aMapIndex | map index |
bool EventMap::NormalizeMap | ( | const int | aMapIndex | ) |
Normalizes the map pixels by the highest pixel value.
aMapIndex | map index |
bool EventMap::NormalizeMapLoudest | ( | const int | aMapIndex | ) |
Normalizes the map pixels by the value of the loudest (SNR) tile.
aMapIndex | map index |
bool EventMap::PrintMap | ( | const int | aMapIndex | ) |
Prints the map with a given index.
aMapIndex | map index |
bool EventMap::PrintMapLive | ( | const double | aDuration, | |
const string | aOutFile = "none" | |||
) |
Prints a live movie of maps incrementing the current central time.
Once a map is plotted, this function can be called to move forward in time. The live map stops after 'aDuration' seconds have been covered. This movie can be saved as an animated gif if an output file is given. Use a negative duration to move backward in time.
aDuration | duration in seconds after what the live map stops | |
aOutFile | path to output file. |
bool EventMap::PrintMapNext | ( | const double | aTimeFraction = 0.25 |
) |
Prints the map incrementing the current central time.
Once a map is plotted, this function can be used to move back and forth in time. The time fraction indicates the fraction of the map time range used for the shift. A positive value will move forward in time while a negative value will move backward.
aTimeFraction | time range fraction used to move to the next map |
void EventMap::SetMapAmplitudeContent | ( | void | ) | [inline] |
Sets map content to tile amplitude.
bool EventMap::SetMapFrequencyRange | ( | const int | aMapIndex, | |
const double | aFreqMin, | |||
const double | aFreqMax | |||
) |
Sets a new map frequency range.
aMapIndex | map index | |
aFreqMin | new minimal frequency value [Hz] | |
aFreqMax | new maximal frequency value [Hz] |
bool EventMap::SetMapQRange | ( | const int | aMapIndex, | |
const double | aQMin, | |||
const double | aQMax | |||
) |
Sets a new map Q range.
aMapIndex | map index | |
aQMin | new minimal Q value | |
aQMax | new maximal Q value |
bool EventMap::SetMapResolution | ( | const int | aMapIndex, | |
const int | aTresolution, | |||
const int | aFresolution | |||
) |
Sets a new map resolution.
The map resolution is defined by the number of time/frequency pixels in the map.
aMapIndex | map index | |
aTresolution | time resolution (number of pixels) | |
aFresolution | frequency resolution (number of pixels) |
void EventMap::SetMapSNRContent | ( | void | ) | [inline] |
Sets map content to tile SNR.
bool EventMap::SetMapTimeRange | ( | const int | aMapIndex, | |
const double | aTimeRange | |||
) |
Sets a new map time range.
aMapIndex | map index | |
aTimeRange | new time range value [s] |