Omicron Class Reference

Process data with the Omicron algorithm. More...

#include <Omicron.h>

Collaboration diagram for Omicron:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int Condition (const int aInVectSize, double *aInVect)
 Conditions a data vector.
bool DefineNewChunk (const int aTimeStart, const int aTimeEnd, const bool aResetPSDBuffer=false)
 Defines a new time chunk.
bool ExtractTriggers (void)
 Extract triggers above threshold.
vector< string > GetChannels (void)
 Returns list of channels.
int GetChunkDuration (void)
 Returns chunk duration [s].
int GetNTriggers (void)
 Returns the current number of triggers in memory for the current channel.
int GetOverlapDuration (void)
 Returns overlap duration [s].
int GetSampleFrequency (void)
 Returns working sampling frequency [Hz].
bool GetStatus (void)
 Returns class status.
double GetTriggerBufferLiveTime (void)
 Returns the buffer livetime for the current channel.
SegmentsGetTriggerSegments (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 *aInSeg, Segments *aOutSeg=NULL)
 Initializes the segments to process and to output.
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)
 Calls a new channel.
bool NewChunk (void)
 Calls a new time chunk.
void PrintMessage (const string aMessage)
 Prints a formatted message with a timer.
void PrintStatusInfo (void)
 Prints a progress report of the processing.
int Project (void)
 Projects whitened data onto the tiles and fills output structures.
void ResetPSDBuffer (void)
 Resets PSD buffer.
void ResetTriggerBuffer (void)
 Reset the trigger buffer.
void ResetTriggerBufferAfter (const double aTime)
 Reset the trigger buffer after a given time.
bool WriteOutput (void)
 Writes output products to disk.
string WriteTriggers (const bool aLVDirConvention=false)
 Write triggers to disk.
Constructors and destructors



 Omicron (const string aOptionFile)
 Constructor of the Omicron class.
virtual ~Omicron (void)
 Destructor of the Omicron class.

Detailed Description

Process data with the Omicron algorithm.

This class was designed to offer various methods to conduct an Omicron analysis.

Author:
Florent Robinet

Constructor & Destructor Documentation

Omicron::Omicron ( const string  aOptionFile  ) 

Constructor of the Omicron class.

This constructor initializes all the components to run Omicron: data structures, data streams, spectra, tiling, maps, 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:

  • InitSegments() defines the data segments to process.
  • MakeDirectories() creates a specific directory structure for the output (optional).
  • NewChunk() loads a new chunk of data (loop #1).
  • NewChannel() loads a new channel (loop #2).
  • LoadData() loads the data vector for this chunk and this channel from FFL file (in loop #1/2)
  • Condition() conditions data vector (in loop #1/2)
  • Project() projects data onto the tiles (in loop #1/2)
  • WriteOutput() writes output data products to disk (in loop #1/2)
    Parameters:
    aOptionFile path to the option file
Omicron::~Omicron ( void   )  [virtual]

Destructor of the Omicron class.


Member Function Documentation

int Omicron::Condition ( const int  aInVectSize,
double *  aInVect 
)

Conditions a data vector.

Before projecting the data onto the tiles, the data is conditioned and whitened with this function. The input data chunk is first removed its DC component, then resampled, optionally highpassed, Tukey-windowed, Fourier-transformed and whitened twice. In this process, the conditioned data vector is used to update the estimate of the noise power density (PSD).

IMPORTANT: The input vector size MUST MATCH the 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:

  • -1 = the Omicron object is corrupted.
  • 0 = OK
  • 1 = the input vector is pointing to NULL
  • 2 = the input vector size is 0
  • 3 = the native sampling frequency cannot be updated
  • 4 = the vector transformation failed (DC removal+resampling+highpassing)
  • 5 = the spectrum (1) is not available
  • 6 = the chunk data could not be FFTed (forward)
  • 7 = the spectrum (2) is not available
  • 8 = the tiling power could not be computed
    Parameters:
    aInVectSize input vector size
    aInVect input data vector (time domain)
bool Omicron::DefineNewChunk ( const int  aTimeStart,
const int  aTimeEnd,
const bool  aResetPSDBuffer = false 
)

Defines a new time chunk.

Instead of defining a list of input segments (see InitSegments()) and processing sequentially the data (see NewChunk()), it is possible to define any time chunk.

Optionally, it is possible to reset the PSD buffer (for all channels).

The chunk duration must match the one defined in the option file.

Parameters:
aTimeStart GPS start time of the chunk
aTimeEnd GPS end time of the chunk
aResetPSDBuffer flag to reset the PSD buffers
bool Omicron::ExtractTriggers ( void   ) 

Extract triggers above threshold.

Triggers are saved one Q plane at a time. After each Q plane, the number of triggers is checked. If it exceeds a given maximal rate, defined in the user parameter file, false is returned and the next Q planes are not searched for (see also Otile::SaveTriggers()). All triggers are reset.

Parameters:
aRateMax maximum trigger rate [Hz]
vector< string > Omicron::GetChannels ( void   ) 

Returns list of channels.

int Omicron::GetChunkDuration ( void   )  [inline]

Returns chunk duration [s].

int Omicron::GetNTriggers ( void   )  [inline]

Returns the current number of triggers in memory for the current channel.

int Omicron::GetOverlapDuration ( void   )  [inline]

Returns overlap duration [s].

int Omicron::GetSampleFrequency ( void   )  [inline]

Returns working sampling frequency [Hz].

bool Omicron::GetStatus ( void   )  [inline]

Returns class status.

double Omicron::GetTriggerBufferLiveTime ( void   )  [inline]

Returns the buffer livetime for the current channel.

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.

Parameters:
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 aInSeg,
Segments aOutSeg = NULL 
)

Initializes the segments to process and to output.

This function should always be called before any type of processing. Use NewChunk() to sequence the Omicron analysis.

Optionally, output segments (for triggers only!) can be specified. If so, triggers outside the output segments will not be saved. Use a pointer to NULL to not use this option.

Parameters:
aInSeg pointer to the input Segments structure
aOutSeg pointer to the output Segments structure
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 stream and the software injections are added to the data 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.

Parameters:
aDataVector pointer to the returned data vector
aSize sample size of the return ed data vector
bool Omicron::MakeDirectories ( const int  aId = 0  ) 

Creates a specific directory tree for the output.

Two directory structures are possible:

  • [path_to_outdir]/aId/[channel_name] if aId is not 0
  • [path_to_outdir]/[channel_name] if aId is 0

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.

Parameters:
aId directory id
bool Omicron::NewChannel ( void   ) 

Calls a new channel.

The channels defined in the option file are called incrementally. If this function is called after the last channel, false is returned and the channel sequence is reset: the next call will call the first channel again.

bool Omicron::NewChunk ( void   ) 

Calls a new time chunk.

The time chunks are called following the time sequence defined by the Otile class. The returned value indicates the status of this operation:

  • true : a new time chunk has been successfully called
  • false : no more chunk to load
void Omicron::PrintMessage ( const string  aMessage  ) 

Prints a formatted message with a timer.

Parameters:
aMessage message to print
void Omicron::PrintStatusInfo ( void   ) 

Prints a progress report of the processing.

int Omicron::Project ( void   ) 

Projects whitened data onto the tiles and fills output structures.

The data are projected onto the tiling structure. The number of tiles above threshold is returned. -1 is returned if this function fails.

void Omicron::ResetPSDBuffer ( void   )  [inline]

Resets PSD buffer.

(for the current channel)

void Omicron::ResetTriggerBuffer ( void   )  [inline]

Reset the trigger buffer.

void Omicron::ResetTriggerBufferAfter ( const double  aTime  )  [inline]

Reset the trigger buffer after a given time.

The time value must be aligned with the chunk starts: only chunks can be purged.

Parameters:
aTime time after which triggers are removed
bool Omicron::WriteOutput ( void   ) 

Writes output products to disk.

The output data products selected by the user in the option file and for the current chunk/channel are written to disk.

string Omicron::WriteTriggers ( const bool  aLVDirConvention = false  ) 

Write triggers to disk.

All triggers collected until now are saved to disk. This function returns the trigger file path. "none" is returned if this function fails.

Optionally, the trigger files can be saved in a directory structure defined by a LIGO-virgo convention: [main dir]/[IFO prefix]/[channel]_OMICRON/

Parameters:
aLVDirConvention set to true to apply the LIGO trigger path convention

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines

Generated on 29 Sep 2016 by  doxygen 1.6.1