| [988] | 1 | \documentclass[11pt]{article}
 | 
|---|
 | 2 | %\documentstyle[11pt,epsfig,url]{article}
 | 
|---|
 | 3 | \usepackage[latin1]{inputenc}
 | 
|---|
 | 4 | \usepackage[T1]{fontenc}
 | 
|---|
 | 5 | \usepackage[english]{babel}
 | 
|---|
 | 6 | \usepackage{url}
 | 
|---|
 | 7 | \usepackage{graphicx}
 | 
|---|
 | 8 | 
 | 
|---|
 | 9 | % package a mettre pour faire du pdf
 | 
|---|
 | 10 | \usepackage{palatino}
 | 
|---|
 | 11 | 
 | 
|---|
 | 12 | %  Definition pour Docs Sophya
 | 
|---|
 | 13 | \usepackage{defsophya}
 | 
|---|
 | 14 | 
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 | \setlength{\parskip}{\smallskipamount} %\documentclass[a4paper,10pt]{article}
 | 
|---|
 | 18 | \newenvironment{maliste}%
 | 
|---|
 | 19 | { \begin{list}%
 | 
|---|
 | 20 |         {$\ast$}%
 | 
|---|
 | 21 |         {\setlength{\labelwidth}{20pt}%
 | 
|---|
 | 22 |          \setlength{\leftmargin}{25pt}%
 | 
|---|
 | 23 |          \setlength{\itemsep}{\parsep}}}%
 | 
|---|
 | 24 | { \end{list} }
 | 
|---|
 | 25 | \newcommand {\ddate}    {April~12,~2000}
 | 
|---|
 | 26 | 
 | 
|---|
 | 27 | \begin{document}
 | 
|---|
 | 28 | %  The title page - top of the page with the title of the paper
 | 
|---|
 | 29 | \begin{titlepage}
 | 
|---|
 | 30 | \titrehp{The SkyMixer \\ (SkyT and PMixer modules)}
 | 
|---|
 | 31 | %  Authors list
 | 
|---|
 | 32 | \auteurs{
 | 
|---|
 | 33 | R. Ansari            &  ansari@lal.in2p3.fr       \\
 | 
|---|
 | 34 | S. Henrot-Versille   &  versille@in2p3.fr     
 | 
|---|
 | 35 | }
 | 
|---|
 | 36 | %  The title page - bottom of the page with the paper number
 | 
|---|
 | 37 | \titrebp{2}
 | 
|---|
 | 38 | \end{titlepage}
 | 
|---|
 | 39 | 
 | 
|---|
 | 40 | %--------------------------------------- Abstract ---------------------
 | 
|---|
 | 41 | \begin{abstract}
 | 
|---|
 | 42 | This note gives a description of the SkyMixer which makes
 | 
|---|
 | 43 | use of the PMixer and the SkyT
 | 
|---|
 | 44 | modules of the Sophya library.
 | 
|---|
 | 45 | In a first part, we provide a user-guide on how to use the
 | 
|---|
 | 46 | skymixer and the extractRS program, and how to
 | 
|---|
 | 47 | fill the corresponding datacards.
 | 
|---|
 | 48 | In a second part, we describe more technically
 | 
|---|
 | 49 | the different classes
 | 
|---|
 | 50 | of the SkyT module. 
 | 
|---|
 | 51 | \end{abstract}
 | 
|---|
 | 52 | \newpage
 | 
|---|
 | 53 | \tableofcontents
 | 
|---|
 | 54 | \newpage
 | 
|---|
 | 55 | 
 | 
|---|
 | 56 | 
 | 
|---|
 | 57 | \section{Skymixer and its datacard}
 | 
|---|
 | 58 | The skymixer program adds several sky component maps
 | 
|---|
 | 59 | simulated or measured at several frequencies, such as,
 | 
|---|
 | 60 | for example, foregrounds (synchrotron radiation, dust, radio-sources...)
 | 
|---|
 | 61 | and the microwave background.
 | 
|---|
 | 62 | It takes into account the corresponding radiation spectra
 | 
|---|
 | 63 | $F_\nu$ (the one of a black-body for microwave background,
 | 
|---|
 | 64 | a power law spectrum for synchrotron...),
 | 
|---|
 | 65 | and integrates them over a given detector filter frequency-re\-sponse
 | 
|---|
 | 66 | $W_\nu$ according to:
 | 
|---|
 | 67 | \begin{eqnarray}
 | 
|---|
 | 68 | S &=& \sum_{sky\  components} \int_0^\infty F_\nu W_\nu d\nu \ .
 | 
|---|
 | 69 | \end{eqnarray}
 | 
|---|
 | 70 | The output maps\footnote{$F_\nu$ is in $\hbox{W}/\hbox{m}^2/\hbox{sr}/\hbox{Hz}$
 | 
|---|
 | 71 | and $d\nu$ is in $\hbox{GHz}$, while $W_\nu$ is dimensionless.} are in $10^{-9}\hbox{W}/\hbox{m}^2/\hbox{sr}$.
 | 
|---|
 | 72 | 
 | 
|---|
 | 73 | The interaction between the user and the skymixer is done
 | 
|---|
 | 74 | using ASCII cards. The keywords one may use are described below.
 | 
|---|
 | 75 | 
 | 
|---|
 | 76 | The way to call the skymixer program is the following one:
 | 
|---|
 | 77 | \begin{verbatim}
 | 
|---|
 | 78 |  Usage: skymixer paramFile outputfits [outppfname]
 | 
|---|
 | 79 | \end{verbatim}
 | 
|---|
 | 80 | where paramFile
 | 
|---|
 | 81 | is the name of the datacard (described below) and       
 | 
|---|
 | 82 | outputfits is the name of the Fits file in which the
 | 
|---|
 | 83 | final map will be saved\footnote{PPFName stands for Planck Persistent File (which can be read using piapp or spiapp).}.
 | 
|---|
 | 84 | When asking ``skymixer -h'', the previous usage line will appear on the
 | 
|---|
 | 85 | screen.
 | 
|---|
 | 86 | 
 | 
|---|
 | 87 | In the datacards, the lines are activated with the $@$ symbol
 | 
|---|
 | 88 | at the start of line. All other lines are treated as comments.
 | 
|---|
 | 89 | However for clarity, we use  
 | 
|---|
 | 90 | $\#$ to mark commented lines.
 | 
|---|
 | 91 | 
 | 
|---|
 | 92 | \subsection{Input maps}
 | 
|---|
 | 93 |         One has to define the number of components one wants to add
 | 
|---|
 | 94 |         and the characteristics 
 | 
|---|
 | 95 |         of the input maps (namely the NSide of HealPix maps):
 | 
|---|
 | 96 |         \begin{verbatim}
 | 
|---|
 | 97 |         #  SKYMIX  NbComponents  NSide_HealPix
 | 
|---|
 | 98 |         @SKYMIX  1 2048
 | 
|---|
 | 99 |         \end{verbatim}
 | 
