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 |
|
---|
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}
|
---|
168 | The radiation spectra corresponding to the sky component
|
---|
169 | maps can either be defined in a fits files, or by the instanciation
|
---|
170 | of the RadSpectra class (cf. \ref{radspec}), or they can depend
|
---|
171 | on the position in the map. The different cases are treated differently
|
---|
172 | as explained below. There is also the possibility of adding
|
---|
173 | a dipole component without the use of a map, as described below.
|
---|
174 |
|
---|
175 | \subsubsection{A Fits file}
|
---|
176 | The user can provide the skymixer program with his own
|
---|
177 | Fits file containing 2 $\times$ n arrays (one for the frequencies and
|
---|
178 | one for the corresponding flux values), and a frequency range.
|
---|
179 | It 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}
|
---|
185 | The flux function will returns 0 outside of the
|
---|
186 | $[ \hbox{Numin,Numax} ]$ range.
|
---|
187 |
|
---|
188 | \subsubsection{The RadSpectra class}
|
---|
189 | For well-known spectra, the user does not have to provide
|
---|
190 | a Fits file, nor the function, but rather use already coded
|
---|
191 | functions, filling the desired parameter values.
|
---|
192 | For 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}
|
---|
202 | The user has to give the temperature (here 2.726K).
|
---|
203 |
|
---|
204 | Another example is given below where one wants to use a
|
---|
205 | power 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}
|
---|
214 | In the case the emission spectrum depends on the position
|
---|
215 | in the map (for example for the case of synchrotron radiation),
|
---|
216 | one 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}
|
---|
226 | In this case, a second argument is needed for BETAFITSFILEi
|
---|
227 | which corresponds to the normalization frequency value.
|
---|
228 | It is possible to perform the computation using a $\beta$ map
|
---|
229 | which has a different number of pixels than the sky map.
|
---|
230 | It is also possible to change the NSideHealpix of the
|
---|
231 | $\beta$ map for example to low down the resolution for faster
|
---|
232 | computation. This is done using the third argument
|
---|
233 | (NsideRePixelization, here taken to be 16). For negative values
|
---|
234 | of NsideRePixelization, the original $\beta$ map resolution
|
---|
235 | is used.
|
---|
236 |
|
---|
237 | One can refer to Eq.~\ref{pls} for the formula of the
|
---|
238 | radiation spectrum built from the $\beta$ map. In this equation,
|
---|
239 | $\nu_0$ is set to 0 and $\delta \nu$ is given the value of
|
---|
240 | the normalisation
|
---|
241 | frequency of the map.
|
---|
242 |
|
---|
243 | \subsubsection{The dipole}
|
---|
244 | The dipole can be treated in a different manner than the other
|
---|
245 | sky components,
|
---|
246 | using 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}
|
---|
253 | In that case no MAPFITSFILEi is needed: the DIPOLE
|
---|
254 | card will create the sky map according to the
|
---|
255 | $(\theta,\phi)$ user requirement and integrate
|
---|
256 | the dipole radiation spectrum (DerivBlackBody - cf.~Eq.\ref{derivBB})
|
---|
257 | over the filter response.
|
---|
258 | Note that if the user prefers to give his own map, he
|
---|
259 | can do it as well.
|
---|
260 |
|
---|
261 | \section{Treating point sources}
|
---|
262 | The 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
|
---|
265 | set of discrete frequencies
|
---|
266 | \item{} maps of a small patch of the sky with emission spectrum described
|
---|
267 | at a set of discrete frequencies.
|
---|
268 | \end{itemize}
|
---|
269 |
|
---|
270 | It treats the case when one has made a simulation of a patch of the sky
|
---|
271 | producing a set of maps corresponding to the sky emission and the
|
---|
272 | point sources emission at
|
---|
273 | discrete frequencies,
|
---|
274 | and wants to build a random map on the basis of these
|
---|
275 | two informations.
|
---|
276 | The map produced by
|
---|
277 | extractRS can then be given to the skymixer program to be
|
---|
278 | added to other sky components.
|
---|
279 |
|
---|
280 | As for skymixer, the user interacts with extractRS through
|
---|
281 | the use of a datacard (described below). The way to call
|
---|
282 | it is the following one:
|
---|
283 | \begin{verbatim}
|
---|
284 | Usage: extractRS parameterFile outputfits [outppf]
|
---|
285 | \end{verbatim}
|
---|
286 | where parameterFile is the datacard, and outputfits
|
---|
287 | corresponds to the Fits file in which the final map will be
|
---|
288 | saved.
|
---|
289 |
|
---|
290 | An 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}
|
---|
314 | We first indicate in the datacard (after the EXT$\_$RS keyword):
|
---|
315 | \begin{maliste}
|
---|
316 | \item the number of frequency components we are going to
|
---|
317 | process: in the example the code will only process
|
---|
318 | one frequency component.
|
---|
319 | \item and the NSideHealpix corresponding to the healpix output maps
|
---|
320 | \end{maliste}
|
---|
321 |
|
---|
322 | Then comes the path (if any) to the maps, followed by the
|
---|
323 | name of the fits files containing the ``maps''
|
---|
324 | (these maps are not Healpix spheres but matrices). The keyword for
|
---|
325 | the frequency
|
---|
326 | components is RADSPECMAPi (with i being the sky component number)
|
---|
327 | and for the sources: SOURCEPTMAPi.
|
---|
328 |
|
---|
329 | The names of the fits
|
---|
330 | file should contain the frequency of the map in units of $\hbox{MHz}$.
|
---|
331 | For example:
|
---|
332 | \begin{verbatim}
|
---|
333 | @RADSPECMAP1 eran102_441_00015000mhz.fits
|
---|
334 | \end{verbatim}
|
---|
335 | corresponds to a frequency of 15000 $\hbox{Mhz}$.
|
---|
336 | The sky maps definition is followed by the point source
|
---|
337 | fits file, with the keyword SOURCEPTMAPi.
|
---|
338 |
|
---|
339 | Then comes the definition of the filter (here it is a
|
---|
340 | gaussian filter at 143 $\hbox{GHz}$).
|
---|
341 |
|
---|
342 | \section{Simulating components and adding them}
|
---|
343 | For quick simulations, one can use two codes to generate maps,
|
---|
344 | detector 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}
|
---|
360 | where PPF stands for Planck Persistent File (which can be read using piapp or spiapp),
|
---|
361 | NSide 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}
|
---|
384 | where choice, and Params are described below, and NPoints corresponds
|
---|
385 | to 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}
|
---|
400 | The SkyT module is composed of two types of classes:
|
---|
401 | \begin{itemize}
|
---|
402 | \item{} one which corresponds to an emission spectrum of
|
---|
403 | radiation, which is called RadSpectra
|
---|
404 | \item{} one which corresponds to the spectral response
|
---|
405 | of a given detector (i.e. corresponding to a detector
|
---|
406 | filter in a given frequency domain), which is called
|
---|
407 | SpectralResponse.
|
---|
408 | \end{itemize}
|
---|
409 | In the coming sub-sections, we summarize the different functions
|
---|
410 | of these two classes and the corresponding subclasses.
|
---|
411 | For more informations about the classes, and the functions
|
---|
412 | the user may want to use (to have access or reset some
|
---|
413 | parameter values for example), we refer the reader to
|
---|
414 | \cite{DOX-Sophya}.
|
---|
415 |
|
---|
416 | All frequencies are expressed in $\hbox{GHz}$, which enables
|
---|
417 | us to represent wavelengths from the radio up to the optical
|
---|
418 | range at a reasonnable accuracy using double values.
|
---|
419 |
|
---|
420 | \subsection{ConvTools}
|
---|
421 | The ConvTools class is a very simple class where are
|
---|
422 | defined some needed constants for the computation of the
|
---|
423 | spectral emission function, such as:
|
---|
424 | \begin{verbatim}
|
---|
425 | // Boltzman constant J/K
|
---|
426 | double ConvTools::kb = 1.380662e-23;
|
---|
427 | // Mean value of the cmb temperature (K)
|
---|
428 | double ConvTools::tcmb=2.728;
|
---|
429 | // Planck constant in Js
|
---|
430 | double ConvTools::hpl=6.626176e-34;
|
---|
431 | // Light speed PDG 1992 m/s
|
---|
432 | double ConvTools::c=299792458.;
|
---|
433 | \end{verbatim}
|
---|
434 |
|
---|
435 | \subsection{SpectralResponse}
|
---|
436 | \label{specresp}
|
---|
437 | SpectralResponse
|
---|
438 | is an abstract class representing
|
---|
439 | a detector frequency filter
|
---|
440 | response, $W_\nu$ as a function of the frequency.
|
---|
441 | Several subclasses
|
---|
442 | have been written within the SkyT module which are listed
|
---|
443 | in the following subsections.
|
---|
444 | The constructor takes as arguments the
|
---|
445 | minimum and maximum values of the frequency range on
|
---|
446 | which the detector response is defined
|
---|
447 |
|
---|
448 | The main public member function is the
|
---|
449 | transmission function which has to be implemented
|
---|
450 | in the subclasses and is purely virtual at this stage:
|
---|
451 | \begin{verbatim}
|
---|
452 | virtual double transmission(double nu) const =0 ;
|
---|
453 | \end{verbatim}
|
---|
454 | The () operator has also been redefined so that
|
---|
455 | one can access the transmission value of the detector's
|
---|
456 | filter directly writting for example myFilter(myfrequency).
|
---|
457 |
|
---|
458 | Other member functions are implemented at this level, but still
|
---|
459 | are virtual functions that can be re-implemented in the
|
---|
460 | sub-classes: they respectively returns the minimum, the
|
---|
461 | maximum, the mean and the peak values of the frequency
|
---|
462 | range (where the peak is defined as the maximum of the transmission
|
---|
463 | spectrum), but also the value of the transmission at the so-called
|
---|
464 | peak. One can also change the range in frequency of the filter
|
---|
465 | using 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}
|
---|
474 | For all the sub-classes, $\nu$ is given in units of $GHz$ and
|
---|
475 | $W_\nu$ is dimensionless.
|
---|
476 |
|
---|
477 | Since the user may want to integrate the detector response
|
---|
478 | within a given frequency range:
|
---|
479 | \begin{eqnarray}
|
---|
480 | \int_{\nu_{min}}^{\nu_{max}} F_\nu \delta \nu\ \ \ ,
|
---|
481 | \end{eqnarray}
|
---|
482 | the following functions are
|
---|
483 | available:
|
---|
484 | \begin{verbatim}
|
---|
485 | double IntegratedSpect(double numin,double numax)
|
---|
486 | double logIntegratedSpect(double numin,double numax)
|
---|
487 | double IntegratedSpect()
|
---|
488 | double logIntegratedSpect()
|
---|
489 | \end{verbatim}
|
---|
490 | When no frequency range is defined the default values are used.
|
---|
491 | As, for some spectra, the calculation is more accurate when
|
---|
492 | one performs the numerical integration using a logarithmic
|
---|
493 | frequency scale.
|
---|
494 |
|
---|
495 | The following subsections are devoted to the description of the
|
---|
496 | SpectralResponse subclasses which are already implemented.
|
---|
497 | \subsubsection{SquareFilter}
|
---|
498 | \begin{center}
|
---|
499 | \dclsbb{SpectralResponse}{SquareFilter}
|
---|
500 | \end{center}
|
---|
501 | The square filter is the simplest filter one can think of:
|
---|
502 | it is defined by a minimum and a maximum frequencies.
|
---|
503 | \begin{verbatim}
|
---|
504 | SquareFilter (double numin, double numax)
|
---|
505 | \end{verbatim}
|
---|
506 | The transmission function returns 1 when the tested frequency
|
---|
507 | is within this range and 0 outside.
|
---|
508 | For the peakFrequency and peakTransmission functions, the square
|
---|
509 | filter returns respectively the frequency and the transmission
|
---|
510 | corresponding to the middle of the frequency range.
|
---|
511 | To use the SquareFilter class, one should include the squarefilt.h file.
|
---|
512 |
|
---|
513 | \subsubsection{TriangleFilter}
|
---|
514 | \begin{center}\dclsbb{SpectralResponse}{TriangleFilter}\end{center}
|
---|
515 | For the triangle filter, as it was the case for the
|
---|
516 | square filter, its name itself is sufficient to define it:
|
---|
517 | the corresponding constructor is:
|
---|
518 | \begin{verbatim}
|
---|
519 | TriangleFilter (double numin, double numax,
|
---|
520 | double nupeak, double valueatpeak);
|
---|
521 | \end{verbatim}
|
---|
522 | To 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}
|
---|
527 | The constructor of the gaussian filter defines the parameters
|
---|
528 | of 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}
|
---|
533 | where the transmission function returns:
|
---|
534 | \begin{eqnarray}
|
---|
535 | \label{gaussian}
|
---|
536 | W_\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}
|
---|
552 | To use the GaussianFilter class, one should include the gaussfilt.h file.
|
---|
553 |
|
---|
554 | \subsubsection{SpecRespVec}
|
---|
555 | \begin{center}\dclsbb{SpectralResponse}{SpecRespVec}\end{center}
|
---|
556 | One may also want to give the filter of a detector as a
|
---|
557 | set of frequencies and the corresponding filter transmission values,
|
---|
558 | when there is no analytic expression to describe it.
|
---|
559 | In 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}
|
---|
564 | The first vector (called nu) is the frequency vector and the
|
---|
565 | second one (called fdenu) is the corresponding transmission:
|
---|
566 | note that the two vectors should have the same length, otherwise
|
---|
567 | an 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}
|
---|
580 | To use the SpecRespVec class, one should include the specrespvector.h file.
|
---|
581 |
|
---|
582 | \subsection{RadSpectra}
|
---|
583 | \label{radspec}
|
---|
584 | The name RadSpectra stands for Radiation Spectrum.
|
---|
585 | The aims of RadSpectra is to define a base class
|
---|
586 | for the radiation emission spectra. It is therefore
|
---|
587 | abstract and contains one virtual member function
|
---|
588 | which has to be implemented in the subclasses:
|
---|
589 | \begin{verbatim}
|
---|
590 | virtual double flux(double nu) const =0;
|
---|
591 | \end{verbatim}
|
---|
592 | This function returns the value of the
|
---|
593 | flux (the spectral energy distribution), $F_\nu$,
|
---|
594 | as a function of the frequency $\nu$,
|
---|
595 | As in the SpectralResponse class,
|
---|
596 | the () operator has been redefined at this level, so that
|
---|
597 | the user can access the flux value, either by calling the
|
---|
598 | function or directly by using this operator.
|
---|
599 |
|
---|
600 | The constructor takes as an argument the minimum
|
---|
601 | and the maximum frequency of the spectrum, if any.
|
---|
602 | In the case the user does not want to specify these
|
---|
603 | values, there are set respectively to 0. and $9.10^{49}$
|
---|
604 | by default.
|
---|
605 | For all the sub-classes, $\nu$ is given in units of $\hbox{GHz}$ and
|
---|
606 | the 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}
|
---|
616 | One may also want to integrate the emission
|
---|
617 | spectrum: this can be done in a given frequency
|
---|
618 | range, or in the full range of definition of the spectrum,
|
---|
619 | or taking into account the
|
---|
620 | SpectralResponse (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 |
|
---|
640 | Several sub-classes of RadSpectra have been defined, which are listed
|
---|
641 | below with their corresponding characteristics.
|
---|
642 | \subsubsection{BlackBody}
|
---|
643 | \begin{center}\dclsbb{RadSpectra}{BlackBody}\end{center}
|
---|
644 | This class corresponds to the emission spectrum of a
|
---|
645 | blackbody radiation: by default the temperature of the
|
---|
646 | blackbody is 2.728K (as defined in convtools.cc), but when
|
---|
647 | the object is instanciated the temperature
|
---|
648 | can be given any other value.
|
---|
649 | \begin{verbatim}
|
---|
650 | BlackBody (double temp = ConvTools::tcmb);
|
---|
651 | \end{verbatim}
|
---|
652 | The flux function is the well known formula:
|
---|
653 | \begin{eqnarray}
|
---|
654 | F_\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}
|
---|
663 | To use the BlackBody class, one should include the blackbody.h file.
|
---|
664 |
|
---|
665 |
|
---|
666 | \subsubsection{DerivBlackBody}
|
---|
667 | \begin{center}\dclsbb{RadSpectra}{DerivBlackBody}\end{center}
|
---|
668 | This class corresponds to the emission spectrum of a
|
---|
669 | the dipole (since its emission spectrum is the derivation
|
---|
670 | of a blackbody spectrum wrt the temperature):
|
---|
671 | by default the temperature of the
|
---|
672 | DerivBlackBody is set 2.728K (as defined in convtools.cc), but when
|
---|
673 | the object is instanciated the temperature
|
---|
674 | can be given any other value.
|
---|
675 | \begin{verbatim}
|
---|
676 | DerivBlackBody (double temp = ConvTools::tcmb);
|
---|
677 | \end{verbatim}
|
---|
678 | The flux function is simply given by:
|
---|
679 | \begin{eqnarray}
|
---|
680 | \label{derivBB}
|
---|
681 | F_\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}
|
---|
691 | To use the DerivBlackBody class, one should include the derivblackbody.h file.
|
---|
692 |
|
---|
693 | \subsubsection{PowerLawSpectra}
|
---|
694 | \begin{center}\dclsbb{RadSpectra}{DerivBlackBody}\end{center}
|
---|
695 | This class corresponds to a power law spectrum, the
|
---|
696 | flux function being defined as follows:
|
---|
697 | \begin{eqnarray}
|
---|
698 | \label{pls}
|
---|
699 | I_\nu &=& A ({\nu-\nu_0\over \delta\nu})^\beta
|
---|
700 | \end{eqnarray}
|
---|
701 | The constructor takes as arguments the parameters of this
|
---|
702 | function and therefore reads:
|
---|
703 | \begin{verbatim}
|
---|
704 | PowerLawSpectra(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 | %
|
---|
725 | To use the PowerLawSpectra class, one should include the nupower.h file.
|
---|
726 |
|
---|
727 |
|
---|
728 | \subsubsection{RadSpectraVec}
|
---|
729 | \begin{center}\dclsbb{RadSpectra}{RadSpectraVec}\end{center}
|
---|
730 | As in the case of the SpectralResponse class, one may define the radiation
|
---|
731 | spectrum with two vectors: one for the frequencies and the second for the
|
---|
732 | values of the flux function. In that case, the class to use is RadSpectraVec
|
---|
733 | and 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}
|
---|
747 | To 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} |
---|