Loops over two dimensions of an Archive, comparing profiles. More...

#include <CompareWith.h>

Inheritance diagram for Pulsar::CompareWith:
Reference::Able Reference::HeapTracked Pulsar::CompareWithEachOther Pulsar::CompareWithSum

Public Member Functions

void set_statistic (BinaryStatistic *)
void set_data (HasArchive *)
void set_setup_data (const Archive *)
 Use to compute the covariance matrix before an fscrunch or tscrunch.
void set_bscrunch (const ScrunchFactor &f)
 Compute covariance matrix from bscrunched clone of data.
const ScrunchFactor get_bscrunch () const
 Get the phase bin scrunch factor.
bool get_setup ()
 Return true if call to set_setup_data sets anything up.
void set_transpose (bool)
void set_primary (unsigned n, void(HasArchive::*)(Index))
void set_compare (unsigned n, void(HasArchive::*)(Index))
void set_compare_all (bool flag=true)
void set_compute_mask (const std::vector< bool > &flags)
 Flags for subset of primary axis to be computed.
virtual void compute (ndArray< 2, double > &result)
void set_file (FILE *f)
 Set the file to which auxiliary data will be printed.
Public Member Functions inherited from Reference::Able
 Able (const Able &)
Ableoperator= (const Able &)
unsigned get_reference_count () const
Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
HeapTrackedoperator= (const HeapTracked &)
bool __is_on_heap () const

Protected Member Functions

virtual void setup (unsigned start_primary, unsigned nprimary=1)
 Perform an eigenanalysis and set up the generalized chi squared.
void set (ndArray< 2, double > &result, unsigned iprimary, unsigned icompare, double value)
void check ()
 Check that necessary attributes have been set.
void compute_mean (unsigned start_primary, unsigned nprimary)
 Compute the mean of the profiles to be compared.
void get_amps (std::vector< double > &amps, const Profile *profile)
 Set amps to the normalized and bscrunched profile amplitudes.
void get_residual (std::vector< double > &amps, const std::vector< double > &mamps)
 Set amps to the residual after best fit of amps to mamps.
virtual void compute (unsigned iprimary, ndArray< 2, double > &result)=0
 Compute the comparison summary for primary dimension.
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
void __dereference (bool auto_delete=true) const

Protected Attributes

Reference::To< BinaryStatisticstatistic
 Used to perform comparison.
HasArchivedata
 Interface to the Archive.
void(HasArchive::* primary )(Index)
 Pointer to the method used to loop over the primary dimension.
unsigned nprimary
void(HasArchive::* compare )(Index)
 Pointer to the method used to loop over the compare dimension.
unsigned ncompare
bool compare_all
 Compare over both dimensions.
bool model_residual
 Compute the covariance matrix of the best-fit residual.
bool use_null_space
bool transpose
 Transpose indeces when computing results.
bool setup_completed
 Set true when setup has completed.
bool is_setup
 Set true when setup has completed during set_setup_data.
Reference::To< Profilemean
Reference::To< TimeDomainCovariance > covar
ScrunchFactor bscrunch_factor
 Compute covariance matrix from bscrunched clone of data.
Reference::To< Profiletemp
 After call to get_residual, also stores residual profile amplitudes.
BinaryStatistics::ChiSquared chi
 Used to compute the residual.
std::vector< bool > compute_mask
 Flags for subset of sub-integrations to be computed.
FILE * fptr
 File to which auxiliary data will be printed.

Additional Inherited Members

Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
static void operator delete (void *location, void *ptr)
static void operator delete (void *location)
static size_t get_heap_queue_size ()

Detailed Description

Loops over two dimensions of an Archive, comparing profiles.

Uses a BinaryStatistic to compare profiles

Member Data Documentation

◆ model_residual

bool Pulsar::CompareWith::model_residual
protected

Compute the covariance matrix of the best-fit residual.

Residual after fitting scale and offset

Referenced by setup().


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

Generated using doxygen 1.14.0