![]() |
A class to take in UsefulAnitaEvents and get interferometric maps with a single function. More...
#include <CrossCorrelator.h>
Classes | |
struct | threadArgs |
Container required to get threading to work inside a class, includes the thread index and the pointer to the class. More... | |
Public Types | |
enum | mapMode_t { kGlobal, kTriggered, kNumMapModes } |
Flag to pass to CrossCorrelator when making a map telling it whether to use all phi-sectors or triggered phi-sectors. | |
enum | zoomMode_t { kZoomedOut, kZoomedIn, kNumZoomModes } |
Flag to pass to CrossCorrelator when making a map telling it whether to reconstruct all arrival directions or a finer binned close up of a particular region. | |
Public Member Functions | |
CrossCorrelator () | |
Constructor. | |
~CrossCorrelator () | |
Destructor. | |
void | initializeVariables () |
Workhorse function to set internal variables. | |
void | printInfo () |
Prints some summary information about the CrossCorrelator to stdout. | |
void | getNormalizedInterpolatedTGraphs (UsefulAnitaEvent *realEvent, AnitaPol::AnitaPol_t pol) |
Makes evenly re-sampled, normalized waveform graphs from the UsefulAnitaEvent. More... | |
void | simple260MHzSatelliteNotch (AnitaPol::AnitaPol_t pol, Int_t ant) |
Applies a 52MHz wide notch centered at 260 MHz to filter the most problematic satellite frequency. More... | |
void | simple370MHzSatelliteNotch (AnitaPol::AnitaPol_t pol, Int_t ant) |
Applies a 40MHz wide notch centered at 370 MHz to filter another satellite frequency. More... | |
void | simpleNotch (AnitaPol::AnitaPol_t pol, Int_t ant, Double_t notchLowEdgeMHz, Double_t notchHighEdgeMHz) |
Applies a simple notch between the given frequencies. More... | |
void | renormalizeFourierDomain (AnitaPol::AnitaPol_t pol, Int_t ant) |
Scales the fft such that the inverse fft would have mean=0 and rms=1. For use after notching. More... | |
TGraph * | interpolateWithStartTimeAndZeroMean (TGraph *grIn, Double_t startTime, Double_t dt, Int_t nSamp) |
Creates an interpolated TGraph with zero mean. More... | |
void | doFFTs (AnitaPol::AnitaPol_t pol) |
Takes FFTs of the normalized, evenly resampled waveforms and puts them in memory. More... | |
void | correlateEvent (UsefulAnitaEvent *realEvent) |
Correlate the event. More... | |
void | correlateEvent (UsefulAnitaEvent *realEvent, AnitaPol::AnitaPol_t pol) |
Correlate the event. More... | |
void | reconstructEvent (UsefulAnitaEvent *usefulEvent, Int_t numFinePeaks=MAX_NUM_PEAKS, Int_t numCoarsePeaks=MAX_NUM_PEAKS) |
Reconstruct event. More... | |
void | findPeakValues (AnitaPol::AnitaPol_t pol, Int_t numPeaks, Double_t *peakValues, Double_t *phiDegs, Double_t *thetaDegs) |
Goes through the coarseMap and finds the top N values. More... | |
void | getMaxCorrelationTimeValue (AnitaPol::AnitaPol_t pol, Int_t combo, Double_t &time, Double_t &value) |
Get the maximum correlation time and value from a polarization and antenna combo index. More... | |
void | getMaxCorrelationTimeValue (AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2, Double_t &time, Double_t &value) |
Get the maximum correlation time and value from a polarization and pair of antennas. More... | |
void | getMaxUpsampledCorrelationTimeValue (AnitaPol::AnitaPol_t pol, Int_t combo, Double_t &time, Double_t &value) |
Get the maximum upsampled correlation time and value from a polarization and antenna combo index. More... | |
void | getMaxUpsampledCorrelationTimeValue (AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2, Double_t &time, Double_t &value) |
Get the maximum upsampled correlation time and value from a polarization and pair of antennas. More... | |
void | doAllCrossCorrelationsThreaded (AnitaPol::AnitaPol_t pol) |
Wrapper function which launches the threads for generating all the cross correlations. More... | |
void | doUpsampledCrossCorrelationsThreaded (AnitaPol::AnitaPol_t pol, Int_t phiSector) |
Static member function which generates the finely binned set of cross correlations from the FFTs held in memory. More... | |
Double_t | getDeltaTExpected (AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2, Double_t phiWave, Double_t thetaWave) |
Function to calculate the time taken by a plane wave to cross the payload. More... | |
Double_t | relativeOffAxisDelay (AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2, Double_t phiDeg) |
Get the relative off-axis delay between an antenna pair. More... | |
Double_t | singleAntennaOffAxisDelay (Double_t deltaPhiDeg) |
Get the off-axis delay for an off boresight angle. More... | |
Bool_t | useCombo (Int_t ant1, Int_t ant2, Int_t phiSector, Int_t deltaPhiSect) |
This function encodes whether a pair of antennas should be used in a particular phi sector. More... | |
void | fillCombosToUse () |
Creates vectors of antenna combo indices and puts them in the combosToUseGlobal map. | |
void | do5PhiSectorCombinatorics () |
Function to index all possible antenna pairs for use in reconstuction. More... | |
TH2D * | initializeNewCombinatorics () |
void | fillDeltaTLookup () |
Fills in an array of cached deltaTs between antenna pairs as a function of arrival direction. | |
Double_t | getBin0PhiDeg () |
Single function to get the angle of the first bin of the interferometric histogram. More... | |
void | getCoarsePeakInfo (AnitaPol::AnitaPol_t pol, Int_t peakIndex, Double_t &value, Double_t &phiDeg, Double_t &thetaDeg) |
Gets the results from the coarse reconstruction. More... | |
void | getFinePeakInfo (AnitaPol::AnitaPol_t pol, Int_t peakIndex, Double_t &value, Double_t &phiDeg, Double_t &thetaDeg) |
Gets the results from the fine reconstruction. More... | |
Double_t | getInterpolatedUpsampledCorrelationValue (AnitaPol::AnitaPol_t pol, Int_t combo, Double_t deltaT) |
Linearly interpolates between upsampled correlation points. More... | |
TH2D * | getMap (AnitaPol::AnitaPol_t pol, Double_t &peakValue, Double_t &peakPhiDeg, Double_t &peakThetaDeg, UShort_t l3TrigPattern=ALL_PHI_TRIGS) |
Gets an actual histogram of the zoomed in map. More... | |
TH2D * | getZoomMap (AnitaPol::AnitaPol_t pol) |
Gets an actual histogram of the zoomed in map. More... | |
void | reconstruct (AnitaPol::AnitaPol_t pol, Double_t &imagePeak, Double_t &peakPhiDeg, Double_t &peakThetaDeg) |
Wrapper function which launches the threaded functions, which fill the interferometric maps. More... | |
void | reconstructZoom (AnitaPol::AnitaPol_t pol, Double_t &imagePeak, Double_t &peakPhiDeg, Double_t &peakThetaDeg, Double_t zoomCenterPhiDeg=0, Double_t zoomCenterThetaDeg=0) |
Wrapper function which launches the threaded functions, which fill the zoomed maps. More... | |
TH2D * | makeGlobalImage (AnitaPol::AnitaPol_t pol, Double_t &imagePeak, Double_t &peakPhiDeg, Double_t &peakThetaDeg) |
Creates an interferometric map using plane wave deltaTs and antenna pairs from all phi-sectors. More... | |
TH2D * | makeGlobalImage (AnitaPol::AnitaPol_t pol) |
Creates an interferometric map using plane wave deltaTs and antenna pairs from all phi-sectors. More... | |
TH2D * | makeTriggeredImage (AnitaPol::AnitaPol_t pol, Double_t &imagePeak, Double_t &peakPhiDeg, Double_t &peakThetaDeg, UShort_t l3TrigPattern) |
Creates an interferometric map using plane wave deltaTs and l3Triggered pairs from all phi-sectors. More... | |
TH2D * | makeZoomedImage (AnitaPol::AnitaPol_t pol, UShort_t l3TrigPattern, Double_t zoomCenterPhiDeg, Double_t zoomCenterThetaDeg) |
Creates an interferometric map using plane wave deltaTs centered around a particular phi/theta. More... | |
TH2D * | makeZoomedImage (AnitaPol::AnitaPol_t pol, Double_t &imagePeak, Double_t &peakPhiDeg, Double_t &peakThetaDeg, UShort_t l3TrigPattern, Double_t zoomCenterPhiDeg, Double_t zoomCenterThetaDeg) |
Creates an interferometric map using plane wave deltaTs centered around a particular phi/theta. More... | |
TH2D * | makeZoomedImage (AnitaPol::AnitaPol_t pol, Double_t &imagePeak, Double_t &peakPhiDeg, Double_t &peakThetaDeg, Double_t zoomCenterPhiDeg, Double_t zoomCenterThetaDeg) |
Creates an interferometric map using plane wave deltaTs centered around a particular phi/theta. More... | |
Int_t | getPhiSectorOfAntennaClosestToPhiDeg (AnitaPol::AnitaPol_t pol, Double_t phiDeg) |
Finds the phi-sector closest to a particular phi direction. More... | |
TGraph * | makeCoherentlySummedWaveform (AnitaPol::AnitaPol_t pol, Double_t phiDeg, Double_t thetaDeg, Int_t maxDeltaPhiSect, Double_t &snr) |
Creates the coherently summed waveform from the FFTs held in memory. More... | |
TGraph * | makeUpsampledCoherentlySummedWaveform (AnitaPol::AnitaPol_t pol, Double_t phiDeg, Double_t thetaDeg, Int_t maxDeltaPhiSect, Double_t &snr) |
Creates the coherently summed waveform from the zero padded FFTs held in memory. More... | |
TGraph * | makeCoherentWorker (AnitaPol::AnitaPol_t pol, Double_t phiDeg, Double_t thetaDeg, Int_t maxDeltaPhiSect, Double_t &snr, Int_t nSamp) |
Worker function to create the coherently summed waveform from either the regular ffts or the padded ffts. More... | |
void | deleteAllWaveforms (AnitaPol::AnitaPol_t pol) |
Deletes the waveform TGraphs in memory and removes dangling pointers. More... | |
TGraph * | getCrossCorrelationGraph (AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2) |
Turns internal correlation arrays into TGraphs to be seen by humans. More... | |
TGraph * | getUpsampledCrossCorrelationGraph (AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2) |
Turns internal upsampled correlation arrays into TGraphs to be seen by humans. More... | |
TGraph * | getCrossCorrelationGraphWorker (Int_t numSamps, AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2) |
Called by wrapper functions. Turns internal correlation arrays into TGraphs to be seen by humans. More... | |
void | insertPhotogrammetryGeometry () |
Inserts the photogrammetry geometry into the CrossCorrelator internals AND the AnitaEventCalibrator internals. | |
Static Public Member Functions | |
static void * | doSomeCrossCorrelationsThreaded (void *voidPtrArgs) |
Static member function which generates the coarsely binned set of cross correlations from the FFTs held in memory. More... | |
static void * | doSomeUpsampledCrossCorrelationsThreaded (void *voidPtrArgs) |
Static member function which generates the finely binned set of cross correlations from the FFTs held in memory. More... | |
static void * | makeSomeOfImageThreaded (void *voidPtrArgs) |
Static member function which fills the interferometric maps. More... | |
static void * | makeSomeOfZoomImageThreaded (void *voidPtrArgs) |
Static member function which fills the interferometric maps. More... | |
static Int_t | directlyInsertGeometry (TString pathToLindasFile, AnitaPol::AnitaPol_t pol) |
Used to insert phase center geometry files from Linda. More... | |
Public Attributes | |
TString | mapModeNames [kNumMapModes] |
Maps text to the mapMode_t enum, used for histogram names/titles. | |
TString | zoomModeNames [kNumZoomModes] |
Maps text to the zoomMode_t enum, used for histogram names/titles. | |
Double_t | interpPreFactors [NUM_POL][NUM_COMBOS][NUM_PHI *NUM_BINS_PHI][NUM_BINS_THETA] |
The interpolation factor for neighbouring samples. | |
Int_t | offsetLows [NUM_POL][NUM_COMBOS][NUM_PHI *NUM_BINS_PHI][NUM_BINS_THETA] |
The interpolation factor for neighbouring samples. | |
Double_t | crossCorrelations [NUM_POL][NUM_COMBOS][NUM_SAMPLES *PAD_FACTOR] |
Cross correlations. | |
Double_t | coarseMap [NUM_POL][NUM_BINS_PHI *NUM_PHI][NUM_BINS_THETA] |
Internal storage for the coarsely binned map. | |
std::set< std::vector< int > >::iterator | comboSetIterator [NUM_BINS_THETA][NUM_BINS_PHI *NUM_PHI] |
Pointer to a vector of combo indices (actually an iterator over a set, but you know what I mean). | |
Double_t | partBAsZoom [NUM_POL][NUM_COMBOS][NUM_BINS_THETA_ZOOM_TOTAL] |
Yet more geometric caching. | |
Double_t | part21sZoom [NUM_POL][NUM_COMBOS][NUM_BINS_PHI_ZOOM_TOTAL] |
Yet more geometric caching. | |
Double_t | crossCorrelationsUpsampled [NUM_POL][NUM_COMBOS][NUM_SAMPLES *PAD_FACTOR *UPSAMPLE_FACTOR *PAD_FACTOR] |
Upsampled cross correlations. | |
Double_t | fineMap [NUM_POL][NUM_BINS_THETA_ZOOM][NUM_BINS_PHI_ZOOM] |
Internal storage for the finely binned map. | |
std::complex< Double_t > | fftsPadded [NUM_POL][NUM_SEAVEYS][GETNUMFREQS(NUM_SAMPLES *PAD_FACTOR *UPSAMPLE_FACTOR)] |
FFTs of evenly resampled waveforms, padded with zeros so that the inverse fourier transform is interpolated. | |
std::complex< Double_t > | ffts [NUM_POL][NUM_SEAVEYS][GETNUMFREQS(NUM_SAMPLES *PAD_FACTOR)] |
FFTs of evenly resampled waveforms. | |
TGraph * | grs [NUM_POL][NUM_SEAVEYS] |
Raw waveforms obtained from the UsefulAnitaEvent. | |
TGraph * | grsResampled [NUM_POL][NUM_SEAVEYS] |
Evenly resampled TGraphs. | |
Double_t | interpRMS [NUM_POL][NUM_SEAVEYS] |
RMS of interpolated TGraphs. | |
Double_t | interpRMS2 [NUM_POL][NUM_SEAVEYS] |
RMS of interpolated TGraphs with extra zero padding. | |
Int_t | comboIndices [NUM_SEAVEYS][NUM_SEAVEYS] |
Array mapping ant1+ant2 to combo index. | |
UInt_t | eventNumber [NUM_POL] |
For tracking event number. | |
UInt_t | lastEventNormalized [NUM_POL] |
Prevents cross-correlation of the same event twice. | |
Double_t | nominalSamplingDeltaT |
ANITA-3 => 1./2.6 ns, deltaT for evenly resampling. | |
Double_t | correlationDeltaT |
nominalSamplingDeltaT/UPSAMPLE_FACTOR, deltaT of for interpolation. | |
Int_t | numSamples |
Number of samples in waveform after padding. | |
Int_t | numSamplesUpsampled |
Number of samples in waveform after padding and up sampling. | |
Int_t | numCombos |
Number of possible antenna pairs, counted during initialization. Should equal NUM_COMBOS. | |
std::vector< Int_t > | comboToAnt1s |
Vector mapping combo index to ant1. | |
std::vector< Int_t > | comboToAnt2s |
Vector mapping combo index to ant2. | |
std::vector< Int_t > | combosToUseGlobal [NUM_PHI] |
Depends on L3 trigger for global image. | |
std::vector< Double_t > | rArray [NUM_POL] |
Vector of antenna radial positions. | |
std::vector< Double_t > | phiArrayDeg [NUM_POL] |
Vector of antenna azimuth positions. | |
std::vector< Double_t > | zArray [NUM_POL] |
Vector of antenna heights. | |
Double_t | coarseMapPeakValues [NUM_POL][MAX_NUM_PEAKS] |
Stores the peak of the interally stored map. | |
Double_t | coarseMapPeakPhiDegs [NUM_POL][MAX_NUM_PEAKS] |
Stores the peak phi (degrees) of the interally stored map. | |
Double_t | coarseMapPeakThetaDegs [NUM_POL][MAX_NUM_PEAKS] |
Stores the peak theta (degrees) of the interally stored map. | |
Double_t | fineMapPeakValues [NUM_POL][MAX_NUM_PEAKS] |
Stores the peak of the interally stored map. | |
Double_t | fineMapPeakPhiDegs [NUM_POL][MAX_NUM_PEAKS] |
Stores the peak phi (degrees) of the interally stored map. | |
Double_t | fineMapPeakThetaDegs [NUM_POL][MAX_NUM_PEAKS] |
Stores the peak theta (degrees) of the interally stored map. | |
Double_t | zoomedThetaWaves [NUM_BINS_THETA_ZOOM_TOTAL] |
Cached theta for zoomed image. | |
Double_t | zoomedTanThetaWaves [NUM_BINS_THETA_ZOOM_TOTAL] |
Cached tan(theta) for zoomed image. | |
Double_t | zoomedCosThetaWaves [NUM_BINS_THETA_ZOOM_TOTAL] |
Cached cos(theta) for zoomed image. | |
Double_t | zoomedPhiWaveLookup [NUM_BINS_PHI_ZOOM_TOTAL] |
Cached phi for zoomed image. | |
Double_t | zoomedCosPartLookup [NUM_POL][NUM_SEAVEYS][NUM_BINS_PHI_ZOOM_TOTAL] |
Cached part of the deltaT calculation. | |
Double_t | offAxisDelays [NUM_POL][NUM_COMBOS][NUM_BINS_PHI_ZOOM_TOTAL] |
Off-axis delays for fine binned images. | |
Double_t | thetaWaves [NUM_BINS_THETA] |
Cached theta for image. | |
Double_t | phiWaveLookup [NUM_BINS_PHI *NUM_PHI] |
Cached phi for image. | |
AnitaPol::AnitaPol_t | threadPol |
Polarization to use in thread functions. | |
UInt_t | threadL3TrigPattern |
l3TrigPattern to use in thread functions. | |
Int_t | threadPhiSector |
phi-sector to use in thread functions. | |
Double_t | threadImagePeak [NUM_THREADS] |
Store image peaks found by different threads. | |
Double_t | threadPeakPhiDeg [NUM_THREADS] |
Store phi of image peaks found by different threads. | |
Double_t | threadPeakThetaDeg [NUM_THREADS] |
Store theta of image peaks found by different threads. | |
std::vector< TThread * > | mapThreads |
TThreads for doing interferometric map making. | |
std::vector< TThread * > | corrThreads |
TThreads for doing cross correlations. | |
std::vector< TThread * > | upsampledCorrThreads |
TThreads for doing upsampled cross correlations. | |
Int_t | kOnlyThisCombo |
For debugging, only fill histograms with one particular antenna pair. | |
Int_t | kDeltaPhiSect |
Specifies how many phi-sectors around peak use in reconstruction. | |
Int_t | kUseOffAxisDelay |
Flag for whether or not to apply off axis delay to deltaT expected. | |
Double_t | maxDPhiDeg |
Variable for testing how wide an off axis angle is used in reconstruction. | |
Int_t | kDoSimpleSatelliteFiltering |
Does a simple 52MHz wide notch at 260 if flag is greater than 0. | |
A class to take in UsefulAnitaEvents and get interferometric maps with a single function.
Does all the heavy lifting: gets waveforms from a UsefulAnitaEvent, cross correlates them, and produces interferometric maps.
Definition at line 94 of file CrossCorrelator.h.
void CrossCorrelator::correlateEvent | ( | UsefulAnitaEvent * | usefulEvent | ) |
Correlate the event.
First step in interferometry is to pass the pointer to the UsefulAnitaEvent in here. This populates the internal arrays of normalized, interpolated waveforms and set of cross correlations. These data are then used as look up tables for generating interferometic images.
usefulEvent | is the event to process. |
Definition at line 689 of file CrossCorrelator.cxx.
void CrossCorrelator::correlateEvent | ( | UsefulAnitaEvent * | usefulEvent, |
AnitaPol::AnitaPol_t | pol | ||
) |
Correlate the event.
First step in interferometry is to pass the pointer to the UsefulAnitaEvent in here. This populates the internal arrays of normalized, interpolated waveforms and set of cross correlations. These data are then used as look up tables for generating interferometic images.
usefulEvent | is the event to process. |
pol | tells CrossCorrelator to only do this polarization. |
Definition at line 710 of file CrossCorrelator.cxx.
void CrossCorrelator::deleteAllWaveforms | ( | AnitaPol::AnitaPol_t | pol | ) |
Deletes the waveform TGraphs in memory and removes dangling pointers.
pol | is the polarization to delete. |
Definition at line 2039 of file CrossCorrelator.cxx.
|
static |
Used to insert phase center geometry files from Linda.
pathToLindasFile | is the relative path to Linda's file. |
pol | is the polarization of the channels under test. |
Definition at line 2067 of file CrossCorrelator.cxx.
void CrossCorrelator::do5PhiSectorCombinatorics | ( | ) |
Function to index all possible antenna pairs for use in reconstuction.
In order to avoid using separate regions of memory many of the interals rely on knowing NUM_COMBOS. This function counts up numCombos and expects it to equal NUM_COMBOS. This class will probably break if they are not equal (especially if numCombos > NUM_COMBOS). Prints a warning if they are not equal.
Definition at line 1185 of file CrossCorrelator.cxx.
void CrossCorrelator::doAllCrossCorrelationsThreaded | ( | AnitaPol::AnitaPol_t | pol | ) |
Wrapper function which launches the threads for generating all the cross correlations.
pol | tells CrossCorrelator to only do this polarization. |
Definition at line 736 of file CrossCorrelator.cxx.
void CrossCorrelator::doFFTs | ( | AnitaPol::AnitaPol_t | pol | ) |
Takes FFTs of the normalized, evenly resampled waveforms and puts them in memory.
pol | is which polarization to process |
Now also creates the zero padded FFTs used for upsampled cross-correlations.
Definition at line 367 of file CrossCorrelator.cxx.
|
static |
Static member function which generates the coarsely binned set of cross correlations from the FFTs held in memory.
voidPtrArgs | contains a pointer to a CrossCorrelator::threadArgs struct |
Definition at line 860 of file CrossCorrelator.cxx.
|
static |
Static member function which generates the finely binned set of cross correlations from the FFTs held in memory.
voidPtrArgs | contains a pointer to a CrossCorrelator::threadArgs struct |
Definition at line 774 of file CrossCorrelator.cxx.
void CrossCorrelator::doUpsampledCrossCorrelationsThreaded | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | phiSector | ||
) |
Static member function which generates the finely binned set of cross correlations from the FFTs held in memory.
pol | tells CrossCorrelator to only do this polarization. |
phiSector | is used to figure out which finely binned cross correlations are required. |
Definition at line 911 of file CrossCorrelator.cxx.
void CrossCorrelator::findPeakValues | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | numPeaks, | ||
Double_t * | peakValues, | ||
Double_t * | phiDegs, | ||
Double_t * | thetaDegs | ||
) |
Goes through the coarseMap and finds the top N values.
pol | is the polarization of interest. |
numPeaks | is the number of peaks you wish to find, and the assumed size arrays pointed to by the following 3 variables. |
peakValues | is a pointer to the first element of an array of length numPeaks and will be filled with the values of the coarse map at the peaks. |
phiDegs | is a pointer to the first element of an array of length numPeaks and will be filled with the values of phi (degrees relative to ADU5-aft-fore) at the peaks. |
thetaDegs | is a pointer to the first element of an array of length numPeaks and will be filled with the values of theta (degrees relative to ADU5-aft-fore) at the peaks. |
Assumes the event has been correlated and reconstructed. These peaks must be separated by the PEAK_PHI_DEG_RANGE in phi (Degrees) and PEAK_THETA_DEG_RANGE in theta (Degrees)
Definition at line 501 of file CrossCorrelator.cxx.
Double_t CrossCorrelator::getBin0PhiDeg | ( | ) |
Single function to get the angle of the first bin of the interferometric histogram.
Definition at line 128 of file CrossCorrelator.cxx.
void CrossCorrelator::getCoarsePeakInfo | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | peakIndex, | ||
Double_t & | value, | ||
Double_t & | phiDeg, | ||
Double_t & | thetaDeg | ||
) |
Gets the results from the coarse reconstruction.
pol | is the polarization of interest |
peakIndex | runs from 0 to MAX_NUM_PEAKS and indexes the peak (0 is the largest). |
value | is the bin content of the image peak. |
phiDeg | is the phi coordinate in degrees. |
thetaDeg | is the theta coordinate in degrees. |
Definition at line 623 of file CrossCorrelator.cxx.
TGraph * CrossCorrelator::getCrossCorrelationGraph | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant1, | ||
Int_t | ant2 | ||
) |
Turns internal correlation arrays into TGraphs to be seen by humans.
pol | is the polarization. |
ant1 | is the first antenna. |
ant2 | is the second antenna. |
Definition at line 2196 of file CrossCorrelator.cxx.
TGraph * CrossCorrelator::getCrossCorrelationGraphWorker | ( | Int_t | numSamps, |
AnitaPol::AnitaPol_t | pol, | ||
Int_t | ant1, | ||
Int_t | ant2 | ||
) |
Called by wrapper functions. Turns internal correlation arrays into TGraphs to be seen by humans.
numSamps | tells this function whether to use the interpolated or un-interpolated correlations. |
pol | is the polarization. |
ant1 | is the first antenna. |
ant2 | is the second antenna. |
Definition at line 2138 of file CrossCorrelator.cxx.
Double_t CrossCorrelator::getDeltaTExpected | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant1, | ||
Int_t | ant2, | ||
Double_t | phiWave, | ||
Double_t | thetaWave | ||
) |
Function to calculate the time taken by a plane wave to cross the payload.
pol | is the polarization of the antennas |
ant1 | is the first antenna |
ant2 | is the second antenna |
phiWave | is the phi direction of the incoming wave in radians (relative to the ADU5) |
thetaWave | is the theta direction of the incoming wave in radians (relative to the ADU5) |
Definition at line 1126 of file CrossCorrelator.cxx.
void CrossCorrelator::getFinePeakInfo | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | peakIndex, | ||
Double_t & | value, | ||
Double_t & | phiDeg, | ||
Double_t & | thetaDeg | ||
) |
Gets the results from the fine reconstruction.
pol | is the polarization of interest |
peakIndex | runs from 0 to MAX_NUM_PEAKS and indexes the peak (0 is the largest). |
value | is the bin content of the image peak. |
phiDeg | is the phi coordinate in degrees. |
thetaDeg | is the theta coordinate in degrees. |
Definition at line 656 of file CrossCorrelator.cxx.
Double_t CrossCorrelator::getInterpolatedUpsampledCorrelationValue | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | combo, | ||
Double_t | deltaT | ||
) |
Linearly interpolates between upsampled correlation points.
pol | is polarization of the antenna pair. |
combo | is the index of the antenna pair. |
deltaT | is the time to interpolate the correlation values at. |
Definition at line 1403 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::getMap | ( | AnitaPol::AnitaPol_t | pol, |
Double_t & | peakValue, | ||
Double_t & | peakPhiDeg, | ||
Double_t & | peakThetaDeg, | ||
UShort_t | l3TrigPattern = ALL_PHI_TRIGS |
||
) |
Gets an actual histogram of the zoomed in map.
pol | is the polarization |
peakValue | is the bin content of the image peak. |
peakPhiDeg | is the phi coordinate in degrees. |
peakThetaDeg | is the theta coordinate in degrees. |
l3TrigPattern | is a bit mask of the phi-sectors to use in reconstruct, default value is ALL_PHI_TRIGS (=0xffff). |
Definition at line 1442 of file CrossCorrelator.cxx.
void CrossCorrelator::getMaxCorrelationTimeValue | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | combo, | ||
Double_t & | time, | ||
Double_t & | value | ||
) |
Get the maximum correlation time and value from a polarization and antenna combo index.
pol | is the polarization of the antenna combo |
combo | is the index of the combination (see comboIndices[NUM_SEAVEYS][NUM_SEAVEYS]) |
time | is reference variable, updated with the maximum correlation time. |
value | is a reference variable, updated with the correlation coefficient at time. |
You probably want to call getMaxCorrelationTimeValue(AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2, Double_t& time, Double_t& value) instead.
Definition at line 954 of file CrossCorrelator.cxx.
void CrossCorrelator::getMaxCorrelationTimeValue | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant1, | ||
Int_t | ant2, | ||
Double_t & | time, | ||
Double_t & | value | ||
) |
Get the maximum correlation time and value from a polarization and pair of antennas.
pol | is the polarization of the antenna combo |
ant1 | is the first antenna |
ant2 | is the second antenna |
time | is reference variable, updated with the maximum correlation time. |
value | is a reference variable, updated with the correlation coefficient at time. |
Definition at line 977 of file CrossCorrelator.cxx.
void CrossCorrelator::getMaxUpsampledCorrelationTimeValue | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | combo, | ||
Double_t & | time, | ||
Double_t & | value | ||
) |
Get the maximum upsampled correlation time and value from a polarization and antenna combo index.
pol | is the polarization of the antenna combo |
combo | is the index of the combination (see comboIndices[NUM_SEAVEYS][NUM_SEAVEYS]) |
time | is reference variable, updated with the maximum correlation time. |
value | is a reference variable, updated with the correlation coefficient at time. |
Definition at line 996 of file CrossCorrelator.cxx.
void CrossCorrelator::getMaxUpsampledCorrelationTimeValue | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant1, | ||
Int_t | ant2, | ||
Double_t & | time, | ||
Double_t & | value | ||
) |
Get the maximum upsampled correlation time and value from a polarization and pair of antennas.
pol | is the polarization of the antenna combo |
ant1 | is the first antenna |
ant2 | is the second antenna |
time | is reference variable, updated with the maximum correlation time. |
value | is a reference variable, updated with the correlation coefficient at time. |
Definition at line 1019 of file CrossCorrelator.cxx.
void CrossCorrelator::getNormalizedInterpolatedTGraphs | ( | UsefulAnitaEvent * | usefulEvent, |
AnitaPol::AnitaPol_t | pol | ||
) |
Makes evenly re-sampled, normalized waveform graphs from the UsefulAnitaEvent.
usefulEvent | points to the UsefulAnitaEvent of interest. |
pol | is the polarization of interest. |
Definition at line 296 of file CrossCorrelator.cxx.
Int_t CrossCorrelator::getPhiSectorOfAntennaClosestToPhiDeg | ( | AnitaPol::AnitaPol_t | pol, |
Double_t | phiDeg | ||
) |
Finds the phi-sector closest to a particular phi direction.
pol | is the polarization. |
phiDeg | is the azimuthal direction (Degrees) relative to ADU5 aft-fore. |
Definition at line 2229 of file CrossCorrelator.cxx.
TGraph * CrossCorrelator::getUpsampledCrossCorrelationGraph | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant1, | ||
Int_t | ant2 | ||
) |
Turns internal upsampled correlation arrays into TGraphs to be seen by humans.
pol | is the polarization. |
ant1 | is the first antenna. |
ant2 | is the second antenna. |
Definition at line 2213 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::getZoomMap | ( | AnitaPol::AnitaPol_t | pol | ) |
Gets an actual histogram of the zoomed in map.
pol | is the polarization |
Definition at line 1502 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::initializeNewCombinatorics | ( | ) |
Function to loop over the coarse map and check which antenna pairs we should use
Definition at line 145 of file CrossCorrelator.cxx.
TGraph * CrossCorrelator::interpolateWithStartTimeAndZeroMean | ( | TGraph * | grIn, |
Double_t | startTime, | ||
Double_t | dt, | ||
Int_t | nSamp | ||
) |
Creates an interpolated TGraph with zero mean.
grIn | is a TGraph containing the waveform to interpolate / pad |
startTime | is the time to begin the interpolation |
dt | is the step size to interpolate with |
nSamp | is the number of samples to pad to. |
Definition at line 233 of file CrossCorrelator.cxx.
TGraph * CrossCorrelator::makeCoherentlySummedWaveform | ( | AnitaPol::AnitaPol_t | pol, |
Double_t | phiDeg, | ||
Double_t | thetaDeg, | ||
Int_t | maxDeltaPhiSect, | ||
Double_t & | snr | ||
) |
Creates the coherently summed waveform from the FFTs held in memory.
pol | is the polarization |
phiDeg | is the incoming phi direction (Degrees) relative to the ADU5 aft-fore. |
thetaDeg | is the incoming theta direction (Degrees). |
maxDeltaPhiSect | is the number of phi-sectors to contribute either side of the incoming phi-direction. |
snr | is an estimate of the signal-to-noise ratio of the coherently summed waveform, using the local max-to-min of the coherent waveform and the rms of the first few ns of the contributing uninterpolated waveforms. |
Definition at line 2275 of file CrossCorrelator.cxx.
TGraph * CrossCorrelator::makeCoherentWorker | ( | AnitaPol::AnitaPol_t | pol, |
Double_t | phiDeg, | ||
Double_t | thetaDeg, | ||
Int_t | maxDeltaPhiSect, | ||
Double_t & | snr, | ||
Int_t | nSamp | ||
) |
Worker function to create the coherently summed waveform from either the regular ffts or the padded ffts.
pol | is the polarization |
phiDeg | is the incoming phi direction (Degrees) relative to the ADU5 aft-fore. |
thetaDeg | is the incoming theta direction (Degrees). |
maxDeltaPhiSect | is the number of phi-sectors to contribute either side of the incoming phi-direction. |
snr | is an estimate of the signal-to-noise ratio of the coherently summed waveform, using the local max-to-min of the coherent waveform and the rms of the first few ns of the contributing uninterpolated waveforms. |
nSamp | is the number of samples in the time domain of the ffts (numSamples or numSamplesUpsampled) |
Definition at line 2296 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::makeGlobalImage | ( | AnitaPol::AnitaPol_t | pol, |
Double_t & | imagePeak, | ||
Double_t & | peakPhiDeg, | ||
Double_t & | peakThetaDeg | ||
) |
Creates an interferometric map using plane wave deltaTs and antenna pairs from all phi-sectors.
pol | is the polarization. |
imagePeak | is the maximum value. |
peakPhiDeg | is azimuth of the maximum value (Degrees) relative to the ADU5 aft-fore. |
peakThetaDeg | is the elevation of the maximum value (Degrees). |
Definition at line 1544 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::makeGlobalImage | ( | AnitaPol::AnitaPol_t | pol | ) |
Creates an interferometric map using plane wave deltaTs and antenna pairs from all phi-sectors.
pol | is the polarization. |
Definition at line 1565 of file CrossCorrelator.cxx.
|
static |
Static member function which fills the interferometric maps.
voidPtrArgs | contains a pointer to a CrossCorrelator::threadArgs struct |
This function contains the meat and bones of this class. I've really tried to optimize this for speed, which means it's not very readable, sorry.
Definition at line 1752 of file CrossCorrelator.cxx.
|
static |
Static member function which fills the interferometric maps.
voidPtrArgs | contains a pointer to a CrossCorrelator::threadArgs struct |
This function contains the meat and bones of this class. I've really tried to optimize this for speed, which means it's not very readable, sorry.
Definition at line 1922 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::makeTriggeredImage | ( | AnitaPol::AnitaPol_t | pol, |
Double_t & | imagePeak, | ||
Double_t & | peakPhiDeg, | ||
Double_t & | peakThetaDeg, | ||
UShort_t | l3TrigPattern | ||
) |
Creates an interferometric map using plane wave deltaTs and l3Triggered pairs from all phi-sectors.
pol | is the polarization. |
imagePeak | is the maximum value. |
peakPhiDeg | is azimuth of the maximum value (Degrees) relative to the ADU5 aft-fore. |
peakThetaDeg | is the elevation of the maximum value (Degrees). |
l3TrigPattern | is the L3 trigger pattern, determines what antenna pairs to use in the recontruction. |
Definition at line 1585 of file CrossCorrelator.cxx.
TGraph * CrossCorrelator::makeUpsampledCoherentlySummedWaveform | ( | AnitaPol::AnitaPol_t | pol, |
Double_t | phiDeg, | ||
Double_t | thetaDeg, | ||
Int_t | maxDeltaPhiSect, | ||
Double_t & | snr | ||
) |
Creates the coherently summed waveform from the zero padded FFTs held in memory.
pol | is the polarization |
phiDeg | is the incoming phi direction (Degrees) relative to the ADU5 aft-fore. |
thetaDeg | is the incoming theta direction (Degrees). |
maxDeltaPhiSect | is the number of phi-sectors to contribute either side of the incoming phi-direction. |
snr | is an estimate of the signal-to-noise ratio of the coherently summed waveform, using the local max-to-min of the coherent waveform and the rms of the first few ns of the contributing uninterpolated waveforms. |
Definition at line 2255 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::makeZoomedImage | ( | AnitaPol::AnitaPol_t | pol, |
UShort_t | l3TrigPattern, | ||
Double_t | zoomCenterPhiDeg, | ||
Double_t | zoomCenterThetaDeg | ||
) |
Creates an interferometric map using plane wave deltaTs centered around a particular phi/theta.
pol | is the polarization. |
l3TrigPattern | is the L3 trig pattern, determines what antenna pairs to use in the recontruction. |
zoomCenterPhiDeg | is azimuth to center the zoomed image on (Degrees) relative to the ADU5 aft-fore. |
zoomCenterThetaDeg | is the elevation to center the zoomed image on (Degrees). |
Definition at line 1667 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::makeZoomedImage | ( | AnitaPol::AnitaPol_t | pol, |
Double_t & | imagePeak, | ||
Double_t & | peakPhiDeg, | ||
Double_t & | peakThetaDeg, | ||
UShort_t | l3TrigPattern, | ||
Double_t | zoomCenterPhiDeg, | ||
Double_t | zoomCenterThetaDeg | ||
) |
Creates an interferometric map using plane wave deltaTs centered around a particular phi/theta.
pol | is the polarization. |
imagePeak | is the maximum value. |
peakPhiDeg | is azimuth of the maximum value (Degrees) relative to the ADU5 aft-fore. |
peakThetaDeg | is the elevation of the maximum value (Degrees). |
l3TrigPattern | is the L3 trig pattern, determines what antenna pairs to use in the recontruction. |
zoomCenterPhiDeg | is azimuth to center the zoomed image on (Degrees) relative to the ADU5 aft-fore. |
zoomCenterThetaDeg | is the elevation to center the zoomed image on (Degrees). |
Definition at line 1641 of file CrossCorrelator.cxx.
TH2D * CrossCorrelator::makeZoomedImage | ( | AnitaPol::AnitaPol_t | pol, |
Double_t & | imagePeak, | ||
Double_t & | peakPhiDeg, | ||
Double_t & | peakThetaDeg, | ||
Double_t | zoomCenterPhiDeg, | ||
Double_t | zoomCenterThetaDeg | ||
) |
Creates an interferometric map using plane wave deltaTs centered around a particular phi/theta.
pol | is the polarization. |
imagePeak | is the maximum value. |
peakPhiDeg | is azimuth of the maximum value (Degrees) relative to the ADU5 aft-fore. |
peakThetaDeg | is the elevation of the maximum value (Degrees). |
zoomCenterPhiDeg | is azimuth to center the zoomed image on (Degrees) relative to the ADU5 aft-fore. |
zoomCenterThetaDeg | is the elevation to center the zoomed image on (Degrees). |
Definition at line 1612 of file CrossCorrelator.cxx.
void CrossCorrelator::reconstruct | ( | AnitaPol::AnitaPol_t | pol, |
Double_t & | imagePeak, | ||
Double_t & | peakPhiDeg, | ||
Double_t & | peakThetaDeg | ||
) |
Wrapper function which launches the threaded functions, which fill the interferometric maps.
pol | is the polarization. |
imagePeak | is the maximum value. |
peakPhiDeg | is azimuth of the maximum value (Degrees) relative to the ADU5 aft-fore. |
peakThetaDeg | is the elevation of the maximum value (Degrees). |
This function is also responsible for merging the peak finding results of each of the threads.
Definition at line 1698 of file CrossCorrelator.cxx.
void CrossCorrelator::reconstructEvent | ( | UsefulAnitaEvent * | usefulEvent, |
Int_t | numFinePeaks = MAX_NUM_PEAKS , |
||
Int_t | numCoarsePeaks = MAX_NUM_PEAKS |
||
) |
Reconstruct event.
usefulEvent | is the event to process |
numFinePeaks | is the number of fine peaks to reconstruct (should be >= numCoarsePeaks but < MAX_NUM_PEAKS) |
numCoarsePeaks | is the number of coarse peaks to reconstruct (should < MAX_NUM_PEAKS) |
Wraps the key reconstruction algorithms and puts the results in internal memory.
Definition at line 577 of file CrossCorrelator.cxx.
void CrossCorrelator::reconstructZoom | ( | AnitaPol::AnitaPol_t | pol, |
Double_t & | imagePeak, | ||
Double_t & | peakPhiDeg, | ||
Double_t & | peakThetaDeg, | ||
Double_t | zoomCenterPhiDeg = 0 , |
||
Double_t | zoomCenterThetaDeg = 0 |
||
) |
Wrapper function which launches the threaded functions, which fill the zoomed maps.
pol | is the polarization. |
imagePeak | is the maximum value. |
peakPhiDeg | is azimuth of the maximum value (Degrees) relative to the ADU5 aft-fore. |
peakThetaDeg | is the elevation of the maximum value (Degrees). |
zoomCenterPhiDeg | should be the phi (deg) of the coarse map to reconstruct around. |
zoomCenterThetaDeg | should be the theta (deg) of the coarse map to reconstruct around. |
This function is also responsible for merging the peak finding results of each of the threads.
Definition at line 1843 of file CrossCorrelator.cxx.
Double_t CrossCorrelator::relativeOffAxisDelay | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant1, | ||
Int_t | ant2, | ||
Double_t | phiDeg | ||
) |
Get the relative off-axis delay between an antenna pair.
pol | is the polarization of the plane wave. |
ant1 | is the first antenna. |
ant2 | is the second antenna. |
phiDeg | is the angle of the planewave in Degrees relative to ADU5-aft-fore. |
Definition at line 1088 of file CrossCorrelator.cxx.
void CrossCorrelator::renormalizeFourierDomain | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant | ||
) |
Scales the fft such that the inverse fft would have mean=0 and rms=1. For use after notching.
pol | is the polarization of interest |
ant | is the antenna to filter |
Definition at line 460 of file CrossCorrelator.cxx.
void CrossCorrelator::simple260MHzSatelliteNotch | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant | ||
) |
Applies a 52MHz wide notch centered at 260 MHz to filter the most problematic satellite frequency.
pol | is the polarization of interest |
ant | is the antenna to filter |
Definition at line 400 of file CrossCorrelator.cxx.
void CrossCorrelator::simple370MHzSatelliteNotch | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant | ||
) |
Applies a 40MHz wide notch centered at 370 MHz to filter another satellite frequency.
pol | is the polarization of interest |
ant | is the antenna to filter |
Definition at line 415 of file CrossCorrelator.cxx.
void CrossCorrelator::simpleNotch | ( | AnitaPol::AnitaPol_t | pol, |
Int_t | ant, | ||
Double_t | notchLowEdgeMHz, | ||
Double_t | notchHighEdgeMHz | ||
) |
Applies a simple notch between the given frequencies.
pol | is the polarization of interest |
ant | is the antenna to filter |
notchLowEdgeMHz | is the low edge of the notch in MHz |
notchHighEdgeMHz | is the high edge of the notch in MHz |
Definition at line 433 of file CrossCorrelator.cxx.
Double_t CrossCorrelator::singleAntennaOffAxisDelay | ( | Double_t | deltaPhiDeg | ) |
Get the off-axis delay for an off boresight angle.
deltaPhiDeg | is the angle (Degrees) of the plane wave relative to an antenna boresight. |
Definition at line 1036 of file CrossCorrelator.cxx.
Bool_t CrossCorrelator::useCombo | ( | Int_t | ant1, |
Int_t | ant2, | ||
Int_t | phiSector, | ||
Int_t | deltaPhiSect | ||
) |
This function encodes whether a pair of antennas should be used in a particular phi sector.
ant1 | is the first antenna |
ant2 | is the second antenna |
phiSector | is the phi-sector being considered |
deltaPhiSect | is the range of phi-sectors to allow in the reconstruction. Note that deltaPhiSect < 0 implies that one antenna must be in phiSector, but allows a range out to abs(deltaPhiSect). |
This function gets used when comparing different reconstruction strategies by member variable kDeltaPhiSect.
Definition at line 1339 of file CrossCorrelator.cxx.