|---|
 | 100 |         Note that, within this scheme, only maps with the same NSide can
 | 
|---|
 | 101 |         be added.
 | 
|---|
 | 102 | 
 | 
|---|
| [1361] | 103 |         In the case the user wants to perform a check on the PDMTYPE
 | 
|---|
 | 104 |         keyword for the different inputs files, he can use the 
 | 
|---|
 | 105 |         above CHECKPDMTYPE command (note that by default, no check
 | 
|---|
 | 106 |         is performed).
 | 
|---|
 | 107 |         \begin{verbatim}
 | 
|---|
 | 108 |         @CHECKPDMTYPE
 | 
|---|
 | 109 |         \end{verbatim}
 | 
|---|
 | 110 | 
 | 
|---|
 | 111 | 
 | 
|---|
| [988] | 112 |         In the case the files containing the 
 | 
|---|
 | 113 |         maps  are not in the
 | 
|---|
 | 114 |         working directory, it is possible to precise the path to
 | 
|---|
 | 115 |         their location:
 | 
|---|
 | 116 |         \begin{verbatim}
 | 
|---|
 | 117 |          #  MAPPATH  PathForFITS   
 | 
|---|
 | 118 |          #  path for input Sky Component FITS files , 
 | 
|---|
 | 119 |          #   and EmissionSpectra files 
 | 
|---|
 | 120 |          MAPPATH /exp/planck/data/
 | 
|---|
 | 121 |         \end{verbatim}
 | 
|---|
 | 122 | 
 | 
|---|
 | 123 |         To have access to different printout, one can play with the
 | 
|---|
 | 124 |         DEBUGLEVEL and PRINTLEVEL keywords:
 | 
|---|
 | 125 |         \begin{verbatim}
 | 
|---|
 | 126 |          #  Define the Debug level
 | 
|---|
 | 127 |          @DEBUGLEVEL  0
 | 
|---|
 | 128 |          #  Define the Print level
 | 
|---|
 | 129 |          @PRINTLEVEL  5
 | 
|---|
 | 130 |         \end{verbatim}
 | 
|---|
 | 131 |         when set to 0, almost no printout will be given.
 | 
|---|
 | 132 | 
 | 
|---|
 | 133 | \subsection{Detection filter}
 | 
|---|
 | 134 |         Then one has to define the detection frequency 
 | 
|---|
 | 135 |         filter response (cf. section
 | 
|---|
 | 136 |         \ref{specresp}). 
 | 
|---|
 | 137 |         For the example, for a gaussian filter (cf. section \ref{gaussFilt}), 
 | 
|---|
 | 138 |         one should use:
 | 
|---|
 | 139 |         \begin{verbatim}
 | 
|---|
 | 140 |          #  Defining the Detection filter pass - band
 | 
|---|
 | 141 |          #  GAUSSFILTER -> Gaussian filter
 | 
|---|
 | 142 |          #  GAUSSFILTER  Nu0 Sigma_Nu A NuMin NuMax
 | 
|---|
 | 143 |          @GAUSSFILTER 143 12 0.84 50. 300.
 | 
|---|
 | 144 |         \end{verbatim}
 | 
|---|
 | 145 |         Note that the frequencies have to be given 
 | 
|---|
 | 146 |         in $\hbox{GHz}$.
 | 
|---|
 | 147 |         In the case of a detection filter defined in a Fits file
 | 
|---|
 | 148 |         with 2$\times$n arrays (one for the frequencies and the other for
 | 
|---|
 | 149 |         the transmission values), the syntax would be:
 | 
|---|
 | 150 |         \begin{verbatim}
 | 
|---|
 | 151 |          #  Defining the Detection filter pass - band
 | 
|---|
 | 152 |          #  FILTERFITSFILE -> Filter (nu, T(nu)) from FITS 
 | 
|---|
 | 153 |          #  FILTERFITSFILE FileName NuMin NuMax
 | 
|---|
 | 154 |          @FILTERFITSFILE filterfile.fits 50. 230.
 | 
|---|
 | 155 |         \end{verbatim}
 | 
|---|
 | 156 | 
 | 
|---|
 | 157 | \subsection{Sky components}
 | 
|---|
 | 158 |         Once the detector filter has been defined, one has to 
 | 
|---|
 | 159 |         define the different sky components one wants to add
 | 
|---|
 | 160 |         and
 | 
|---|
 | 161 |         their corresponding radiation spectra. The maps are
 | 
|---|
 | 162 |         given the MAPFITSFILEi keyword where i corresponds
 | 
|---|
 | 163 |         to a given component (synchrotron radiation,
 | 
|---|
 | 164 |         dust...): i has to match between the map
 | 
|---|
 | 165 |         and the radiation spectrum. One also has to specify
 | 
|---|
 | 166 |         a normalization factor corresponding to each component.
 | 
|---|
 | 167 |         \begin{verbatim}
 | 
|---|
 | 168 |         #  ----        Sky components  ---------
 | 
|---|
 | 169 |         #  MAPFITSFILEi FITSfilename Normalisation
 | 
|---|
 | 170 |         @MAPFITSFILE4  dust.fits  1.0  
 | 
|---|
 | 171 |         \end{verbatim}   
 | 
|---|
 | 172 |         Here the number 4 (i=4) means that we are refering to
 | 
|---|
 | 173 |         the fourth sky components. And the normalization factor
 | 
|---|
 | 174 |         of the map is set to 1.
 | 
|---|
 | 175 |         
 | 
|---|
 | 176 | \subsection{Radiation Spectrum}
 | 
|---|
 | 177 | The radiation spectra corresponding to the sky component
 | 
|---|
 | 178 | maps can either be defined in a fits files, or by the instanciation
 | 
|---|
 | 179 | of the RadSpectra class (cf. \ref{radspec}), or they can depend
 | 
|---|
 | 180 | on the position in the map. The different cases are treated differently
 | 
|---|
 | 181 | as explained below. There is also the possibility of adding
 | 
|---|
 | 182 | a dipole component without the use of a map, as described below.
 | 
|---|
 | 183 | 
 | 
|---|
 | 184 | \subsubsection{A Fits file}
 | 
|---|
 | 185 | The user can provide the skymixer program with his own 
 | 
|---|
 | 186 | Fits file containing 2 $\times$ n arrays (one for the frequencies and
 | 
|---|
 | 187 | one for the corresponding flux values), and a frequency range.
 | 
|---|
 | 188 | It will be done for example using:
 | 
|---|
 | 189 |  \begin{verbatim}
 | 
|---|
 | 190 |  #      ---   Emission Spectra definition -----
 | 
|---|
 | 191 |  #   SPECTRAFITSFILEi  FITSfilename  NuMin NuMax 
 | 
|---|
 | 192 |  @SPECTRAFITSFILE4  pl.fits 100 600  
 | 
|---|
 | 193 | \end{verbatim}
 | 
|---|
 | 194 | The flux function will returns 0 outside of the 
 | 
