Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Types | Public Member Functions | List of all members
ska::cheetah::data::SpCandidate< Arch, T > Class Template Reference

A simple record to hold 'candidate' proprerties. More...

#include <cheetah/data/SpCandidate.h>

Inheritance diagram for ska::cheetah::data::SpCandidate< Arch, T >:
Inheritance graph
Collaboration diagram for ska::cheetah::data::SpCandidate< Arch, T >:
Collaboration graph

Public Types

typedef T NumericalRep
 
typedef DedispersionMeasureType< NumericalRep > Dm
 
typedef boost::units::quantity< MilliSeconds, double > MsecTimeType
 
typedef MsecTimeType Width
 
typedef pss::astrotypes::units::ModifiedJulianClock::time_point TimePointType
 
typedef T SigmaType
 
typedef boost::units::quantity< MegaHertz, double > FrequencyType
 

Public Member Functions

 SpCandidate ()
 Create a zero-sized SpCandidate.
 
 SpCandidate (Dm dm, MsecTimeType tstart, MsecTimeType width, T sigma, std::size_t ident=0)
 Construct a defined size SpCandidate object. tend is set to tstart. More...
 
 SpCandidate (Dm dm, MsecTimeType tstart, MsecTimeType width, MsecTimeType tend, T sigma, std::size_t ident=0)
 Construct a defined size SpCandidate object. tend is set to tstart. More...
 
 SpCandidate (Dm dm, MsecTimeType tstart, MsecTimeType width, T sigma, FrequencyType low, FrequencyType high, std::size_t ident=0)
 Constructor to set all params calculating the end time from the dm and frequency values supplied. More...
 
 ~SpCandidate ()
 destroy a SpCandidate
 
MsecTimeType const & tstart () const
 Get the start time of the candidate. More...
 
void tstart (MsecTimeType c_tstart)
 Set the candidate tstart. More...
 
MsecTimeType const & tend () const
 Get the end time. More...
 
void tend (MsecTimeType)
 
void duration_end (MsecTimeType c_tend)
 Set the end time The end time is calculated based on the DM of the candidate and the start and end frequency of the TF block.
 
void dm_with_duration_end (FrequencyType const &f_high, FrequencyType const &f_low, Dm const &dm)
 Set the end time : This step is important as the DM will be set along with the end time.
 
Dm const & dm () const
 access a reference to dm. More...
 
MsecTimeType const & width () const
 access a reference to width. More...
 
void width (MsecTimeType c_width)
 set the candidate width value. More...
 
T const & sigma () const
 access a reference to _sigma. More...
 
void sigma (T c_sigma)
 Set the candidate _sigma value. More...
 
std::size_t const & ident () const
 access a reference to ident. More...
 
void ident (std::size_t c_ident)
 set the candidate ident value. More...
 

Detailed Description

template<typename Arch, typename T>
class ska::cheetah::data::SpCandidate< Arch, T >

A simple record to hold 'candidate' proprerties.

A collection of values which hold the 'candidate' proprerties to be used in more complex vector-type classes

Template Parameters
Tthe underlying data representation (double, float uin8_t, etc) for the Dedispersion measure, sigma and pulse_pdot.

Most data are double type.

Definition at line 58 of file SpCandidate.h.

Constructor & Destructor Documentation

◆ SpCandidate() [1/3]

template<typename Arch, typename T>
ska::cheetah::data::SpCandidate< Arch, T >::SpCandidate ( Dm  dm,
MsecTimeType  tstart,
MsecTimeType  width,
sigma,
std::size_t  ident = 0 
)

Construct a defined size SpCandidate object. tend is set to tstart.

Parameters
dm= estimated/computed dispersion measure
tstart= relative time since start of block of data searched (TODO: Decide whether this should be a time point type)
width= estimated/computed pulse width of the candidate
sigma= estimated significance of the candidate (is this significance or S/N)
ident= candidate identifier, to be held constant along pipeline (debug tracing)

◆ SpCandidate() [2/3]

template<typename Arch, typename T>
ska::cheetah::data::SpCandidate< Arch, T >::SpCandidate ( Dm  dm,
MsecTimeType  tstart,
MsecTimeType  width,
MsecTimeType  tend,
sigma,
std::size_t  ident = 0 
)

Construct a defined size SpCandidate object. tend is set to tstart.

Parameters
dm= estimated/computed dispersion measure
tstart= relative time since start of block of data searched (TODO: Decide whether this should be a time point type)
width= estimated/computed pulse width of the candidate
tend= relative time since start of block of data searched (end of pulse)
sigma= estimated significance of the candidate (is this significance or S/N)
ident= candidate identifier, to be held constant along pipeline (debug tracing)

◆ SpCandidate() [3/3]

template<typename Arch, typename T>
ska::cheetah::data::SpCandidate< Arch, T >::SpCandidate ( Dm  dm,
MsecTimeType  tstart,
MsecTimeType  width,
sigma,
FrequencyType  low,
FrequencyType  high,
std::size_t  ident = 0 
)

