Process data with the Omicron algorithm. More...
#include <Omicron.h>
Public Member Functions | |
int | Condition (const int aInVectSize, double *aInVect) |
Conditions a data vector. | |
vector< string > | GetChannels (void) |
Returns list of channels. | |
int | GetChunkDuration (void) |
Returns chunk duration [s]. | |
int | GetOverlapDuration (void) |
Returns overlap duration [s]. | |
int | GetSampleFrequency (void) |
Returns working sampling frequency [Hz]. | |
int | GetSegmentDuration (void) |
Returns segment/block duration [s]. | |
bool | GetStatus (void) |
Returns class status. | |
Segments * | GetTriggerSegments (TH1D *aThr=NULL, const double aInfValue=1e20) |
Returns the segments associated to the trigger time coverage. | |
int | GetVerbosity (void) |
Returns verbosity level. | |
string | GetVersion (void) |
Returns Omicron version. | |
bool | InitSegments (Segments *aSeg, const double aTimeOffset=0.0) |
Initializes the segments to process. | |
bool | LoadData (double **aDataVector, int *aSize) |
Loads a data vector. | |
bool | MakeDirectories (const int aId=0) |
Creates a specific directory tree for the output. | |
bool | NewChannel (void) |
Loads a new channel. | |
bool | NewChunk (void) |
Loads a new chunk. | |
void | PrintMessage (const string aMessage) |
Prints a formatted message with a timer. | |
void | PrintStatusInfo (void) |
Prints a progress report of the processing. | |
bool | Project (void) |
Projects whitened data onto the tiles and fills output structures. | |
bool | WriteOutput (void) |
Writes output to disk. | |
Constructors and destructors | |
Omicron (const string aOptionFile) | |
Constructor of the Omicron class. | |
virtual | ~Omicron (void) |
Destructor of the Omicron class. |
Process data with the Omicron algorithm.
An introduction to Omicron is available: Omicron introduction
This class was designed to offer various methods to conduct an Omicron analysis.
Omicron::Omicron | ( | const string | aOptionFile | ) |
Constructor of the Omicron class.
This constructor initializes all the components to run Omicron: data structures, data streams, tiling, triggers, injections, monitoring, etc. An option file is required to define all the parameters to run Omicron. For more details about Omicron configuration, see this page.
After initialization, the Omicron methods should be called sequentially to perform the analysis. Here is a typical sequence:
aOptionFile | path to the option file |
Omicron::~Omicron | ( | void | ) | [virtual] |
Destructor of the Omicron class.
int Omicron::Condition | ( | const int | aInVectSize, | |
double * | aInVect | |||
) |
Conditions a data vector.
Before projecting the data onto the tiles, the data are conditioned with this function. The input data chunk is first resampled and highpassed. If requested in the option file, software injection waveforms are added to the data vector. Then the data is used to estimate the noise (PSD). Finally, the data subsegments in the chunk are Tukey-windowed, Fourier-transformed and normalized by the ASD.
IMPORTANT: The input vector size MUST MATCH the current chunk size loaded with NewChunk(). NO check is performed against that!
If the returned value is negative, it means that a fatal error occured and the Omicron object got corrupted. If it is positive, it means that the conditioning failed but the Omicron object is still valid for further use. If it is 0, the conditioning ended correctly. The error code is the following:
aInVectSize | input vector size | |
aInVect | input data vector (time domain) |
vector<string> Omicron::GetChannels | ( | void | ) | [inline] |
Returns list of channels.
int Omicron::GetChunkDuration | ( | void | ) | [inline] |
Returns chunk duration [s].
int Omicron::GetOverlapDuration | ( | void | ) | [inline] |
Returns overlap duration [s].
int Omicron::GetSampleFrequency | ( | void | ) | [inline] |
Returns working sampling frequency [Hz].
int Omicron::GetSegmentDuration | ( | void | ) | [inline] |
Returns segment/block duration [s].
bool Omicron::GetStatus | ( | void | ) | [inline] |
Returns class status.
Segments * Omicron::GetTriggerSegments | ( | TH1D * | aThr = NULL , |
|
const double | aInfValue = 1e20 | |||
) |
Returns the segments associated to the trigger time coverage.
See Triggers::GetTriggerSegments().
NOTE: This function should be called somewhere after Project() and before WriteOutput() while the triggers are present in memory.
aThr | threshold object | |
aInfValue | value above which the threshold is considered infinite |
int Omicron::GetVerbosity | ( | void | ) | [inline] |
Returns verbosity level.
string Omicron::GetVersion | ( | void | ) | [inline] |
Returns Omicron version.
bool Omicron::InitSegments | ( | Segments * | aSeg, | |
const double | aTimeOffset = 0.0 | |||
) |
Initializes the segments to process.
This function should always be called before any type of processing. This function can also be used to introduce a time offset (for graphical plots only!).
WARNING: the input Segments object is not copied, only the pointer is used. This means that the Segments structure pointed by aSeg should not be modified or deleted before the end of the processing.
aSeg | pointer to the input Segments structure | |
aTimeOffset | time offset to define a new time origin for the graphical plots |
bool Omicron::LoadData | ( | double ** | aDataVector, | |
int * | aSize | |||
) |
Loads a data vector.
The data vector of the current channel and the current chunk is loaded. If requested in the option file, the injection channel is added to the vector. This function loads the data from the frames listed in the FFL. The FFL option is therefore mandatory to use this function. It is the user's responsibility to delete the returned data vector.
If this function fails, a pointer to NULL is returned.
aDataVector | pointer to the data vector | |
aSize | sample size of the data vector |
bool Omicron::MakeDirectories | ( | const int | aId = 0 |
) |
Creates a specific directory tree for the output.
Two directory structures are possible:
where [path_to_outdir] is the output directory specified by the user in the option file and [channel_name] is the channel name being processed.
The GPS value is rounded to the ms digit.
If this function is never called, all the output is dumped in the output directory specified by the user in the option file.
aId | directory id |
bool Omicron::NewChannel | ( | void | ) |
Loads a new channel.
The channels defined in the option file are loaded incrementally. If this function is called after the last channel, false is returned and the channel sequence is reset: the next call will load the first channel again.
bool Omicron::NewChunk | ( | void | ) |
Loads a new chunk.
The chunks are loaded following the time structure defined in the option file and the Segments object defined with InitSegments(). When there is not enough data to fill one chunk (end of a segment), the chunk duration is shortened as explained in Odata. This function should be called iteratively to cover the full data set. The segmentation procedure is detailed in Odata. The returned value indicates the status of this operation:
void Omicron::PrintMessage | ( | const string | aMessage | ) |
Prints a formatted message with a timer.
aMessage | message to print |
void Omicron::PrintStatusInfo | ( | void | ) |
Prints a progress report of the processing.
bool Omicron::Project | ( | void | ) |
Projects whitened data onto the tiles and fills output structures.
The data vector is subdivided into subsegments. Subsegments are Tukey-windowed, Fourier-transformed and normalized by the ASD. Finally, sub-segments are projected onto the tiling structure.
In this function, the trigger structure is also filled with tiles above SNR threshold. If requested, the maps are written to disk.
bool Omicron::WriteOutput | ( | void | ) |
Writes output to disk.
The output data products selected by the user in the option file are written to disk.
Note that maps are written in the Project() function as they are built at the segment scale, not at the chunk scale.