11 #include <GwollumPlot.h>
65 Otile(
const unsigned int aTimeRange,
66 const unsigned int aTimeOverlap,
69 const double aFrequencyMin,
70 const double aFrequencyMax,
71 const unsigned int aSampleFrequency,
73 const unsigned int aFullMapNt=1,
74 const string aPlotStyle=
"GWOLLUM",
75 const unsigned int aVerbosity=0);
88 inline unsigned int GetQN(
void){
return nq; };
94 inline double GetQ(
const unsigned int aQindex){
95 if(aQindex<nq)
return qplanes[aQindex]->GetQ();
103 inline unsigned int GetBandN(
const unsigned int aQindex){
104 if(aQindex<nq)
return qplanes[aQindex]->GetBandN();
105 return qplanes[nq-1]->GetBandN();
114 if(aQindex<nq)
return qplanes[aQindex]->GetBandFrequency(aBandIndex);
115 return qplanes[nq-1]->GetBandFrequency(aBandIndex);
124 inline unsigned int GetBandTileN(
const unsigned int aQindex,
const unsigned int aBandIndex){
125 if(aQindex<nq)
return qplanes[aQindex]->GetBandTileN(aBandIndex);
126 if(FullMapNt>0)
return FullMapNt;
127 return qplanes[0]->GetBandTileN(qplanes[0]->GetBandN()-1);
137 inline double GetTileSnrSq(
const unsigned int aQindex,
const unsigned int aBandIndex,
const unsigned int aTimeTileIndex){
138 return qplanes[aQindex]->GetTileSnrSq(aTimeTileIndex, aBandIndex);
148 inline double GetTileAmplitude(
const unsigned int aQindex,
const unsigned int aBandIndex,
const unsigned int aTimeTileIndex){
149 return qplanes[aQindex]->GetTileAmplitude(aTimeTileIndex, aBandIndex);
159 inline double GetTileAmplitudeSq(
const unsigned int aQindex,
const unsigned int aBandIndex,
const unsigned int aTimeTileIndex){
160 return qplanes[aQindex]->GetTileAmplitudeSq(aTimeTileIndex, aBandIndex);
167 inline double GetSnrSqMax(
const unsigned int aQindex){
return qplanes[aQindex]->GetSnrSqMax(); };
174 long unsigned int GetTileN(
const double aPadding=0.0);
182 double* GetBands(
const unsigned int aQindex);
190 void SetPlotTimeWindows(vector <unsigned int> aWindows);
201 void DrawMapTiling(
const unsigned int aQindex);
209 inline void SetPower(Spectrum *aSpec1, Spectrum *aSpec2){
210 for(
unsigned int q=0; q<nq; q++) qplanes[q]->SetPower(aSpec1, aSpec2);
222 long unsigned int ProjectData(fft *aDataFft);
237 Segments* GetTileSegments(TH1D *aSnrThreshold,
const double aPadding);
252 bool SaveTriggers(TriggerBuffer *aTriggers);
269 double SaveMaps(
const string aOutdir,
const string aName,
const string aFormat,
270 const double aTimeOffset=0.0,
const bool aThumb=
false);
282 if(!aMapContentType.compare(
"amplitude")) mapfill=
"amplitude";
283 else if(!aMapContentType.compare(
"phase")) mapfill=
"phase";
294 inline void SetRangez(
const double aZmin=-1.0,
const double aZmax=-1.0){
310 inline void SetSnrThr(
const double aSnrThr_map=0.0,
const double aSnrThr_trigger=2.0){
311 SnrThr_map=aSnrThr_map;
312 for(
unsigned int q=0; q<nq; q++) qplanes[q]->SetSnrThr(aSnrThr_trigger);
353 inline unsigned int GetTimeRange(
void){
return qplanes[0]->GetTimeRange(); };
362 inline void SetChirp(
const double aMchirp=-1.0,
const double aMergerTime=-1.0){
363 chirpt = aMergerTime;
365 chirp->SetParameters(-8.0*96.0/3.0/5.0*TMath::Power(TMath::Pi(),8.0/3.0)*TMath::Power(TMath::G()*chirpm*1.989e30/TMath::C()/TMath::C()/TMath::C(), 5.0/3.0),
378 for(
unsigned int q=0; q<nq; q++)
379 qplanes[q]->FillMap(mapfill, -(
double)GetTimeRange()/2.0, (
double)GetTimeRange()/2.0);
389 void FillFullMap(
const unsigned int aWindowIndex,
const double aTimeOffset = 0.0);
398 return (TH2D*)fullmap[aWindowIndex]->Clone();
Omicron analysis time sequence.
const double const double aMaximumMismatch
Definition: Otile.cc:11
const double aQMax
Definition: Otile.cc:11
vector< double > ComputeQs(const double aQMin, const double aQMax, const double aMaximumMismatch)
Computes a set of Q values.
Create a time-frequency Q-plane.
Definition: Oqplane.h:23
Omicron analysis time sequence.
Definition: Osequence.h:48
Construct a time-frequency-Q tiling structure.
Definition: Otile.h:39
unsigned int GetBandN(const unsigned int aQindex)
Returns the number of frequency bands of a given Q-plane.
Definition: Otile.h:103
vector< unsigned int > pwin
Plot time windows.
Definition: Otile.h:415
double GetTileAmplitudeSq(const unsigned int aQindex, const unsigned int aBandIndex, const unsigned int aTimeTileIndex)
Returns the amplitude squared of a given tile.
Definition: Otile.h:159
double GetSnrTriggerThr(void)
Returns the current SNR threshold for triggers.
Definition: Otile.h:331
TH2D * GetFullMap(const unsigned int aWindowIndex)
Returns a copy of the full map.
Definition: Otile.h:397
double GetSnrMapThr(void)
Returns the current SNR threshold for maps.
Definition: Otile.h:325
TF1 * chirp
Chirp track.
Definition: Otile.h:412
unsigned int ** f_snrmax
Loudest frequency tile (SNR).
Definition: Otile.h:411
void SetRangez(const double aZmin=-1.0, const double aZmax=-1.0)
Sets the map Z-axis range.
Definition: Otile.h:294
double GetFrequencyMax(void)
Returns the highest frequency of this tiling [Hz].
Definition: Otile.h:343
double GetQ(const unsigned int aQindex)
Returns the Q value of a given Q-plane.
Definition: Otile.h:94
unsigned int nq
number of q planes.
Definition: Otile.h:406
Oqplane ** qplanes
Q planes.
Definition: Otile.h:405
unsigned int fVerbosity
Verbosity level.
Definition: Otile.h:399
unsigned int FullMapNt
Number of time bins in the full map (0 for full resolution).
Definition: Otile.h:419
unsigned int GetBandTileN(const unsigned int aQindex, const unsigned int aBandIndex)
Returns the number of tiles in a band of a given Q-plane.
Definition: Otile.h:124
double GetMismatchMax(void)
Returns the maximum mismatch between tiles.
Definition: Otile.h:348
double MaximumMismatch
Maximum mismatch.
Definition: Otile.h:404
string GetMapFill(void)
Returns the current map fill type.
Definition: Otile.h:319
double GetRangezMin(void)
Returns the map Z-axis range minimum.
Definition: Otile.h:302
void FillMaps(void)
Fills the Q-plane maps.
Definition: Otile.h:377
TH2D ** fullmap
Full maps.
Definition: Otile.h:418
string mapfill
Map fill type.
Definition: Otile.h:409
double GetSnrSqMax(const unsigned int aQindex)
Returns the maximum SNR squared estimated in a given Q plane.
Definition: Otile.h:167
double GetTileAmplitude(const unsigned int aQindex, const unsigned int aBandIndex, const unsigned int aTimeTileIndex)
Returns the amplitude of a given tile.
Definition: Otile.h:148
void SetSnrThr(const double aSnrThr_map=0.0, const double aSnrThr_trigger=2.0)
Sets a SNR threshold when saving maps and triggers.
Definition: Otile.h:310
double GetChirpMass(void)
Returns the chirp mass [solar masses].
Definition: Otile.h:372
void SetPower(Spectrum *aSpec1, Spectrum *aSpec2)
Computes the noise power associated to the tiling structure.
Definition: Otile.h:209
unsigned int GetQN(void)
Returns the number of Q-planes.
Definition: Otile.h:88
double GetTileSnrSq(const unsigned int aQindex, const unsigned int aBandIndex, const unsigned int aTimeTileIndex)
Returns the SNR squared of a given tile.
Definition: Otile.h:137
unsigned int ** t_snrmax
Loudest time tile (SNR).
Definition: Otile.h:410
void SetChirp(const double aMchirp=-1.0, const double aMergerTime=-1.0)
Sets the chirp mass [solar mass].
Definition: Otile.h:362
double GetFrequencyMin(void)
Returns the minimum frequency of this tiling [Hz].
Definition: Otile.h:337
double SnrThr_map
Map SNR threshold.
Definition: Otile.h:408
double GetBandFrequency(const unsigned int aQindex, const unsigned int aBandIndex)
Returns the band central frequency [Hz] of a given Q-plane.
Definition: Otile.h:113
double chirpm
Chirp mass [solar mass].
Definition: Otile.h:413
void SetMapFill(const string aMapContentType="snr")
Defines how to fill the maps.
Definition: Otile.h:281
unsigned int GetTimeRange(void)
Returns the time range [s].
Definition: Otile.h:353
vector< unsigned int > GetPlotTimeWindows(void)
Returns the list of time windows for plots.
Definition: Otile.h:195
double chirpt
Chirp merger time [s].
Definition: Otile.h:414