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

Last change on this file since 3037 was 1435, checked in by ansari, 25 years ago

MAJ doc Sophya overview - Preparation pour release - Reza 7/3/2001

File size: 27.2 KB
RevLine 
[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{
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
[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}
177The radiation spectra corresponding to the sky component
178maps can either be defined in a fits files, or by the instanciation
179of the RadSpectra class (cf. \ref{radspec}), or they can depend
180on the position in the map. The different cases are treated differently
181as explained below. There is also the possibility of adding
182a dipole component without the use of a map, as described below.
183
184\subsubsection{A Fits file}
185The user can provide the skymixer program with his own
186Fits file containing 2 $\times$ n arrays (one for the frequencies and
187one for the corresponding flux values), and a frequency range.
188It 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}
194The flux function will returns 0 outside of the
195$[ \hbox{Numin,Numax} ]$ range.
196
197\subsubsection{The RadSpectra class}
198For well-known spectra, the user does not have to provide
199a Fits file, nor the function, but rather use already coded
200functions, filling the desired parameter values.
201For 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}
211The user has to give the temperature (here 2.726K).
212
213Another example is given below where one wants to use a
214power 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}
223In the case the emission spectrum depends on the position
224in the map (for example for the case of synchrotron radiation),
225one 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}
235In this case, a second argument is needed for BETAFITSFILEi
236which corresponds to the normalization frequency value.
237It is possible to perform the computation using a $\beta$ map
238which has a different number of pixels than the sky map.
239It is also possible to change the NSideHealpix of the
240$\beta$ map for example to low down the resolution for faster
241computation. This is done using the third argument
242(NsideRePixelization, here taken to be 16). For negative values
243of NsideRePixelization, the original $\beta$ map resolution
244is used.
245
246One can refer to Eq.~\ref{pls} for the formula of the
247radiation spectrum built from the $\beta$ map. In this equation,
248$\nu_0$ is set to 0 and $\delta \nu$ is given the value of
249the normalisation
250frequency of the map.
251
252\subsubsection{The dipole}
253The dipole can be treated in a different manner than the other
254sky components,
255using 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}
262In that case no MAPFITSFILEi is needed: the DIPOLE
263card will create the sky map according to the
264$(\theta,\phi)$ user requirement and integrate
265the dipole radiation spectrum (DerivBlackBody - cf.~Eq.\ref{derivBB})
266over the filter response.
267Note that if the user prefers to give his own map, he
268can do it as well.
269
270\section{Treating point sources}
271The 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
274set of discrete frequencies
275\item{} maps of a small patch of the sky with emission spectrum described
276at a set of discrete frequencies.
277\end{itemize}
278
279It treats the case when one has made a simulation of a patch of the sky
280producing a set of maps corresponding to the sky emission and the
281point sources emission at
282discrete frequencies,
283and wants to build a random map on the basis of these
284two informations.
285The map produced by
286extractRS can then be given to the skymixer program to be
287added to other sky components.
288
289As for skymixer, the user interacts with extractRS through
290the use of a datacard (described below). The way to call
291it is the following one:
292\begin{verbatim}
293 Usage: extractRS parameterFile outputfits [outppf]
294\end{verbatim}
295where parameterFile is the datacard, and outputfits
296corresponds to the Fits file in which the final map will be
297saved.
298
299An 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}
323We first indicate in the datacard (after the EXT$\_$RS keyword):
324\begin{maliste}
325\item the number of frequency components we are going to
326process: in the example the code will only process
327one frequency component.
328\item and the NSideHealpix corresponding to the healpix output maps
329\end{maliste}
330
331Then comes the path (if any) to the maps, followed by the
332name of the fits files containing the ``maps''
333(these maps are not Healpix spheres but matrices). The keyword for
334the frequency
335components is RADSPECMAPi (with i being the sky component number)
336and for the sources: SOURCEPTMAPi.
337
338The names of the fits
339file should contain the frequency of the map in units of $\hbox{MHz}$.
340For example:
341\begin{verbatim}
342@RADSPECMAP1 eran102_441_00015000mhz.fits
343\end{verbatim}
344corresponds to a frequency of 15000 $\hbox{Mhz}$.
345The sky maps definition is followed by the point source
346fits file, with the keyword SOURCEPTMAPi.
347
348Then comes the definition of the filter (here it is a
349gaussian filter at 143 $\hbox{GHz}$).
350
351\section{Simulating components and adding them}
352For quick simulations, one can use two codes to generate maps,
353detector 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}
369where PPF stands for Planck Persistent File (which can be read using piapp or spiapp),
370NSide 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}
393where choice, and Params are described below, and NPoints corresponds
394to 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}
409The SkyT module is composed of two types of classes:
410\begin{itemize}
411\item{} one which corresponds to an emission spectrum of
412radiation, which is called RadSpectra
413\item{} one which corresponds to the spectral response
414of a given detector (i.e. corresponding to a detector
415filter in a given frequency domain), which is called
416SpectralResponse.
417\end{itemize}
418In the coming sub-sections, we summarize the different functions
419of these two classes and the corresponding subclasses.
420For more informations about the classes, and the functions
421the user may want to use (to have access or reset some
422parameter values for example), we refer the reader to
423\cite{DOX-Sophya}.
424
425All frequencies are expressed in $\hbox{GHz}$, which enables
426us to represent wavelengths from the radio up to the optical
427range at a reasonnable accuracy using double values.
428
429\subsection{ConvTools}
430The ConvTools class is a very simple class where are
431defined some needed constants for the computation of the
432spectral emission function, such as:
433\begin{verbatim}
434// Boltzman constant J/K
435double ConvTools::kb = 1.380662e-23;
436// Mean value of the cmb temperature (K)
437double ConvTools::tcmb=2.728;
438// Planck constant in Js
439double ConvTools::hpl=6.626176e-34;
440// Light speed PDG 1992 m/s
441double ConvTools::c=299792458.;
442\end{verbatim}
443
444\subsection{SpectralResponse}
445\label{specresp}
446SpectralResponse
447is an abstract class representing
448a detector frequency filter
449response, $W_\nu$ as a function of the frequency.
450Several subclasses
451have been written within the SkyT module which are listed
452in the following subsections.
453The constructor takes as arguments the
454minimum and maximum values of the frequency range on
455which the detector response is defined
456
457The main public member function is the
458transmission function which has to be implemented
459in the subclasses and is purely virtual at this stage:
460\begin{verbatim}
461virtual double transmission(double nu) const =0 ;
462\end{verbatim}
463The () operator has also been redefined so that
464one can access the transmission value of the detector's
465filter directly writting for example myFilter(myfrequency).
466
467Other member functions are implemented at this level, but still
468are virtual functions that can be re-implemented in the
469sub-classes: they respectively returns the minimum, the
470maximum, the mean and the peak values of the frequency
471range (where the peak is defined as the maximum of the transmission
472spectrum), but also the value of the transmission at the so-called
473peak. One can also change the range in frequency of the filter
474using 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}
483For all the sub-classes, $\nu$ is given in units of $GHz$ and
484$W_\nu$ is dimensionless.
485
486Since the user may want to integrate the detector response
487within a given frequency range:
488\begin{eqnarray}
489\int_{\nu_{min}}^{\nu_{max}} F_\nu \delta \nu\ \ \ ,
490\end{eqnarray}
491the following functions are
492available:
493\begin{verbatim}
494double IntegratedSpect(double numin,double numax)
495double logIntegratedSpect(double numin,double numax)
496double IntegratedSpect()
497double logIntegratedSpect()
498\end{verbatim}
499When no frequency range is defined the default values are used.
500As, for some spectra, the calculation is more accurate when
501one performs the numerical integration using a logarithmic
502frequency scale.
503
504The following subsections are devoted to the description of the
505SpectralResponse subclasses which are already implemented.
506\subsubsection{SquareFilter}
507\begin{center}
508\dclsbb{SpectralResponse}{SquareFilter}
509\end{center}
510The square filter is the simplest filter one can think of:
511it is defined by a minimum and a maximum frequencies.
512\begin{verbatim}
513SquareFilter (double numin, double numax)
514\end{verbatim}
515The transmission function returns 1 when the tested frequency
516is within this range and 0 outside.
517For the peakFrequency and peakTransmission functions, the square
518filter returns respectively the frequency and the transmission
519corresponding to the middle of the frequency range.
520To use the SquareFilter class, one should include the squarefilt.h file.
521
522\subsubsection{TriangleFilter}
523\begin{center}\dclsbb{SpectralResponse}{TriangleFilter}\end{center}
524For the triangle filter, as it was the case for the
525square filter, its name itself is sufficient to define it:
526the corresponding constructor is:
527\begin{verbatim}
528 TriangleFilter (double numin, double numax,
529 double nupeak, double valueatpeak);
530\end{verbatim}
531To 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}
536The constructor of the gaussian filter defines the parameters
537of 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}
542where the transmission function returns:
543\begin{eqnarray}
544\label{gaussian}
545W_\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}
561To use the GaussianFilter class, one should include the gaussfilt.h file.
562
563\subsubsection{SpecRespVec}
564\begin{center}\dclsbb{SpectralResponse}{SpecRespVec}\end{center}
565One may also want to give the filter of a detector as a
566set of frequencies and the corresponding filter transmission values,
567when there is no analytic expression to describe it.
568In 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}
573The first vector (called nu) is the frequency vector and the
574second one (called fdenu) is the corresponding transmission:
575note that the two vectors should have the same length, otherwise
576an 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}
589To use the SpecRespVec class, one should include the specrespvector.h file.
590
591\subsection{RadSpectra}
592\label{radspec}
593The name RadSpectra stands for Radiation Spectrum.
594The aims of RadSpectra is to define a base class
595for the radiation emission spectra. It is therefore
596abstract and contains one virtual member function
597which has to be implemented in the subclasses:
598\begin{verbatim}
599 virtual double flux(double nu) const =0;
600\end{verbatim}
601This function returns the value of the
602flux (the spectral energy distribution), $F_\nu$,
603as a function of the frequency $\nu$,
604As in the SpectralResponse class,
605the () operator has been redefined at this level, so that
606the user can access the flux value, either by calling the
607function or directly by using this operator.
608
609The constructor takes as an argument the minimum
610and the maximum frequency of the spectrum, if any.
611In the case the user does not want to specify these
612values, there are set respectively to 0. and $9.10^{49}$
613by default.
614For all the sub-classes, $\nu$ is given in units of $\hbox{GHz}$ and
615the 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}
625One may also want to integrate the emission
626spectrum: this can be done in a given frequency
627range, or in the full range of definition of the spectrum,
628or taking into account the
629SpectralResponse (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
649Several sub-classes of RadSpectra have been defined, which are listed
650below with their corresponding characteristics.
651\subsubsection{BlackBody}
652\begin{center}\dclsbb{RadSpectra}{BlackBody}\end{center}
653This class corresponds to the emission spectrum of a
654blackbody radiation: by default the temperature of the
655blackbody is 2.728K (as defined in convtools.cc), but when
656the object is instanciated the temperature
657can be given any other value.
658\begin{verbatim}
659 BlackBody (double temp = ConvTools::tcmb);
660\end{verbatim}
661The flux function is the well known formula:
662\begin{eqnarray}
663F_\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}
672To use the BlackBody class, one should include the blackbody.h file.
673
674
675\subsubsection{DerivBlackBody}
676\begin{center}\dclsbb{RadSpectra}{DerivBlackBody}\end{center}
677This class corresponds to the emission spectrum of a
678the dipole (since its emission spectrum is the derivation
679of a blackbody spectrum wrt the temperature):
680by default the temperature of the
681DerivBlackBody is set 2.728K (as defined in convtools.cc), but when
682the object is instanciated the temperature
683can be given any other value.
684\begin{verbatim}
685 DerivBlackBody (double temp = ConvTools::tcmb);
686\end{verbatim}
687The flux function is simply given by:
688\begin{eqnarray}
689\label{derivBB}
690F_\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}
700To use the DerivBlackBody class, one should include the derivblackbody.h file.
701
702\subsubsection{PowerLawSpectra}
703\begin{center}\dclsbb{RadSpectra}{DerivBlackBody}\end{center}
704This class corresponds to a power law spectrum, the
705flux function being defined as follows:
706\begin{eqnarray}
707\label{pls}
708I_\nu &=& A ({\nu-\nu_0\over \delta\nu})^\beta
709\end{eqnarray}
710The constructor takes as arguments the parameters of this
711function and therefore reads:
712\begin{verbatim}
713PowerLawSpectra(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%
734To use the PowerLawSpectra class, one should include the nupower.h file.
735
736
737\subsubsection{RadSpectraVec}
738\begin{center}\dclsbb{RadSpectra}{RadSpectraVec}\end{center}
739As in the case of the SpectralResponse class, one may define the radiation
740spectrum with two vectors: one for the frequencies and the second for the
741values of the flux function. In that case, the class to use is RadSpectraVec
742and 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}
756To 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}
Note: See TracBrowser for help on using the repository browser.