source: Sophya/trunk/SophyaLib/Manual/pmixer.tex@ 1347

Last change on this file since 1347 was 988, checked in by ansari, 25 years ago

Suite de la documentation (sophya.tex) - ajout de pmixer.tex et ex1.inc - Reza 2/5/2000

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