Healpix C++  3.82
Public Member Functions | List of all members
PowSpec Class Reference

#include <powspec.h>

Public Member Functions

 PowSpec (int nspec, int lmax)
 
void assertArraySizes () const
 
bool consistentAutoPowspec () const
 
int Num_specs () const
 
int Lmax () const
 
const arr< double > & tt () const
 
const arr< double > & gg () const
 
const arr< double > & cc () const
 
const arr< double > & tg () const
 
const arr< double > & tc () const
 
const arr< double > & gc () const
 
double & tt (int l)
 
double & gg (int l)
 
double & cc (int l)
 
double & tg (int l)
 
double & tc (int l)
 
double & gc (int l)
 
const double & tt (int l) const
 
const double & gg (int l) const
 
const double & cc (int l) const
 
const double & tg (int l) const
 
const double & tc (int l) const
 
const double & gc (int l) const
 
void Set (int nspec, int lmax)
 
void Set (arr< double > &tt_new)
 
void Set (arr< double > &tt_new, arr< double > &gg_new, arr< double > &cc_new, arr< double > &tg_new)
 
void Set (arr< double > &tt_new, arr< double > &gg_new, arr< double > &cc_new, arr< double > &tg_new, arr< double > &tc_new, arr< double > &gc_new)
 
void smoothWithGauss (double fwhm)
 

Detailed Description

Class for storing unpolarised and polarised power spectra.

Definition at line 38 of file powspec.h.

Constructor & Destructor Documentation

◆ PowSpec()

PowSpec::PowSpec ( int  nspec,
int  lmax 
)

Constructs a PowSpec with nspec components and a maximum multipole of lmax. nspec can be 1 (TT), 4 (TT,GG,CC,TG) or 6 (TT,GG,CC,TG,TC,GC).

Definition at line 47 of file powspec.cc.

Member Function Documentation

◆ assertArraySizes()

void PowSpec::assertArraySizes ( ) const

Ensures that the internal array sizes are consistent with the num_specs variable.

Definition at line 53 of file powspec.cc.

◆ consistentAutoPowspec()

bool PowSpec::consistentAutoPowspec ( ) const

Checks whether the object can be an auto power spectrum. If this is not the case, an exception is thrown.

Definition at line 72 of file powspec.cc.

◆ Num_specs()

int PowSpec::Num_specs ( ) const
inline

Returns the number of spectral components.

Definition at line 65 of file powspec.h.

◆ Lmax()

int PowSpec::Lmax ( ) const
inline

Returns the maximum l.

Definition at line 67 of file powspec.h.

◆ tt() [1/3]

const arr<double>& PowSpec::tt ( ) const
inline

Returns the TT array (read-only).

Definition at line 69 of file powspec.h.

◆ gg() [1/3]

const arr<double>& PowSpec::gg ( ) const
inline

Returns the GG array (read-only).

Definition at line 71 of file powspec.h.

◆ cc() [1/3]

const arr<double>& PowSpec::cc ( ) const
inline

Returns the CC array (read-only).

Definition at line 73 of file powspec.h.

◆ tg() [1/3]

const arr<double>& PowSpec::tg ( ) const
inline

Returns the TG array (read-only).

Definition at line 75 of file powspec.h.

◆ tc() [1/3]

const arr<double>& PowSpec::tc ( ) const
inline

Returns the TC array (read-only).

Definition at line 77 of file powspec.h.

◆ gc() [1/3]

const arr<double>& PowSpec::gc ( ) const
inline

Returns the GC array (read-only).

Definition at line 79 of file powspec.h.

◆ tt() [2/3]

double& PowSpec::tt ( int  l)
inline

Returns TT(l) (read-write).

Definition at line 81 of file powspec.h.

◆ gg() [2/3]

double& PowSpec::gg ( int  l)
inline

Returns GG(l) (read-write).

Definition at line 83 of file powspec.h.

◆ cc() [2/3]

double& PowSpec::cc ( int  l)
inline

Returns CC(l) (read-write).

Definition at line 85 of file powspec.h.

◆ tg() [2/3]

double& PowSpec::tg ( int  l)
inline

Returns TG(l) (read-write).

Definition at line 87 of file powspec.h.

◆ tc() [2/3]

double& PowSpec::tc ( int  l)
inline

Returns TC(l) (read-write).

Definition at line 89 of file powspec.h.

◆ gc() [2/3]

double& PowSpec::gc ( int  l)
inline

Returns GC(l) (read-write).

Definition at line 91 of file powspec.h.

◆ tt() [3/3]

const double& PowSpec::tt ( int  l) const
inline

Returns TT(l) (read-only).

Definition at line 93 of file powspec.h.

◆ gg() [3/3]

const double& PowSpec::gg ( int  l) const
inline

Returns GG(l) (read-only).

Definition at line 95 of file powspec.h.

◆ cc() [3/3]

const double& PowSpec::cc ( int  l) const
inline

Returns CC(l) (read-only).

Definition at line 97 of file powspec.h.

◆ tg() [3/3]

const double& PowSpec::tg ( int  l) const
inline

Returns TG(l) (read-only).

Definition at line 99 of file powspec.h.

◆ tc() [3/3]

const double& PowSpec::tc ( int  l) const
inline

Returns TC(l) (read-only).

Definition at line 101 of file powspec.h.

◆ gc() [3/3]

const double& PowSpec::gc ( int  l) const
inline

Returns GC(l) (read-only).

Definition at line 103 of file powspec.h.

◆ Set() [1/4]

void PowSpec::Set ( int  nspec,
int  lmax 
)

Re-allocates the object

Definition at line 92 of file powspec.cc.

◆ Set() [2/4]

void PowSpec::Set ( arr< double > &  tt_new)

Sets the whole TT array.

Note
On exit, tt_new is zero-sized!

Definition at line 111 of file powspec.cc.

◆ Set() [3/4]

void PowSpec::Set ( arr< double > &  tt_new,
arr< double > &  gg_new,
arr< double > &  cc_new,
arr< double > &  tg_new 
)

Sets the four first components.

Note
On exit, all arguments are zero-sized!

Definition at line 121 of file powspec.cc.

◆ Set() [4/4]

void PowSpec::Set ( arr< double > &  tt_new,
arr< double > &  gg_new,
arr< double > &  cc_new,
arr< double > &  tg_new,
arr< double > &  tc_new,
arr< double > &  gc_new 
)

Sets all components.

Note
On exit, all arguments are zero-sized!

Definition at line 131 of file powspec.cc.

◆ smoothWithGauss()

void PowSpec::smoothWithGauss ( double  fwhm)

Smooths the spectrum with a Gaussian beam. fwhm is given in radian.

Note
This is only implememted for 1 and 4 spectra so far.

Definition at line 140 of file powspec.cc.


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

Generated on Thu Jul 28 2022 17:32:07 for Healpix C++