Constructor to set all params calculating the end time from the dm and frequency values supplied.

Parameters
dm= estimated/computed dispersion measure
tstart= relative time since start of block of data searched (TODO: Decide whether this should be a time point type)
width= estimated/computed pulse width of the candidate
sigma= estimated significance of the candidate (is this significance or S/N)
low= lowest frequency channel
high= highest frequency channel

Member Function Documentation

◆ dm()

template<typename Arch , typename T >
SpCandidate< Arch, T >::Dm const & ska::cheetah::data::SpCandidate< Arch, T >::dm ( ) const

access a reference to dm.

The dispersion measure is a measure on how much interstellar electrons disperse the pulsar's signal causing lower observing frequencies to arrive later than higher observing frequencies. It express electon column density so its units are pc cm-3.

Returns
The candidate dispersion measure in pc cm-3

Definition at line 114 of file SpCandidate.cpp.

115 {
116  return this->_dm;
117 }

◆ ident() [1/2]

template<typename Arch , typename T >
std::size_t const & ska::cheetah::data::SpCandidate< Arch, T >::ident ( ) const

access a reference to ident.

ident is an optional identifier label to let follow the trail of a specific candidate across different modules.

Returns
The candidate ID number.

Definition at line 146 of file SpCandidate.cpp.

147 {
148  return (this->_ident);
149 }

◆ ident() [2/2]

template<typename Arch , typename T >
void ska::cheetah::data::SpCandidate< Arch, T >::ident ( std::size_t  c_ident)

set the candidate ident value.

ident is an optional identifier label to let follow the trail of a specific candidate across different modules.

Parameters
[in]c_identthe candidate ID number

Definition at line 152 of file SpCandidate.cpp.

153 {
154  this->_ident = c_ident;
155 }

◆ sigma() [1/2]

template<typename Arch , typename T >
T const & ska::cheetah::data::SpCandidate< Arch, T >::sigma ( ) const

access a reference to _sigma.

_sigma is the computed significance of the candidate. Here we assume the use of Gaussian equivalent significance that maps p-values to the corresponding sigma (standard deviation) that they would represent were the p-values drawn from a normal distribution of zero mean and unit variance.

Returns
The candidate signal-to-noise ratio.

Definition at line 134 of file SpCandidate.cpp.

135 {
136  return this->_sigma;
137 }

◆ sigma() [2/2]

template<typename Arch , typename T >
void ska::cheetah::data::SpCandidate< Arch, T >::sigma ( c_sigma)

Set the candidate _sigma value.

_sigma is the computed significance of the candidate. Here we assume the use of Gaussian equivalent significance that maps p-values to the corresponding sigma (standard deviation) that they would represent were the p-values drawn from a normal distribution of zero mean and unit variance.

Parameters
[in]c_sigmathe candidate signal-to-noise ratio

Definition at line 140 of file SpCandidate.cpp.

141 {
142  this->_sigma = c_sigma;
143 }

◆ tend()

template<typename Arch , typename T >
SpCandidate< Arch, T >::MsecTimeType const & ska::cheetah::data::SpCandidate< Arch, T >::tend ( ) const

Get the end time.

Returns
The candidate end time in milliseconds since the start of the searched block

Definition at line 86 of file SpCandidate.cpp.

87 {
88  return this->_tend;
89 }

◆ tstart() [1/2]

template<typename Arch , typename T >
SpCandidate< Arch, T >::MsecTimeType const & ska::cheetah::data::SpCandidate< Arch, T >::tstart ( ) const

Get the start time of the candidate.

Returns
The candidate start time in milliseconds since the start of the searched block.

Definition at line 74 of file SpCandidate.cpp.

75 {
76  return this->_tstart;
77 }

◆ tstart() [2/2]

template<typename Arch, typename T>
void ska::cheetah::data::SpCandidate< Arch, T >::tstart ( MsecTimeType  c_tstart)

Set the candidate tstart.

Parameters
[in]c_tstartthe candidate start time in milliseconds since the start of the searched block.

◆ width() [1/2]

template<typename Arch , typename T >
SpCandidate< Arch, T >::MsecTimeType const & ska::cheetah::data::SpCandidate< Arch, T >::width ( ) const

access a reference to width.

width is the duration pulse, expressed in milliseconds.

Returns
The candidate pulse width in msec.

Definition at line 121 of file SpCandidate.cpp.

122 {
123  return this->_width;
124 }

◆ width() [2/2]

template<typename Arch, typename T>
void ska::cheetah::data::SpCandidate< Arch, T >::width ( MsecTimeType  c_width)

set the candidate width value.

width is the duration pulse, expressed in milliseconds.

Parameters
[in]c_widththe candidate pulse width in msec.

The documentation for this class was generated from the following files: