1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
3<!--Converted with LaTeX2HTML 2018.3 (Released July 19, 2018) -->
4<HTML lang="EN">
5<HEAD>
6<TITLE>generate_beam</TITLE>
7<META NAME="description" CONTENT="generate_beam">
8<META NAME="keywords" CONTENT="subroutines">
9<META NAME="resource-type" CONTENT="document">
10<META NAME="distribution" CONTENT="global">
11
12<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
13<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
14<META NAME="Generator" CONTENT="LaTeX2HTML v2018.3">
15   <link rel='apple-touch-icon' sizes='180x180' href='images/favicons/apple-touch-icon.png?v=2017'>
16   <link rel='icon' type='image/png' sizes='32x32' href='images/favicons/favicon-32x32.png?v=2017'>
17   <link rel='icon' type='image/png' sizes='16x16' href='images/favicons/favicon-16x16.png?v=2017'>
18   <link rel='manifest' href='images/favicons/manifest.json?v=2017'>
19   <link rel='mask-icon' href='images/favicons/safari-pinned-tab.svg?v=2017' color='#5bbad5'>
20   <link rel='shortcut icon' href='images/favicons/favicon.ico?v=2017'>
21   <meta name='apple-mobile-web-app-title' content='HEALPix'>
22   <meta name='application-name' content='HEALPix'>
23   <meta name='msapplication-config' content='images/favicons/browserconfig.xml?v=2017'>
24   <meta name='theme-color' content='#ffffff'>
25
26<LINK REL="STYLESHEET" HREF="subroutines.css">
27
28<LINK REL="next" HREF="sub_get_card.htm">
29<LINK REL="previous" HREF="sub_gaussbeam.htm">
30<LINK REL="next" HREF="sub_get_card.htm">
31</HEAD>
32
33<body text="#000000" bgcolor="#FFFFFA">
34
35<DIV CLASS="navigation"><!--Navigation Panel-->
36<A
37 HREF="sub_gaussbeam.htm">
38<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
39<A
40 HREF="sub_HEALPix_F90_subroutines.htm">
41<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
42<A
43 HREF="sub_get_card.htm">
44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
45<A ID="tex2html358"
46  HREF="sub_TABLE_CONTENTS.htm">
47<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
48<BR>
49<B> Previous:</B> <A
50 HREF="sub_gaussbeam.htm">gaussbeam</A>
51
52<B>Up:</B> <A
53 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A>
54
55<B> Next:</B> <A
56 HREF="sub_get_card.htm">get_card</A>
57<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
58<!--End of Navigation Panel-->
59
60<H1><A ID="SECTION3300"></A>
61<A ID="sub:generate_beam"></A>
62<BR>
63
64</H1>
65
66<P>
67<b><font size=+6><FONT COLOR="#CC0000">generate_beam</FONT></font></b><hr>
68<H3>This routine generates the beam window function in multipole space. It is
69  either a gaussian parametrized by its FWHM in arcmin in real space, or it is
70  read from an external file.</H3>
71Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/f90/mod/alm_tools.F90"><b>src/f90/mod/alm_tools.F90</b></a>&nbsp;
72
73<P>
74<hr><h1>FORMAT </h1><blockquote><h3>call <FONT COLOR="#CC0000">generate_beam</FONT>(
75<A HREF="#sub:generate_beam:fwhm_arcmin">fwhm_arcmin</A>, <A HREF="#sub:generate_beam:lmax">lmax</A>, <A HREF="#sub:generate_beam:beam">beam</A><i><font color="#224422">[, <A HREF="#sub:generate_beam:beam_file">beam_file</A>]</font></i>
76)</h3></blockquote>
77Arguments appearing in <i><font color="#224422">italic</font></i> are
78optional.
79
80<P>
81<hr><H1>ARGUMENTS</H1>
82
83<TABLE CELLPADDING=3 BORDER="1">
84<TR><TH ALIGN="LEFT" VALIGN="TOP" WIDTH=200><SPAN  CLASS="textbf">name&nbsp;&amp;&nbsp;dimensionality</SPAN></TH>
85<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=25><SPAN  CLASS="textbf">kind</SPAN></TH>
86<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=50><SPAN  CLASS="textbf">in/out</SPAN></TH>
87<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=175><SPAN  CLASS="textbf">description</SPAN></TH>
88</TR>
89<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>&nbsp;</TD>
90<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>&nbsp;</TD>
91<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>&nbsp;</TD>
92<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>&nbsp;</TD>
93</TR>
94<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>
95fwhm_arcmin<A ID="sub:generate_beam:fwhm_arcmin"></A></TD>
96<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>DP</TD>
97<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
98<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>fwhm size of the gaussian beam in arcminutes.</TD>
99</TR>
100<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>lmax<A ID="sub:generate_beam:lmax"></A></TD>
101<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
102<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
103<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>maximum <SPAN CLASS="MATH"><IMG STYLE="height: 1.69ex; vertical-align: -0.10ex; " SRC="sub_img21.png"
104 ALT="$\ell$"></SPAN> value of the window function.</TD>
105</TR>
106<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>beam<A ID="sub:generate_beam:beam"></A>(0:lmax,1:p)</TD>
107<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>DP</TD>
108<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>OUT</TD>
109<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>beam window function generated. The second index runs form 1:1 for temperature only, and 1:3 for polarisation. In the latter case, 1=T, 2=E, 3=B.</TD>
110</TR>
111<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200><i><font color="#224422">beam_file</font></i><A ID="sub:generate_beam:beam_file"></A>(LEN=<tt>filenamelen</tt>) (OPTIONAL)</TD>
112<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>CHR</TD>
113<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
114<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>name of the file containing
115the (non necessarily gaussian) window function <SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img78.png"
116 ALT="$B_\ell$"></SPAN> of a circular beam. If present, it will override
117the argument <TT>fwhm_arcmin</TT>. If fewer columns than requested are found in
118the file, missing colums will duplicate the existing ones (based on the
119assumption that <SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img78.png"
120 ALT="$B_\ell$"></SPAN> is the same in T, E and B). Supports the <TT>fitsio</TT> 'Extended Filename
121Syntax' (see <A HREF="#sub:generate_beam:ex">examples below</A>).</TD>
122</TR>
123</TABLE>
124
125<P>
126<HR><H1>EXAMPLE:</H1>
127<tt>use <A HREF="sub_healpix_modules_module.htm#sub:healpix_modules">healpix_modules</A>
128<BR>
129real(dp), dimension(0:1024, 1:3) :: gb0, b1, b2, b3
130<BR>
131call generate_beam(5.0_dp, 1024, gb0)
132<BR>
133call generate_beam(0_dp, 1024, b1, beam_file='file.fits')
134<BR>
135call generate_beam(0_dp, 1024, b2, beam_file='file.fits[col 1]')
136<BR>
137call generate_beam(0_dp, 1024, b3, beam_file='file.fits[col 1; 2=0; 3=0]')
138<BR></tt>
139<blockquote><TT>gb0</TT> will contain the window function of a gaussian beam of FWHM = 5 arcmin, for <!-- MATH
140 $\ell
141\leq 1024$
142 -->
143<SPAN CLASS="MATH"><IMG STYLE="height: 1.98ex; vertical-align: -0.41ex; " SRC="sub_img116.png"
144 ALT="$\ell
145\leq 1024$"></SPAN>.
146<BR>
147<TT>b1</TT> will contain the first 3 columns (if available) of <TT>file.fits</TT>. If
148the file contains only two columns, then <TT>b1(:,3) = b1(:,2)</TT>, and
149if it contains a single column, then <TT>b1(:,3) = b1(:,2) = b1(:,1)</TT>.
150<BR>
151<TT>b2</TT> will be
152based on a virtual FITS file containg only the first column of <TT>file.fits</TT>,
153and we will have <TT>b2(:,3) = b2(:,2) = b2(:,1)</TT>.
154<BR>
155Finally <TT>b3</TT> will read a
156virtual FITS file in which the first column is the same as in <TT>file.fits</TT>,
157while the columns 2 and 3 are set to 0. Therefore <TT>b3(:,3) = b3(:,2) = 0</TT>.
158<A ID="sub:generate_beam:ex"></A></blockquote>
159
160<P>
161<hr><H1>MODULES & ROUTINES</H1><H3>This section lists the modules and routines used by <FONT COLOR="#CC0000">generate_beam</FONT>.</h3>
162  <DL COMPACT><DT>
163<B><SPAN  CLASS="textbf">alm_tools</SPAN></B>
164<DD>module, containing:
165	<DT>
166<B><A HREF="sub_gaussbeam.htm#sub:gaussbeam">gaussbeam</A></B>
167<DD>routine to generate a gaussian beam
168  </DL>
169
170<P>
171<hr><H1>RELATED ROUTINES</H1><h3>This section lists the routines related to <b><FONT COLOR="#CC0000">generate_beam</FONT></b></h3>
172
173  <DL COMPACT><DT>
174<B><A HREF="sub_create_alm.htm#sub:create_alm">create_alm</A></B>
175<DD>Routine to create <SPAN CLASS="MATH"><IMG STYLE="height: 1.46ex; vertical-align: -0.45ex; " SRC="sub_img6.png"
176 ALT="$a_{\ell m}$"></SPAN>
177  coefficients using <FONT COLOR="#CC0000">generate_beam</FONT>.
178  <DT>
179<B><A HREF="sub_alter_alm.htm#sub:alter_alm">alter_alm</A></B>
180<DD>Routine to alter <SPAN CLASS="MATH"><IMG STYLE="height: 1.46ex; vertical-align: -0.45ex; " SRC="sub_img6.png"
181 ALT="$a_{\ell m}$"></SPAN>
182  coefficients  using <FONT COLOR="#CC0000">generate_beam</FONT>.
183  <DT>
184<B><A HREF="sub_pixel_window.htm#sub:pixel_window">pixel_window</A></B>
185<DD>Routine returning a pixel
186  window function.
187  </DL>
188
189<P>
190
191<P>
192
193
194<P>
195
196<P>
197
198<DIV CLASS="navigation"><HR>
199<!--Navigation Panel-->
200<A
201 HREF="sub_gaussbeam.htm">
202<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
203<A
204 HREF="sub_HEALPix_F90_subroutines.htm">
205<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
206<A
207 HREF="sub_get_card.htm">
208<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
209<A ID="tex2html358"
210  HREF="sub_TABLE_CONTENTS.htm">
211<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
212<BR>
213<B> Previous:</B> <A
214 HREF="sub_gaussbeam.htm">gaussbeam</A>
215
216<B>Up:</B> <A
217 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A>
218
219<B> Next:</B> <A
220 HREF="sub_get_card.htm">get_card</A>
221<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
222<!--End of Navigation Panel-->
223<ADDRESS>
224Version 3.50, 2018-12-10
225</ADDRESS>
226</BODY>
227</HTML>
228