Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
UCorrelator::ProbabilityMap Class Reference

Classes

struct  Params
 

Public Types

enum  OverlapMode { OVERLAP_SUM_SQRTS, OVERLAP_SQRT_SUMS, OVERLAP_SUMS, OVERLAP_MAXES }
 

Public Member Functions

 ProbabilityMap (const Params *p=0)
 
int combineWith (const ProbabilityMap &other)
 
int add (const AnitaEventSummary *sum, const Adu5Pat *pat, AnitaPol::AnitaPol_t pol, int peak=0, double weight=1, TFile *debugfile=0)
 
double computeContributions (const AnitaEventSummary *sum, const Adu5Pat *pat, AnitaPol::AnitaPol_t pol, int peak, std::vector< std::pair< int, double > > &contribution, std::vector< std::pair< int, double > > *base_contributions=0, std::vector< std::pair< int, double > > *occlusion=0, std::vector< std::pair< int, double > > *maximum_density=0, TFile *debugfile=0) const
 
double overlap (const AnitaEventSummary *sum, const Adu5Pat *pat, AnitaPol::AnitaPol_t pol, int peak=0, bool normalized=false, double weight=1, std::vector< std::pair< int, double > > *bases=0, OverlapMode mode=OVERLAP_SUM_SQRTS, bool remove_self_contribution=true, std::vector< std::pair< int, double > > *segments=0, std::vector< std::pair< int, double > > *max_dens=0, double *inv_two_pi_sqrt_det=0) const
 
double getProbSumsIntegral (bool normalizd=false) const
 
const double * getProbSums (bool normalized=false) const
 
const double * getProbSumsWithoutBases (int base_level, bool normalized=false) const
 
const double * getProbSqrtSums (bool normalized=false) const
 
const double * getProbSqrtSumsWithoutBases (int base_level, bool normalized=false) const
 
const double * getProbMaxes (bool normalized=false) const
 
const double * getProbSecondMaxes (bool normalized=false) const
 
const double * getOccludedFractionSum () const
 
const int * getNAboveLevel (int level, bool normalized=false) const
 
const int * getNAboveLevelWithoutBases (int level, bool normalized=false) const
 
const double * getWgtAboveLevel (int level, bool normalized=false) const
 
const double * getWgtAboveLevelWithoutBases (int level, bool normalized=false) const
 
size_t NLevels () const
 
double getLevel (int level) const
 
const AntarcticSegmentationSchemesegmentationScheme () const
 
double maxDistance () const
 
size_t getNBases () const
 
const double * getBaseSums (bool normalized=false) const
 
const int * getBaseNAboveLevel (int level, bool normalized=false) const
 
int groupAdjacent (const double *vals_to_group, std::vector< std::vector< int > > *groups=0, double *counts=0, std::vector< double > *distribution=0) const
 
int dumpNonZeroBases () const
 
int makeMultiplicityTable (int level, bool blind=true, bool draw=false) const
 

Static Public Member Functions

static double cdf2dist (double p)
 
static double dist2cdf (double d)
 
static double get_two_pi_sqrt_det (double sigma1, double sigma2, double corr)
 
static double get_inv_two_pi_sqrt_det (double sigma1, double sigma2, double corr)
 
static double dist2dens (double dist, double inv_two_pi_sqrt_det)
 
static double dens2dist (double dens, double two_pi_sqrt_det)
 

Detailed Description

Definition at line 33 of file ProbabilityMap.h.

Inheritance diagram for UCorrelator::ProbabilityMap:
Inheritance graph
[legend]
Collaboration diagram for UCorrelator::ProbabilityMap:
Collaboration graph
[legend]

Constructor & Destructor Documentation

UCorrelator::ProbabilityMap::ProbabilityMap ( const Params p = 0)

Initialize a probability map. If you pass 0 for params, the defaults are used;

Definition at line 30 of file ProbabilityMap.cc.

Member Function Documentation

int UCorrelator::ProbabilityMap::add ( const AnitaEventSummary sum,
const Adu5Pat pat,
AnitaPol::AnitaPol_t  pol,
int  peak = 0,
double  weight = 1,
TFile *  debugfile = 0 
)

Add a point to the clustering. Returns the number of segments that had a non-zero contributions

Definition at line 64 of file ProbabilityMap.cc.

static double UCorrelator::ProbabilityMap::cdf2dist ( double  p)
inlinestatic

Conversions between integrated probability and mahalanobis_distance

Definition at line 38 of file ProbabilityMap.h.

int UCorrelator::ProbabilityMap::combineWith ( const ProbabilityMap other)

Used to combine information from various maps

Definition at line 326 of file ProbabilityMap.cc.

double UCorrelator::ProbabilityMap::computeContributions ( const AnitaEventSummary sum,
const Adu5Pat pat,
AnitaPol::AnitaPol_t  pol,
int  peak,
std::vector< std::pair< int, double > > &  contribution,
std::vector< std::pair< int, double > > *  base_contributions = 0,
std::vector< std::pair< int, double > > *  occlusion = 0,
std::vector< std::pair< int, double > > *  maximum_density = 0,
TFile *  debugfile = 0 
) const

This method actually does most of the hard work.

Some day I'll document it.

Loop over segments we need to check to see if p > cutoff

Set occluded to 0

Why not just get rid of them entirely you ask? I think the zero's might be important for calculating the integral properly. But maybe they're not. I'll look into it.

write out triangles for debugging if wanted

Definition at line 436 of file ProbabilityMap.cc.

static double UCorrelator::ProbabilityMap::dist2dens ( double  dist,
double  inv_two_pi_sqrt_det 
)
inlinestatic

Conversion between probability density and mahalanobis distance

Definition at line 45 of file ProbabilityMap.h.

int UCorrelator::ProbabilityMap::groupAdjacent ( const double *  vals_to_group,
std::vector< std::vector< int > > *  groups = 0,
double *  counts = 0,
std::vector< double > *  distribution = 0 
) const

This will take a set of of values (indexed by segment) and form groupings where all adjacent non-zero values are grouped together and the value is at all of those segments is the integral of the group (stored in counts). Optionally, will also fill a vector with the distribution of integrals.

Returns the number of groupings.

Definition at line 821 of file ProbabilityMap.cc.

double UCorrelator::ProbabilityMap::overlap ( const AnitaEventSummary sum,
const Adu5Pat pat,
AnitaPol::AnitaPol_t  pol,
int  peak = 0,
bool  normalized = false,
double  weight = 1,
std::vector< std::pair< int, double > > *  bases = 0,
OverlapMode  mode = OVERLAP_SUM_SQRTS,
bool  remove_self_contribution = true,
std::vector< std::pair< int, double > > *  segments = 0,
std::vector< std::pair< int, double > > *  max_dens = 0,
double *  inv_two_pi_sqrt_det = 0 
) const

Check the overlap of a point with the probability map. If the point is already in the probability map, remove_self_contribution should be true so that it won't count against itself. If you are checking a point not in the map already with the map, you should set it to false.

Definition at line 248 of file ProbabilityMap.cc.


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