AA-ALERT RFIm
Classes | Typedefs | Enumerations | Functions
RFIm Namespace Reference

Classes

class  RFImConfig
 RFI specific kernel configuration. More...
 

Typedefs

using RFImConfigurations = std::map< std::string, std::map< unsigned int, std::map< float, RFImConfig * > * > * >
 

Enumerations

enum  RFImKernel { TimeDomainSigmaCut, FrequencyDomainSigmaCut }
 The kernel type. More...
 
enum  DataOrdering { FrequencyTime, TimeFrequency }
 Ordering of input/output data. More...
 
enum  ReplacementStrategy { ReplaceWithMean, ReplaceWithMedian }
 Strategy for flagged data replacement. More...
 

Functions

void readRFImConfig (RFImConfigurations &configurations, const std::string &filename)
 Read one RFImConfig from a configuration file. More...
 
void readSigmaSteps (const std::string &inputFilename, std::vector< float > &steps)
 Read the. More...
 
template<typename DataType >
std::uint64_t timeDomainSigmaCut (const bool subbandDedispersion, const DataOrdering &ordering, const ReplacementStrategy &replacement, const AstroData::Observation &observation, std::vector< DataType > &time_series, const float sigmaCut, const unsigned int padding)
 Compute time domain sigma cut. Not optimized, just for testing purpose. More...
 
template<typename DataType >
std::string * getTimeDomainSigmaCutOpenCL (const RFImConfig &config, const DataOrdering &ordering, const ReplacementStrategy &replacement, const std::string &dataTypeName, const AstroData::Observation &observation, const float sigmaCut, const unsigned int padding)
 Generates the OpenCL code for the time domain sigma cut. More...
 
template<typename DataType >
std::string * getTimeDomainSigmaCutOpenCL_FrequencyTime_ReplaceWithMean (const RFImConfig &config, const std::string &dataTypeName, const AstroData::Observation &observation, const float sigmaCut, const unsigned int padding)
 Generates the OpenCL code for the time domain sigma cut. This function generates specialized code for the case in which the input is FrequencyTime ordered and flagged samples are replaced with the mean. More...
 
template<typename DataType >
void testTimeDomainSigmaCut (const bool printCode, const bool printResults, const RFImConfig &config, const DataOrdering &ordering, const ReplacementStrategy &replacement, const std::string &dataTypeName, const AstroData::Observation &observation, const std::vector< DataType > &time_series, isa::OpenCL::OpenCLRunTime &openCLRunTime, const unsigned int clDeviceID, const float sigmaCut, const unsigned int padding)
 Test the OpenCL kernel by comparing results with C++ implementation. More...
 
template<typename DataType >
void tuneTimeDomainSigmaCut (const bool subbandDedispersion, const isa::OpenCL::TuningParameters &parameters, const DataOrdering &ordering, const ReplacementStrategy &replacement, const std::string &dataTypeName, const AstroData::Observation &observation, const std::vector< DataType > &time_series, const unsigned int clPlatformID, const unsigned int clDeviceID, const float sigmaCut, const unsigned int padding)
 Tune the OpenCL kernel to find best performing configuration for a certain scenario. More...
 
template<typename DataType >
std::uint64_t frequencyDomainSigmaCut (const bool subbandDedispersion, const DataOrdering &ordering, const ReplacementStrategy &replacement, const AstroData::Observation &observation, std::vector< DataType > &time_series, const unsigned int nrBins, const float sigmaCut, const unsigned int padding)
 Compute frequency domain sigma cut. Not optimized, just for testing purpose. More...
 
template<typename DataType >
std::string * getFrequencyDomainSigmaCutOpenCL (const RFImConfig &config, const DataOrdering &ordering, const ReplacementStrategy &replacement, const std::string &dataTypeName, const AstroData::Observation &observation, const unsigned int nrBins, const float sigmaCut, const unsigned int padding)
 Generates the OpenCL code for the frequency domain sigma cut. More...
 
template<typename DataType >
std::string * getFrequencyDomainSigmaCutOpenCL_FrequencyTime_ReplaceWithMean (const RFImConfig &config, const std::string &dataTypeName, const AstroData::Observation &observation, const unsigned int nrBins, const float sigmaCut, const unsigned int padding)
 Generates the OpenCL code for the frequency domain sigma cut. This function generates specialized code for the case in which the input is FrequencyTime ordered and flagged samples are replaced with the mean. More...
 