|---|
 | 195 | $[ \hbox{Numin,Numax} ]$ range.
 | 
|---|
 | 196 | 
 | 
|---|
 | 197 | \subsubsection{The RadSpectra class}
 | 
|---|
 | 198 | For well-known spectra, the user does not have to provide
 | 
|---|
 | 199 | a Fits file, nor the function, but rather use already coded
 | 
|---|
 | 200 | functions, filling the desired parameter values.
 | 
|---|
 | 201 | For example, for a black body emission spectrum:
 | 
|---|
 | 202 | \begin{verbatim}
 | 
|---|
 | 203 |  #   Other possible definition of emission spectra
 | 
|---|
 | 204 |  #   BLACKBODYi  temperature
 | 
|---|
 | 205 |  #  The blackbody object returns flux in units of 
 | 
|---|
 | 206 |  #    watt/m2/sr 
 | 
|---|
 | 207 |  #   We thus scale the map (x 1.e17) 
 | 
|---|
 | 208 |  @MAPFITSFILE2  cossin.fits  1.e17 
 | 
|---|
 | 209 |  @BLACKBODY2 2.726
 | 
|---|
 | 210 | \end{verbatim}
 | 
|---|
 | 211 | The user has to give the temperature (here 2.726K).
 | 
|---|
 | 212 | 
 | 
|---|
 | 213 | Another example is given below where one wants to use a
 | 
|---|
 | 214 | power law spectrum for the radiation:
 | 
|---|
 | 215 | \begin{verbatim}
 | 
|---|
 | 216 |  #   For power-law spectrum  f = a ((nu-nu0)/dnu)^b)
 | 
|---|
 | 217 |  #   POWERLAWSPECTRAi  a nu0 dnu b Fmin Fmax
 | 
|---|
 | 218 |  @MAPFITSFILE3  noise.fits    0.1 
 | 
|---|
 | 219 |  @POWERLAWSPECTRA3 1. 150. 50. -0.5 100. 500.
 | 
|---|
 | 220 | \end{verbatim}
 | 
|---|
 | 221 | 
 | 
|---|
 | 222 | \subsubsection{Map position dependence}
 | 
|---|
 | 223 | In the case the emission spectrum depends on the position
 | 
|---|
 | 224 | in the map (for example for the case of synchrotron radiation),
 | 
|---|
 | 225 | one should use the BETAFITSFILE key word as follows:
 | 
|---|
 | 226 | \begin{verbatim}
 | 
|---|
 | 227 |  #  For an emission spectrum which depends  
 | 
|---|
 | 228 |  #  on the position in the map -> synchrotron 
 | 
|---|
 | 229 |  #  for instance (nu/nu0)^(-beta(theta,phi))
 | 
|---|
 | 230 |  #  408e-3 is the normalisation frequency of the map
 | 
|---|
 | 231 |  @MAPFITSFILE1 Sync/Template408MHz.fits 0.2
 | 
|---|
 | 232 |  #  BETAFITSFILE BetaMap NormFreq NsideRePixelization
 | 
|---|
 | 233 |  @BETAFITSFILE1 Sync/SpectralIndex.fits  408e-3 16 
 | 
|---|
 | 234 | \end{verbatim}
 | 
|---|
 | 235 | In this case, a second argument is needed for BETAFITSFILEi
 | 
|---|
 | 236 | which corresponds to the  normalization frequency value.
 | 
|---|
 | 237 | It is possible to perform the computation using a $\beta$ map
 | 
|---|
 | 238 | which has a different number of pixels than the sky map. 
 | 
|---|
 | 239 | It is also possible to change the NSideHealpix of the
 | 
|---|
 | 240 | $\beta$ map for example to low down the resolution for faster
 | 
|---|
 | 241 | computation. This is done using the third argument
 | 
|---|
 | 242 | (NsideRePixelization, here taken to be 16). For negative values
 | 
|---|
 | 243 | of NsideRePixelization, the original $\beta$ map resolution
 | 
|---|
 | 244 | is used.
 | 
|---|
 | 245 | 
 | 
|---|
 | 246 | One can refer to Eq.~\ref{pls} for the formula of the
 | 
|---|
 | 247 | radiation spectrum built from the $\beta$ map. In this equation, 
 | 
|---|
 | 248 | $\nu_0$ is set to 0 and $\delta \nu$ is given the value of
 | 
|---|
 | 249 | the normalisation
 | 
|---|
 | 250 | frequency of the map. 
 | 
|---|
 | 251 | 
 | 
|---|
 | 252 | \subsubsection{The dipole}      
 | 
|---|
 | 253 | The dipole can be treated in a different manner than the other
 | 
|---|
 | 254 | sky components,
 | 
|---|
 | 255 | using the DIPOLE card, as follows:
 | 
|---|
 | 256 | \begin{verbatim}        
 | 
|---|
 | 257 | # For a dipole sky map and emission spectrum
 | 
|---|
 | 258 | # use: DIPOLE theta phi amplitude delta_temperature
 | 
|---|
 | 259 | # theta and phi are in radian, delta_temp in K
 | 
|---|
 | 260 | @DIPOLE1 1.2  0.3  1. 3E-3
 | 
|---|
 | 261 | \end{verbatim}
 | 
|---|
 | 262 | In that case no MAPFITSFILEi is needed: the DIPOLE
 | 
|---|
 | 263 | card will create the sky map according to the
 | 
|---|
 | 264 | $(\theta,\phi)$ user requirement and integrate
 | 
|---|
 | 265 | the dipole radiation spectrum (DerivBlackBody - cf.~Eq.\ref{derivBB})
 | 
|---|
 | 266 | over the filter response.
 | 
|---|
 | 267 | Note that if the user prefers to give his own map, he
 | 
|---|
 | 268 | can do it as well.
 | 
|---|
 | 269 | 
 | 
|---|
 | 270 | \section{Treating point sources}
 | 
|---|
 | 271 | The extractRS code builds a full sky map from two data sets:
 | 
|---|
 | 272 | \begin{itemize}
 | 
|---|
 | 273 | \item{} a list of point sources with emission spectra described at a
 | 
|---|
 | 274 | set of discrete frequencies
 | 
|---|
 | 275 | \item{} maps of a small patch of the sky with emission spectrum described
 | 
|---|
 | 276 | at a set of discrete frequencies.
 | 
|---|
 | 277 | \end{itemize}
 | 
|---|
 | 278 | 
 | 
|---|
 | 279 | It treats the  case when one has made a simulation of a patch of the sky
 | 
|---|
 | 280 | producing a set of maps corresponding to the sky emission and the 
 | 
|---|
 | 281 | point sources emission at 
 | 
|---|
 | 282 | discrete frequencies,
 | 
|---|
 | 283 | and wants to build a random map on the basis of these
 | 
|---|
 | 284 | two informations.
 | 
|---|
 | 285 | The map produced by 
 | 
|---|
 | 286 | extractRS can then be given to the skymixer program to be
 | 
|---|
 | 287 | added to other sky components. 
 | 
|---|
 | 288 | 
 | 
|---|
 | 289 | As for skymixer, the user interacts with extractRS through
 | 
|---|
 | 290 | the use of a datacard (described below).  The way to call
 | 
|---|
 | 291 | it is the following one:
 | 
|---|
 | 292 | \begin{verbatim}
 | 
|---|
 | 293 |    Usage: extractRS parameterFile outputfits  [outppf]
 | 
|---|
 | 294 | \end{verbatim}
 | 
|---|
 | 295 | where parameterFile is the datacard, and outputfits
 | 
|---|
 | 296 | corresponds to the Fits file in which the final map will be
 | 
|---|
 | 297 | saved.
 | 
|---|
 | 298 | 
 | 
|---|
 | 299 | An example of the datacard is shown below:
 | 
|---|
 | 300 | \begin{verbatim}
 | 
|---|
 | 301 | #  EXT_RS  NbComponents  NSide_HealPix
 | 
|---|
 | 302 | @EXT_RS  1 256
 | 
|---|
 | 303 | 
 | 
|---|
 | 304 | #  RD_EXT_PATH  PathForFITS   
 | 
|---|
 | 305 | #  path for input Sky Component FITS files , 
 | 
|---|
 | 306 | #  from which the RadSpec files will be read
 | 
|---|
 | 307 | @RS_EXT_PATH /exp/planck/CartesRT/
 | 
|---|
 | 308 | 
 | 
|---|
 | 309 | #  Sky ``map'' for different frequencies 
 | 
|---|
 | 310 | #  From which the radspectra will be read
 | 
|---|
 | 311 | #  RADSPECMAPi FITSfilename 
 | 
|---|
 | 312 | @RADSPECMAP1    eran102_441_00015000mhz.fits
 | 
|---|
 | 313 | 
 | 
|---|
 | 314 | # Source point ``map'' for different freq
 | 
|---|
 | 315 | # From which the radspectra will be read
 | 
|---|
 | 316 | #  SOURCEPTMAPi FITSfilename freq(MHz)
 | 
|---|
 | 317 | @SOURCEPTMAP1   eran102_441_00015000mhz.s_rare
 | 
|---|
 | 318 | 
 | 
|---|
 | 319 | # Filter definition now !!
 | 
|---|
 | 320 | # define the detector (only one)
 | 
|---|
 | 321 | @GAUSSFILTER 143 12 0.84 50. 300.
 | 
|---|
 | 322 | \end{verbatim}
 | 
|---|
 | 323 | We first indicate in the datacard (after the EXT$\_$RS keyword):
 | 
|---|
 | 324 | \begin{maliste}
 | 
|---|
 | 325 | \item the number of frequency components we are going to
 | 
|---|
 | 326 | process: in the example the code will only process
 | 
|---|
 | 327 | one frequency component. 
 | 
|---|
 | 328 | \item and the NSideHealpix corresponding to the healpix output maps
 | 
|---|
 | 329 | \end{maliste}
 | 
|---|
 | 330 | 
 | 
|---|
 | 331 | Then comes the path (if any) to the maps, followed by the
 | 
|---|
 | 332 | name of the fits files containing the ``maps''
 | 
|---|
 | 333 | (these maps are not Healpix spheres but matrices). The keyword for
 | 
|---|
 | 334 | the frequency
 | 
|---|
 | 335 | components is RADSPECMAPi (with i being the sky component number)
 | 
|---|
 | 336 | and for the sources: SOURCEPTMAPi. 
 | 
|---|
 | 337 | 
 | 
|---|
 | 338 | The names of the fits
 | 
|---|
 | 339 | file should contain the frequency of the map in units of  $\hbox{MHz}$.
 | 
|---|
 | 340 | For example: 
 | 
|---|
 | 341 | \begin{verbatim}
 | 
|---|
 | 342 | @RADSPECMAP1    eran102_441_00015000mhz.fits
 | 
|---|
 | 343 | \end{verbatim}
 | 
|---|
 | 344 | corresponds to a frequency of 15000 $\hbox{Mhz}$.
 | 
|---|
 | 345 | The sky maps definition is followed by the point source
 | 
|---|
 | 346 | fits file, with the keyword SOURCEPTMAPi. 
 | 
|---|
 | 347 | 
 | 
|---|
 | 348 | Then comes the definition of the filter (here it is a
 | 
|---|
 | 349 | gaussian filter at 143 $\hbox{GHz}$).
 | 
|---|
 | 350 | 
 | 
|---|
 | 351 | \section{Simulating components and adding them}
 | 
|---|
 | 352 | For quick simulations, one can use two codes to generate maps,
 | 
|---|
 | 353 | detector filter responses and radiation spectra:
 | 
|---|
 | 354 | \begin{itemize}
 | 
|---|
 | 355 | \item{} {{\bf tgsky:}}\\
 | 
|---|
 | 356 |         this code generates a sky map in a Fits file.   
 | 
|---|
 | 357 | \item{} {{\bf tgrsr:}}\\
 | 
|---|
 | 358 |         this code writes in a Fits file the
 | 
|---|
 | 359 |         definition of a RadSpectraVec or of a SpecRespVec       
 | 
|---|
 | 360 |         (i.e. one frequency vector and the corresponding
 | 
|---|
 | 361 |         transmission or flux vector.)
 | 
|---|
 | 362 | \end{itemize}
 | 
|---|
 | 363 | \noindent The way to use these two functions is the following one:
 | 
|---|
 | 364 | \begin{itemize}
 | 
|---|
 | 365 | \item{} {{\bf tgsky:}}
 | 
|---|
 | 366 | \begin{verbatim}
 | 
|---|
 | 367 |   Usage: tgsky NSide TypSky Params FitsFile [PPF] 
 | 
|---|
 | 368 | \end{verbatim}
 | 
|---|
 | 369 | where PPF stands for Planck Persistent File (which can be read using piapp or spiapp),
 | 
|---|
 | 370 | NSide is the Healpix map parameter and TypSky and Params are described here:
 | 
|---|
 | 371 | \begin{maliste}
 | 
|---|
 | 372 | \item  if TypSky = 0, the map will be filled with a gaussian noise,
 | 
|---|
 | 373 |         the parameters (Params) are therefore the mean value and the sigma
 | 
|---|
 | 374 |         of the gaussian.
 | 
|---|
 | 375 | \item  if TypSky = 1, the map will be filled with a $1/\hbox{f}$ noise using
 | 
|---|
 | 376 |         the OOFNoise generator. The parameters to give are the
 | 
|---|
 | 377 |         sigma of the noise and a constant offset.
 | 
|---|
 | 378 | \item  if TypSky = 2, the map is filled with an analytical function of the
 | 
|---|
 | 379 |         form:   
 | 
|---|
 | 380 |         \begin{eqnarray}
 | 
|---|
 | 381 |         f &=& K \cos(a\theta)\sin(b\phi)+m
 | 
|---|
 | 382 |         \end{eqnarray}
 | 
|---|
 | 383 |         and the corresponding parameters are (in this order): K,a,b,m.
 | 
|---|
 | 384 | \item  if TypSky = 3, the map is filled with a dipole,
 | 
|---|
 | 385 |         the corresponding parameters are (in this order): theta,phi
 | 
|---|
 | 386 |         corresponding to the dipole orientation
 | 
|---|
 | 387 | \end{maliste}
 | 
|---|
 | 388 | \item{}{{\bf tgrsr:}}
 | 
|---|
 | 389 | \begin{verbatim}
 | 
|---|
 | 390 |  Usage: tgrsr choice Params NPoints FitsFileName 
 | 
|---|
 | 391 |                       [ImageR4FITSName] [ppfname]
 | 
|---|
 | 392 | \end{verbatim}
 | 
|---|
 | 393 | where choice, and Params are described below, and NPoints corresponds
 | 
|---|
 | 394 | to the number of elements in the generated vectors.
 | 
|---|
 | 395 | \begin{maliste}
 | 
|---|
 | 396 | \item if choice = 0, the code will generate a gaussian spectrum in a Fits file.
 | 
|---|
 | 397 |         Params are therefore the parameters of the gaussian plus the
 | 
|---|
 | 398 |         minimum and the maximum frequency.
 | 
|---|
 | 399 |         In the order:  A,Nu0,DNu,MinFreq,MaxFreq.
 | 
|---|
 | 400 | \item if choice = 1, the code will generate a power law spectrum in a 
 | 
|---|
 | 401 |         Fits file. Params are therefore, in the order:\\
 | 
|---|
 | 402 |         A, Nu0, dnu, b, MinFreq, MaxFreq
 | 
|---|
 | 403 | \end{maliste}
 | 
|---|
 | 404 | \end{itemize}
 | 
|---|
 | 405 | 
 | 
|---|
 | 406 | 
 | 
|---|
 | 407 | 
 | 
|---|
 | 408 | \section{The SkyT module}
 | 
|---|
 | 409 | The SkyT module is composed of two types of classes:
 | 
|---|
 | 410 | \begin{itemize}
 | 
|---|
 | 411 | \item{} one which corresponds to an emission spectrum of
 | 
|---|
 | 412 | radiation, which is called RadSpectra
 | 
|---|
 | 413 | \item{} one which corresponds to the spectral response
 | 
|---|
 | 414 | of a given detector (i.e. corresponding to a detector
 | 
|---|
 | 415 | filter in a given frequency domain), which is called
 | 
|---|
 | 416 | SpectralResponse.
 | 
|---|
 | 417 | \end{itemize}
 | 
|---|
 | 418 | In the coming sub-sections, we summarize the different functions
 | 
|---|
 | 419 | of these two classes and the corresponding subclasses.
 | 
|---|
 | 420 | For more informations about the classes, and the functions
 | 
|---|
 | 421 | the user may want to use (to have access or reset some
 | 
|---|
 | 422 | parameter values for example), we refer the reader to 
 | 
|---|
 | 423 | \cite{DOX-Sophya}.
 | 
|---|
 | 424 | 
 | 
|---|
 | 425 | All frequencies are expressed in $\hbox{GHz}$, which enables
 | 
|---|
 | 426 | us to represent wavelengths from the radio up to the optical 
 | 
|---|
 | 427 | range at a reasonnable accuracy using double values.
 | 
|---|
 | 428 | 
 | 
|---|
 | 429 | \subsection{ConvTools}
 | 
|---|
 | 430 | The ConvTools class is a very simple class where are
 | 
|---|
 | 431 | defined some needed constants for the computation of the
 | 
|---|
 | 432 | spectral emission function, such as:
 | 
|---|
 | 433 | \begin{verbatim}
 | 
|---|
 | 434 | // Boltzman constant  J/K
 | 
|---|
 | 435 | double ConvTools::kb =  1.380662e-23;     
 | 
|---|
 | 436 | // Mean value of the cmb temperature (K)
 | 
|---|
 | 437 | double ConvTools::tcmb=2.728;
 | 
|---|
 | 438 | // Planck constant in Js
 | 
|---|
 | 439 | double ConvTools::hpl=6.626176e-34;   
 | 
|---|
 | 440 | // Light speed  PDG 1992 m/s
 | 
|---|
 | 441 | double ConvTools::c=299792458.; 
 | 
|---|
 | 442 | \end{verbatim}
 | 
|---|
 | 443 | 
 | 
|---|
 | 444 | \subsection{SpectralResponse}
 | 
|---|
 | 445 | \label{specresp}
 | 
|---|
 | 446 | SpectralResponse 
 | 
|---|
 | 447 | is an abstract class representing 
 | 
|---|
 | 448 | a detector frequency filter
 | 
|---|
 | 449 | response, $W_\nu$ as a function of the frequency.
 | 
|---|
 | 450 | Several subclasses
 | 
|---|
 | 451 | have been written within the SkyT module which are listed
 | 
|---|
 | 452 | in the following subsections.
 | 
|---|
 | 453 | The constructor takes as arguments the
 | 
|---|
 | 454 | minimum and maximum values of the frequency range on
 | 
|---|
 | 455 | which the detector response is defined
 | 
|---|
 | 456 | 
 | 
|---|
 | 457 | The main public member function is the  
 | 
|---|
 | 458 | transmission function which has to be implemented
 | 
|---|
 | 459 | in the subclasses and is purely virtual at this stage:
 | 
|---|
 | 460 | \begin{verbatim}
 | 
|---|
 | 461 | virtual double transmission(double nu) const =0 ; 
 | 
|---|
 | 462 | \end{verbatim}
 | 
|---|
 | 463 | The () operator has also been redefined so that
 | 
|---|
 | 464 | one can access the transmission value of the detector's
 | 
|---|
 | 465 | filter directly writting for example myFilter(myfrequency).
 | 
|---|
 | 466 | 
 | 
|---|
 | 467 | Other member functions  are implemented at this level, but still
 | 
|---|
 | 468 | are virtual functions that can be re-implemented in the
 | 
|---|
 | 469 | sub-classes: they respectively returns the minimum, the
 | 
|---|
 | 470 | maximum, the mean and the peak values of the frequency
 | 
|---|
 | 471 | range (where the peak is defined as the maximum of the transmission
 | 
|---|
 | 472 | spectrum), but also the value of the transmission at the so-called
 | 
|---|
 | 473 | peak. One can also change the range in frequency of the filter
 | 
|---|
 | 474 | using the {{\it setMinMaxFreq}} function.
 | 
|---|
 | 475 | %\begin{verbatim}
 | 
|---|
 | 476 | % virtual double minFreq() const; 
 | 
|---|
 | 477 | % virtual double maxFreq() const; 
 | 
|---|
 | 478 | % virtual double meanFreq() const;
 | 
|---|
 | 479 | % virtual double peakFreq() const;
 | 
|---|
 | 480 | % virtual double peakTransmission() const;
 | 
|---|
 | 481 | % virtual void  setMinMaxFreq(double numin, double numax);
 | 
|---|
 | 482 | %\end{verbatim}
 | 
|---|
 | 483 | For all the sub-classes, $\nu$ is given in units of $GHz$ and
 | 
|---|
 | 484 | $W_\nu$ is dimensionless.
 | 
|---|
 | 485 | 
 | 
|---|
 | 486 | Since the user may want to integrate the detector response
 | 
|---|
 | 487 | within a given frequency range:
 | 
|---|
 | 488 | \begin{eqnarray}
 | 
|---|
 | 489 | \int_{\nu_{min}}^{\nu_{max}} F_\nu \delta \nu\ \ \ ,
 | 
|---|
 | 490 | \end{eqnarray}
 | 
|---|
 | 491 | the following functions are
 | 
|---|
 | 492 | available:
 | 
|---|
 | 493 | \begin{verbatim}
 | 
|---|
 | 494 | double IntegratedSpect(double numin,double numax) 
 | 
|---|
 | 495 | double logIntegratedSpect(double numin,double numax)
 | 
|---|
 | 496 | double IntegratedSpect() 
 | 
|---|
 | 497 | double logIntegratedSpect() 
 | 
|---|
 | 498 | \end{verbatim}
 | 
|---|
 | 499 | When no frequency range is defined the default values are used.
 | 
|---|
 | 500 | As, for some spectra, the calculation is more accurate when
 | 
|---|
 | 501 | one performs the numerical integration using a logarithmic
 | 
|---|
 | 502 | frequency scale.
 | 
|---|
 | 503 | 
 | 
|---|
 | 504 | The following subsections are devoted to the description of the
 | 
|---|
 | 505 | SpectralResponse subclasses which are already implemented.
 | 
|---|
 | 506 | \subsubsection{SquareFilter}
 | 
|---|
 | 507 | \begin{center}
 | 
|---|
 | 508 | \dclsbb{SpectralResponse}{SquareFilter}
 | 
|---|
 | 509 | \end{center}
 | 
|---|
 | 510 | The square filter is the simplest filter one can think of:
 | 
|---|
 | 511 | it is defined by a minimum and a maximum frequencies. 
 | 
|---|
 | 512 | \begin{verbatim}
 | 
|---|
 | 513 | SquareFilter (double numin, double numax)
 | 
|---|
 | 514 | \end{verbatim}
 | 
|---|
 | 515 | The transmission function returns 1 when the tested frequency
 | 
|---|
 | 516 | is within this range and 0 outside.
 | 
|---|
 | 517 | For the peakFrequency and peakTransmission functions, the square
 | 
|---|
 | 518 | filter returns respectively the frequency and the transmission
 | 
|---|
 | 519 | corresponding to the middle of the frequency range.
 | 
|---|
 | 520 | To use the SquareFilter class, one should include the squarefilt.h file.
 | 
|---|
 | 521 | 
 | 
|---|
 | 522 | \subsubsection{TriangleFilter}
 | 
|---|
 | 523 | \begin{center}\dclsbb{SpectralResponse}{TriangleFilter}\end{center}
 | 
|---|
 | 524 | For the triangle filter, as it was the case for the
 | 
|---|
 | 525 | square filter, its name itself is sufficient to define it:
 | 
|---|
 | 526 | the corresponding constructor is:
 | 
|---|
 | 527 | \begin{verbatim}
 | 
|---|
 | 528 |  TriangleFilter (double numin, double numax,
 | 
|---|
 | 529 |                 double nupeak, double valueatpeak); 
 | 
|---|
 | 530 | \end{verbatim}
 | 
|---|
 | 531 | To use the TriangleFilter class, one should include the trianglefilt.h file.
 | 
|---|
 | 532 | 
 | 
|---|
 | 533 | \subsubsection{GaussianFilter}
 | 
|---|
 | 534 | \label{gaussFilt}
 | 
|---|
 | 535 | \begin{center}\dclsbb{SpectralResponse}{GaussianFilter}\end{center}
 | 
|---|
 | 536 | The constructor of the gaussian filter defines the parameters
 | 
|---|
 | 537 | of the corresponding gaussian:
 | 
|---|
 | 538 | \begin{verbatim}
 | 
|---|
 | 539 |  GaussianFilter (double nu0, double s, double A=1., 
 | 
|---|
 | 540 |            double numin=0., double numax= 9.e49); 
 | 
|---|
 | 541 | \end{verbatim}
 | 
|---|
 | 542 | where the transmission function returns:
 | 
|---|
 | 543 | \begin{eqnarray}
 | 
|---|
 | 544 | \label{gaussian}
 | 
|---|
 | 545 | W_\nu&=& A  e^{-{({\nu-\nu_0/ s})^2}};
 | 
|---|
 | 546 | \end{eqnarray}
 | 
|---|
 | 547 | %There are functions to reset or
 | 
