Examines profile shape variation with principal components analysis. More...

#include <ProfilePCA.h>

Inheritance diagram for Pulsar::ProfilePCA:
Pulsar::Algorithm Reference::Able Reference::HeapTracked

Public Member Functions

 ProfilePCA ()
 Default constructor.
 
 ~ProfilePCA ()
 Destructor.
 
void set_nharm_pca (unsigned nharm)
 Set the number of harmonics to use for PCA.
 
void set_nharm_cov (unsigned nharm)
 Set the number of harmonics store in cov matrix.
 
unsigned get_nharm_pca ()
 Get the number of harmonics currently in use.
 
unsigned get_nharm_cov ()
 Get the number of harmonics currently stored.
 
void reset ()
 Reset sums to zero.
 
void add_Profile (const Profile *p)
 Adds the given Profile to the analysis.
 
void add_Integration (const Integration *i)
 Adds all Profiles in the given Integration to the analysis.
 
void compute ()
 Compute principal components.
 
double get_cov_value (unsigned i, unsigned j)
 Return i,j cov matrix entry.
 
double get_pc_value (unsigned i)
 Return i-th largest PC value (eigenvalue).
 
Profileget_pc_vector (int i, unsigned nbin)
 Return i-th largest PC vector (eigenvector) as Profile.
 
std::vector< double > decompose (const Profile *p, unsigned n_pc)
 Decompose given Profile using first n_pc PCs.
 
void unload (const std::string &filename)
 Unload the PCA results to a file.
 
- 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
 

Static Public Member Functions

static ProfilePCAload (const std::string &filename)
 Load PCA results from a file.
 
- 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 ()
 

Protected Attributes

unsigned nharm_cov
 Number of harmonics to store.
 
unsigned nharm_pca
 Number of harmonics to store.
 
double * cov
 Current covariance matrix.
 
double * mean
 Current mean profile.
 
unsigned nprof
 Total number of profiles added.
 
double wt_sum
 Sum of weights.
 
double wt2_sum
 Sum of squared weights.
 
std::vector< double > pc_values
 Principal component values (eigenvalues)
 
double * pc_vectors
 Principal component vectors (eigenvectors)
 

Additional Inherited Members

- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Detailed Description

Examines profile shape variation with principal components analysis.


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

Generated using doxygen 1.8.17