template<typename DataType >
void testFrequencyDomainSigmaCut (const bool printCode, const bool printResults, const RFImConfig &config, const DataOrdering &ordering, const ReplacementStrategy &replacement, const std::string &dataTypeName, const AstroData::Observation &observation, const std::vector< DataType > &time_series, isa::OpenCL::OpenCLRunTime &openCLRunTime, const unsigned int clDeviceID, const unsigned int nrBins, const float sigmaCut, const unsigned int padding)
 Test the OpenCL kernel by comparing results with C++ implementation. More...
 
template<typename DataType >
void tuneFrequencyDomainSigmaCut (const bool subbandDedispersion, const isa::OpenCL::TuningParameters &parameters, const DataOrdering &ordering, const ReplacementStrategy &replacement, const std::string &dataTypeName, const AstroData::Observation &observation, const std::vector< DataType > &time_series, const unsigned int clPlatformID, const unsigned int clDeviceID, const unsigned int nrBins, const float sigmaCut, const unsigned int padding)
 Tune the OpenCL kernel to find best performing configuration for a certain scenario. More...
 

Typedef Documentation

◆ RFImConfigurations

using RFIm::RFImConfigurations = typedef std::map<std::string, std::map<unsigned int, std::map<float, RFImConfig *> *> *>

Enumeration Type Documentation

◆ DataOrdering

Ordering of input/output data.

Enumerator
FrequencyTime 
TimeFrequency 

◆ ReplacementStrategy

Strategy for flagged data replacement.

Enumerator
ReplaceWithMean 
ReplaceWithMedian 

◆ RFImKernel

The kernel type.

Enumerator
TimeDomainSigmaCut 
FrequencyDomainSigmaCut 

Function Documentation

◆ frequencyDomainSigmaCut()

template<typename DataType >
std::uint64_t RFIm::frequencyDomainSigmaCut ( const bool  subbandDedispersion,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const AstroData::Observation &  observation,
std::vector< DataType > &  time_series,
const unsigned int  nrBins,
const float  sigmaCut,
const unsigned int  padding 
)

Compute frequency domain sigma cut. Not optimized, just for testing purpose.

Parameters
subbandDedispersionTrue if using subband dedispersion.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
observationThe observation object.
time_seriesThe input data.
nrBinsThe number of bins for the bandpass.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.
Returns
The number of replaced samples.

◆ getFrequencyDomainSigmaCutOpenCL()

template<typename DataType >
std::string * RFIm::getFrequencyDomainSigmaCutOpenCL ( const RFImConfig config,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const unsigned int  nrBins,
const float  sigmaCut,
const unsigned int  padding 
)

Generates the OpenCL code for the frequency domain sigma cut.

Parameters
configThe kernel configuration.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
dataTypeNameThe name of the input data type.
observationThe observation object.
nrBinsThe number of bins for the bandpass.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.
Returns
String containing the generated code.

◆ getFrequencyDomainSigmaCutOpenCL_FrequencyTime_ReplaceWithMean()

template<typename DataType >
std::string * RFIm::getFrequencyDomainSigmaCutOpenCL_FrequencyTime_ReplaceWithMean ( const RFImConfig config,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const unsigned int  nrBins,
const float  sigmaCut,
const unsigned int  padding 
)

Generates the OpenCL code for the frequency domain sigma cut. This function generates specialized code for the case in which the input is FrequencyTime ordered and flagged samples are replaced with the mean.

Parameters
configThe kernel configuration.
dataTypeNameThe name of the input data type.
observationThe observation object.
nrBinsThe number of bins for the bandpass.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.
Returns
String containing the generated code.

◆ getTimeDomainSigmaCutOpenCL()

template<typename DataType >
std::string * RFIm::getTimeDomainSigmaCutOpenCL ( const RFImConfig config,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const float  sigmaCut,
const unsigned int  padding 
)

Generates the OpenCL code for the time domain sigma cut.

Parameters
configThe kernel configuration.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
dataTypeNameThe name of the input data type.
observationThe observation object.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.
Returns
String containing the generated code.

◆ getTimeDomainSigmaCutOpenCL_FrequencyTime_ReplaceWithMean()

template<typename DataType >
std::string * RFIm::getTimeDomainSigmaCutOpenCL_FrequencyTime_ReplaceWithMean ( const RFImConfig config,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const float  sigmaCut,
const unsigned int  padding 
)

Generates the OpenCL code for the time domain sigma cut. This function generates specialized code for the case in which the input is FrequencyTime ordered and flagged samples are replaced with the mean.

Parameters
configThe kernel configuration.
dataTypeNameThe name of the input data type.
observationThe observation object.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.
Returns
String containing the generated code.

◆ readRFImConfig()

void RFIm::readRFImConfig ( RFIm::RFImConfigurations configurations,
const std::string &  filename 
)

Read one RFImConfig from a configuration file.

Parameters
configurationsWhere to store all configurations.
filenameThe file to read the configurations from.

◆ readSigmaSteps()

void RFIm::readSigmaSteps ( const std::string &  inputFilename,
std::vector< float > &  steps 
)

Read the.

◆ testFrequencyDomainSigmaCut()

template<typename DataType >
void RFIm::testFrequencyDomainSigmaCut ( const bool  printCode,
const bool  printResults,
const RFImConfig config,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const std::vector< DataType > &  time_series,
isa::OpenCL::OpenCLRunTime &  openCLRunTime,
const unsigned int  clDeviceID,
const unsigned int  nrBins,
const float  sigmaCut,
const unsigned int  padding 
)

Test the OpenCL kernel by comparing results with C++ implementation.

Parameters
printCodeEnable generated code printing.
printResultsEnable results printing.
configThe kernel configuration.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
dataTypeNameThe name of the input data type.
observationThe observation object.
time_seriesThe input data.
openCLRunTimeThe OpenCL run time objects.
clDeviceIDThe ID of the OpenCL device to use.
nrBinsThe number of bins for the bandpass.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.

◆ testTimeDomainSigmaCut()

template<typename DataType >
void RFIm::testTimeDomainSigmaCut ( const bool  printCode,
const bool  printResults,
const RFImConfig config,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const std::vector< DataType > &  time_series,
isa::OpenCL::OpenCLRunTime &  openCLRunTime,
const unsigned int  clDeviceID,
const float  sigmaCut,
const unsigned int  padding 
)

Test the OpenCL kernel by comparing results with C++ implementation.

Parameters
printCodeEnable generated code printing.
printResultsEnable results printing.
configThe kernel configuration.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
dataTypeNameThe name of the input data type.
observationThe observation object.
time_seriesThe input data.
openCLRunTimeThe OpenCL run time objects.
clDeviceIDThe ID of the OpenCL device to use.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.

◆ timeDomainSigmaCut()

template<typename DataType >
std::uint64_t RFIm::timeDomainSigmaCut ( const bool  subbandDedispersion,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const AstroData::Observation &  observation,
std::vector< DataType > &  time_series,
const float  sigmaCut,
const unsigned int  padding 
)

Compute time domain sigma cut. Not optimized, just for testing purpose.

Parameters
subbandDedispersionTrue if using subband dedispersion.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
observationThe observation object.
time_seriesThe input data.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.
Returns
The number of replaced samples.

◆ tuneFrequencyDomainSigmaCut()

template<typename DataType >
void RFIm::tuneFrequencyDomainSigmaCut ( const bool  subbandDedispersion,
const isa::OpenCL::TuningParameters &  parameters,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const std::vector< DataType > &  time_series,
const unsigned int  clPlatformID,
const unsigned int  clDeviceID,
const unsigned int  nrBins,
const float  sigmaCut,
const unsigned int  padding 
)

Tune the OpenCL kernel to find best performing configuration for a certain scenario.

Parameters
subbandDedispersionTrue if using subband dedispersion.
parametersTuning parameters.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
dataTypeNameThe name of the input data type.
observationThe observation object.
time_seriesThe input data.
clPlatformIDThe ID of the OpenCL platform to use.
clDeviceIDThe ID of the OpenCL device to use.
nrBinsThe number of bins for the bandpass.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.

◆ tuneTimeDomainSigmaCut()

template<typename DataType >
void RFIm::tuneTimeDomainSigmaCut ( const bool  subbandDedispersion,
const isa::OpenCL::TuningParameters &  parameters,
const DataOrdering ordering,
const ReplacementStrategy replacement,
const std::string &  dataTypeName,
const AstroData::Observation &  observation,
const std::vector< DataType > &  time_series,
const unsigned int  clPlatformID,
const unsigned int  clDeviceID,
const float  sigmaCut,
const unsigned int  padding 
)

Tune the OpenCL kernel to find best performing configuration for a certain scenario.

Parameters
subbandDedispersionTrue if using subband dedispersion.
parametersTuning parameters.
orderingThe ordering of the data.
replacementThe replacement strategy for flagged samples.
dataTypeNameThe name of the input data type.
observationThe observation object.
time_seriesThe input data.
clPlatformIDThe ID of the OpenCL platform to use.
clDeviceIDThe ID of the OpenCL device to use.
sigmaCutThe threshold value for the sigma cut.
paddingThe padding, in bytes, necessary to align data to cache lines.