|---|
 | 548 | %get back the value of the parameters (there are
 | 
|---|
 | 549 | %described in \cite{}. 
 | 
|---|
 | 550 | %using the 
 | 
|---|
 | 551 | %following functions:
 | 
|---|
 | 552 | %\begin{verbatim}
 | 
|---|
 | 553 | %  double giveNorm()
 | 
|---|
 | 554 | %  double giveNu0()
 | 
|---|
 | 555 | %  double giveDNu()
 | 
|---|
 | 556 | %\end{verbatim}
 | 
|---|
 | 557 | %or reset them with:
 | 
|---|
 | 558 | %\begin{verbatim}
 | 
|---|
 | 559 | %  virtual void setParams(double nu0, double s, double a=1.);
 | 
|---|
 | 560 | %\end{verbatim}
 | 
|---|
 | 561 | To use the GaussianFilter class, one should include the gaussfilt.h file.
 | 
|---|
 | 562 | 
 | 
|---|
 | 563 | \subsubsection{SpecRespVec}
 | 
|---|
 | 564 | \begin{center}\dclsbb{SpectralResponse}{SpecRespVec}\end{center}
 | 
|---|
 | 565 | One may also want to give the filter of a detector as a 
 | 
|---|
 | 566 | set of frequencies and the corresponding filter transmission values,
 | 
|---|
 | 567 | when there is no analytic expression to describe it.
 | 
|---|
 | 568 | In that case he/she should use the SpecRespVec class:
 | 
|---|
 | 569 | \begin{verbatim}
 | 
|---|
 | 570 |   SpecRespVec(Vector const & nu, Vector const & fdenu, 
 | 
|---|
 | 571 |               double numin, double numax)
 | 
|---|
 | 572 | \end{verbatim}
 | 
|---|
 | 573 | The first vector (called nu) is the frequency vector and the
 | 
|---|
 | 574 | second one (called fdenu) is the corresponding transmission:
 | 
|---|
 | 575 | note that the two vectors should have the same length, otherwise
 | 
|---|
 | 576 | an exception will be launched ({\it SzMismatchError}).
 | 
|---|
 | 577 | 
 | 
|---|
 | 578 | %One can access the different vectors with the use
 | 
|---|
 | 579 | %of appropriate functions (cf. \cite{}).
 | 
|---|
 | 580 | %Several functions are defined to access these vectors, either
 | 
|---|
 | 581 | %as a whole or element per element:
 | 
|---|
 | 582 | %\begin{verbatim}
 | 
|---|
 | 583 | %  Vector&  getNuVec()  { return _vecOfNu; } ;
 | 
|---|
 | 584 | %  Vector& getTNuVec()  { return _vecOfFDeNu; }
 | 
|---|
 | 585 | %  double getNuVec(int i) const { return _vecOfNu(i); }
 | 
|---|
 | 586 | %  double getTNuVec(int i) const { return _vecOfFDeNu(i); }
 | 
|---|
 | 587 | %  int NbElts() const { return _size;}
 | 
|---|
 | 588 | %\end{verbatim}
 | 
|---|
 | 589 | To use the SpecRespVec class, one should include the specrespvector.h file.
 | 
|---|
 | 590 | 
 | 
|---|
 | 591 | \subsection{RadSpectra}
 | 
|---|
 | 592 | \label{radspec}
 | 
|---|
 | 593 | The name RadSpectra stands for Radiation Spectrum.
 | 
|---|
 | 594 | The aims of RadSpectra is to define a base class
 | 
|---|
 | 595 | for the radiation emission spectra. It is therefore
 | 
|---|
 | 596 | abstract and contains one virtual member function 
 | 
|---|
 | 597 | which has to be implemented in the subclasses:
 | 
|---|
 | 598 | \begin{verbatim}
 | 
|---|
 | 599 |     virtual double flux(double nu) const =0;
 | 
|---|
 | 600 | \end{verbatim}
 | 
|---|
 | 601 | This function returns the value of the
 | 
|---|
 | 602 | flux (the spectral energy distribution), $F_\nu$,
 | 
|---|
 | 603 | as a function of the frequency $\nu$,
 | 
|---|
 | 604 | As in the SpectralResponse class,
 | 
|---|
 | 605 | the () operator has been redefined at this level, so that
 | 
|---|
 | 606 | the user can access the flux value, either by calling the
 | 
|---|
 | 607 | function or directly by using this operator.
 | 
|---|
 | 608 | 
 | 
|---|
 | 609 | The constructor takes as an argument the minimum
 | 
|---|
 | 610 | and the maximum frequency of the spectrum, if any.
 | 
|---|
 | 611 | In the case the user does not want to specify these
 | 
|---|
 | 612 | values, there are set respectively to 0. and $9.10^{49}$
 | 
|---|
 | 613 | by default.
 | 
|---|
 | 614 | For all the sub-classes, $\nu$ is given in units of $\hbox{GHz}$ and
 | 
|---|
 | 615 | the flux is returned in units of $\hbox{W}/\hbox{m}^2/\hbox{sr}/\hbox{Hz}$.
 | 
|---|
 | 616 | 
 | 
|---|
 | 617 | %We also defined functions to access the minimum, maximum,
 | 
|---|
 | 618 | %peak frequency values, or to change them 
 | 
|---|
 | 619 | %(see \cite{}). 
 | 
|---|
 | 620 | %And the user may change the
 | 
|---|
 | 621 | %values of the frequency range using the function:
 | 
|---|
 | 622 | %\begin{verbatim}
 | 
|---|
 | 623 | %virtual void    setMinMaxFreq(double numin, double numax);
 | 
|---|
 | 624 | %\end{verbatim}
 | 
|---|
 | 625 | One may also want to  integrate the emission
 | 
|---|
 | 626 | spectrum: this can be done in a given frequency
 | 
|---|
 | 627 | range, or in the full range of definition of the spectrum,
 | 
|---|
 | 628 | or  taking into account the
 | 
|---|
 | 629 | SpectralResponse (in frequency) of a detector (see section \ref{specresp}):
 | 
|---|
 | 630 | \begin{verbatim}
 | 
|---|
 | 631 |   virtual double integratedFlux
 | 
|---|
 | 632 |             (double numin, double numax)
 | 
|---|
 | 633 |   virtual double integratedFlux()
 | 
|---|
 | 634 |   virtual double filteredIntegratedFlux 
 | 
|---|
 | 635 |             (SpectralResponse const & filter, 
 | 
|---|
 | 636 |              double numin, double numax)
 | 
|---|
 | 637 |   virtual double filteredIntegratedFlux
 | 
|---|
 | 638 |             (SpectralResponse const & filter)
 | 
|---|
 | 639 |   virtual double logIntegratedFlux
 | 
|---|
 | 640 |             (double numin, double numax) 
 | 
|---|
 | 641 |   virtual double logIntegratedFlux() 
 | 
|---|
 | 642 |   virtual double filteredLogIntFlux
 | 
|---|
 | 643 |             (SpectralResponse const & filter, 
 | 
|---|
 | 644 |              double numin, double numax)
 | 
|---|
 | 645 |   virtual double filteredLogIntFlux
 | 
|---|
 | 646 |             (SpectralResponse const & filter);
 | 
|---|
 | 647 | \end{verbatim}
 | 
|---|
 | 648 | 
 | 
|---|
 | 649 | Several sub-classes of RadSpectra have been defined, which are listed
 | 
|---|
 | 650 | below with their corresponding characteristics.
 | 
|---|
 | 651 | \subsubsection{BlackBody}
 | 
|---|
 | 652 | \begin{center}\dclsbb{RadSpectra}{BlackBody}\end{center}
 | 
|---|
 | 653 | This class corresponds to the emission spectrum of a 
 | 
|---|
 | 654 | blackbody radiation: by default the temperature of the 
 | 
|---|
 | 655 | blackbody is 2.728K (as defined in convtools.cc), but when
 | 
|---|
 | 656 | the object is instanciated the temperature 
 | 
|---|
 | 657 | can be given any other value.
 | 
|---|
 | 658 | \begin{verbatim}
 | 
|---|
 | 659 |   BlackBody (double temp = ConvTools::tcmb);
 | 
|---|
 | 660 | \end{verbatim}
 | 
|---|
 | 661 | The flux function is the well known formula: 
 | 
|---|
 | 662 | \begin{eqnarray}
 | 
|---|
 | 663 | F_\nu &=& {2 h_{pl} (1.10^9*\nu)^3 / c^2 (e^{{h_{pl}(1.10^9*\nu) / kT}} -1)}
 | 
|---|
 | 664 | \end{eqnarray}
 | 
|---|
 | 665 | 
 | 
|---|
 | 666 | %In addition to the flux member function, we can get or set the
 | 
|---|
 | 667 | %temperature of the blackbody spectrum (see \cite{}).
 | 
|---|
 | 668 | %\begin{verbatim}
 | 
|---|
 | 669 | %  double getTemperature() 
 | 
|---|
 | 670 | %  void setTemperature(double newtemp)
 | 
|---|
 | 671 | %\end{verbatim}
 | 
|---|
 | 672 | To use the BlackBody class, one should include the blackbody.h file.
 | 
|---|
 | 673 | 
 | 
|---|
 | 674 | 
 | 
|---|
 | 675 | \subsubsection{DerivBlackBody}
 | 
|---|
 | 676 | \begin{center}\dclsbb{RadSpectra}{DerivBlackBody}\end{center}
 | 
|---|
 | 677 | This class corresponds to the emission spectrum of a 
 | 
|---|
 | 678 | the dipole (since its emission spectrum is the derivation
 | 
|---|
 | 679 | of a blackbody spectrum wrt the temperature): 
 | 
|---|
 | 680 | by default the temperature of the 
 | 
|---|
 | 681 | DerivBlackBody is set 2.728K (as defined in convtools.cc), but when
 | 
|---|
 | 682 | the object is instanciated the temperature 
 | 
|---|
 | 683 | can be given any other value.
 | 
|---|
 | 684 | \begin{verbatim}
 | 
|---|
 | 685 |   DerivBlackBody (double temp = ConvTools::tcmb);
 | 
|---|
 | 686 | \end{verbatim}
 | 
|---|
 | 687 | The flux function is simply given by: 
 | 
|---|
 | 688 | \begin{eqnarray}
 | 
|---|
 | 689 | \label{derivBB}
 | 
|---|
 | 690 | F_\nu &=& {2 h_{pl} (1.10^9*\nu)^3  {h_{pl}1.10^9*\nu \over k T^2}
 | 
|---|
 | 691 |         {e^{{h_{pl}(1.10^9*\nu) \over kT}}\over c^2 (e^{{h_{pl}(1.10^9*\nu) \over kT}} -1)^2}}
 | 
|---|
 | 692 | \end{eqnarray}
 | 
|---|
 | 693 | 
 | 
|---|
 | 694 | %In addition to the flux member function, we can get or set the
 | 
|---|
 | 695 | %temperature as for the spectrum (see \cite{}).:
 | 
|---|
 | 696 | %\begin{verbatim}
 | 
|---|
 | 697 | %  double getTemperature() 
 | 
|---|
 | 698 | %  void setTemperature(double newtemp)
 | 
|---|
 | 699 | %\end{verbatim}
 | 
|---|
 | 700 | To use the DerivBlackBody class, one should include the derivblackbody.h file.
 | 
|---|
 | 701 | 
 | 
|---|
 | 702 | \subsubsection{PowerLawSpectra}
 | 
|---|
 | 703 | \begin{center}\dclsbb{RadSpectra}{DerivBlackBody}\end{center}
 | 
|---|
 | 704 | This class corresponds to a power law spectrum, the
 | 
|---|
 | 705 | flux function being defined as follows:
 | 
|---|
 | 706 | \begin{eqnarray}
 | 
|---|
 | 707 | \label{pls}
 | 
|---|
 | 708 | I_\nu &=& A ({\nu-\nu_0\over \delta\nu})^\beta 
 | 
|---|
 | 709 | \end{eqnarray}
 | 
|---|
 | 710 | The constructor takes as arguments the parameters of this
 | 
|---|
 | 711 | function and therefore reads:
 | 
|---|
 | 712 | \begin{verbatim}
 | 
|---|
 | 713 | PowerLawSpectra(double a, double beta, double nu0, 
 | 
|---|
 | 714 |         double dnu, double numin=0., double numax=9.e49);
 | 
|---|
 | 715 | \end{verbatim}
 | 
|---|
 | 716 | %The intrinsic member functions of this class 
 | 
|---|
 | 717 | %helps getting back these parameters, once an object of this class
 | 
|---|
 | 718 | %has been
 | 
|---|
 | 719 | %instanciated:
 | 
|---|
 | 720 | %\begin{verbatim}
 | 
|---|
 | 721 | %  double giveNorm()
 | 
|---|
 | 722 | %  double giveNu0()
 | 
|---|
 | 723 | %  double giveDNu()
 | 
|---|
 | 724 | %  double giveExp() 
 | 
|---|
 | 725 | %\end{verbatim}
 | 
|---|
 | 726 | %One can also set them using:
 | 
|---|
 | 727 | %\begin{verbatim}
 | 
|---|
 | 728 | %  void setNorm(double myvalue)
 | 
|---|
 | 729 | %  void setNu0(double myvalue)
 | 
|---|
 | 730 | %  void setDNu(double myvalue)
 | 
|---|
 | 731 | %  void setExp(double myvalue) 
 | 
|---|
 | 732 | %\end{verbatim}
 | 
|---|
 | 733 | %
 | 
|---|
 | 734 | To use the PowerLawSpectra class, one should include the nupower.h file.
 | 
|---|
 | 735 | 
 | 
|---|
 | 736 | 
 | 
|---|
 | 737 | \subsubsection{RadSpectraVec}
 | 
|---|
 | 738 | \begin{center}\dclsbb{RadSpectra}{RadSpectraVec}\end{center}
 | 
|---|
 | 739 | As in the case of the SpectralResponse class, one may define the radiation
 | 
|---|
 | 740 | spectrum with two vectors: one for the frequencies and the second for the
 | 
|---|
 | 741 | values of the flux function. In that case, the class to use is RadSpectraVec
 | 
|---|
 | 742 | and the corresponding constructor is:
 | 
|---|
 | 743 | \begin{verbatim}
 | 
|---|
 | 744 |  RadSpectraVec (Vector const nu, Vector const fdenu, 
 | 
|---|
 | 745 |                 double numin=0., double numax=9.e49);
 | 
|---|
 | 746 | \end{verbatim}
 | 
|---|
 | 747 | %The following functions helps getting back the input vectors, or their
 | 
|---|
 | 748 | %number of elements:
 | 
|---|
 | 749 | %\begin{verbatim}
 | 
|---|
 | 750 | %  Vector&  getNuVec()
 | 
|---|
 | 751 | %  Vector& getTNuVec()
 | 
|---|
 | 752 | %  double getNuVec(int i)
 | 
|---|
 | 753 | %  double getTNuVec(int i)
 | 
|---|
 | 754 | %  int NbElts() 
 | 
|---|
 | 755 | %\end{verbatim}
 | 
|---|
 | 756 | To use the RadSpectraVec class, one should include the radspecvector.h file.
 | 
|---|
 | 757 | 
 | 
|---|
 | 758 | \begin{thebibliography}{99}
 | 
|---|
 | 759 | \bibitem{DOX-Sophya}
 | 
|---|
| [1435] | 760 | \url{http://www.sophya.org/}
 | 
|---|
| [988] | 761 | \end{thebibliography}
 | 
|---|
| [1435] | 762 | \end{document}
 | 
|---|