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>write_plm</TITLE>
7<META NAME="description" CONTENT="write_plm">
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_xcc_v_convert.htm">
29<LINK REL="previous" HREF="sub_write_minimal_header.htm">
30<LINK REL="next" HREF="sub_xcc_v_convert.htm">
31</HEAD>
32
33<body text="#000000" bgcolor="#FFFFFA">
34
35<DIV CLASS="navigation"><!--Navigation Panel-->
36<A
37 HREF="sub_write_minimal_header.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_xcc_v_convert.htm">
44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
45<A ID="tex2html522"
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_write_minimal_header.htm">write_minimal_header</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_xcc_v_convert.htm">xcc_v_convert</A>
57<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
58<!--End of Navigation Panel-->
59
60<H1><A ID="SECTION11500"></A>
61<A ID="sub:write_plm"></A>
62<BR>
63
64</H1>
65
66<P>
67<b><font size=+6><FONT COLOR="#CC0000">write_plm</FONT></font></b><hr>
68<H3>This routine creates a double precision binary FITS-file from a given array. The routine is used by the <b>HEALPix</b> facility plmgen to store precomputed <!-- MATH
69 $P_{\ell m}(\theta)$
70 -->
71<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img41.png"
72 ALT="$P_{\ell m}(\theta)$"></SPAN>.</H3>
73Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/f90/mod/fitstools.F90"><b>src/f90/mod/fitstools.F90</b></a>&nbsp;
74
75<P>
76<hr><h1>FORMAT </h1><blockquote><h3>call <FONT COLOR="#CC0000">write_plm</FONT>(
77<A HREF="#sub:write_plm:plm">plm</A>, <A HREF="#sub:write_plm:nplm">nplm</A>, <A HREF="#sub:write_plm:nhar">nhar</A>, <A HREF="#sub:write_plm:header">header</A>, <A HREF="#sub:write_plm:nlheader">nlheader</A>, <A HREF="#sub:write_plm:filename">filename</A>, <A HREF="#sub:write_plm:nsmax">nsmax</A>, <A HREF="#sub:write_plm:nlmax">nlmax</A>
78)</h3></blockquote>
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&amp;dimensionality</SPAN></TH>
85<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=25><SPAN  CLASS="textbf">kind</SPAN></TH>
86<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=25><SPAN  CLASS="textbf">in/out</SPAN></TH>
87<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=200><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=25>&nbsp;</TD>
92<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>&nbsp;</TD>
93</TR>
94<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>
95plm<A ID="sub:write_plm:plm"></A>(0:nplm-1,1:nhar)</TD>
96<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>DP</TD>
97<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
98<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>the array with the precomputed <!-- MATH
99 $P_{\ell m}(\theta)$
100 -->
101<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img41.png"
102 ALT="$P_{\ell m}(\theta)$"></SPAN> values.</TD>
103</TR>
104<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>nplm<A ID="sub:write_plm:nplm"></A></TD>
105<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
106<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
107<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>Number of <SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img10.png"
108 ALT="$P_{\ell m}$"></SPAN> values to store.</TD>
109</TR>
110<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>nhar<A ID="sub:write_plm:nhar"></A></TD>
111<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
112<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
113<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>1 for scalar <SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img10.png"
114 ALT="$P_{\ell m}$"></SPAN> only and 3 for tensor harmonics.</TD>
115</TR>
116<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>header<A ID="sub:write_plm:header"></A>(LEN=80) (1:nlheader)</TD>
117<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>CHR</TD>
118<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
119<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>The header for the FITS-file.</TD>
120</TR>
121<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>nlheader<A ID="sub:write_plm:nlheader"></A></TD>
122<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
123<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
124<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>number of header lines to write to the file.</TD>
125</TR>
126<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>filename<A ID="sub:write_plm:filename"></A>(LEN=<tt>filenamelen</tt>)</TD>
127<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>CHR</TD>
128<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
129<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>the precomputed <!-- MATH
130 $P_{\ell m}(\theta)$
131 -->
132<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img41.png"
133 ALT="$P_{\ell m}(\theta)$"></SPAN> values are written to this file.</TD>
134</TR>
135<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>nsmax<A ID="sub:write_plm:nsmax"></A></TD>
136<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
137<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
138<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200><!-- MATH
139 $N_{\mathrm{side}}$
140 -->
141<SPAN CLASS="MATH"><I>N</I><SUB>side</SUB></SPAN> for the precomputed <!-- MATH
142 $P_{\ell m}\!\!$
143 -->
144<SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img169.png"
145 ALT="$P_{\ell m}\!\!$"></SPAN> s.</TD>
146</TR>
147<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>nlmax<A ID="sub:write_plm:nlmax"></A></TD>
148<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
149<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>IN</TD>
150<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>maximum <SPAN CLASS="MATH"><IMG STYLE="height: 1.69ex; vertical-align: -0.10ex; " SRC="sub_img21.png"
151 ALT="$\ell$"></SPAN> value for the precomputed <!-- MATH
152 $P_{\ell m}\!\!$
153 -->
154<SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img169.png"
155 ALT="$P_{\ell m}\!\!$"></SPAN> s.</TD>
156</TR>
157</TABLE>
158
159<HR><H1>EXAMPLE:</H1>
160<tt>call write_plm (plm, 65*66*32, 1, header, 120, `plm_32.fits', 32, 64)
161<BR></tt>
162<blockquote>
163Makes a double precision binary FITS-file called `plm_32.fits' from the precomputed <!-- MATH
164 $P_{\ell m}(\theta)$
165 -->
166<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img41.png"
167 ALT="$P_{\ell m}(\theta)$"></SPAN> in the array plm(0:65*66*32-1,1:1). The number 65*66*32 corresponds to the number of precomputed <!-- MATH
168 $P_{\ell m}\!\!$
169 -->
170<SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img169.png"
171 ALT="$P_{\ell m}\!\!$"></SPAN> s needed for a <!-- MATH
172 $N_{\mathrm{side}}=32$
173 -->
174<SPAN CLASS="MATH"><I>N</I><SUB>side</SUB>=32</SPAN> <b>HEALPix</b> map synthesis/analysis. The header for the FITS-file is given in the string array header and the number of lines in the header is 120.
175</blockquote>
176
177<P>
178<hr><H1>MODULES & ROUTINES</H1><H3>This section lists the modules and routines used by <FONT COLOR="#CC0000">write_plm</FONT>.</h3>
179  <DL COMPACT><DT>
180<B><SPAN  CLASS="textbf">fitstools</SPAN></B>
181<DD>module, containing:
182  <DT>
183<B>printerror</B>
184<DD>routine for printing FITS error messages.
185  <DT>
186<B><SPAN  CLASS="textbf">cfitsio</SPAN></B>
187<DD>library for FITS file handling.
188  </DL>
189
190<P>
191<hr><H1>RELATED ROUTINES</H1><h3>This section lists the routines related to <b><FONT COLOR="#CC0000">write_plm</FONT></b></h3>
192
193  <DL COMPACT><DT>
194<B><A HREF="sub_read_dbintab.htm#sub:read_dbintab">read_dbintab</A>, <A HREF="sub_read_bintab.htm#sub:read_bintab">read_bintab</A></B>
195<DD>routines which reads a file created by write_plm.
196  <DT>
197<B><A HREF="sub_map2alm.htm#sub:map2alm">map2alm</A>, <A HREF="sub_alm2map.htm#sub:alm2map">alm2map</A></B>
198<DD>routines using precomputed <!-- MATH
199 $P_{\ell m}(\theta)$
200 -->
201<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img41.png"
202 ALT="$P_{\ell m}(\theta)$"></SPAN>.
203  </DL>
204
205<P>
206
207<P>
208
209
210<P>
211
212<DIV CLASS="navigation"><HR>
213<!--Navigation Panel-->
214<A
215 HREF="sub_write_minimal_header.htm">
216<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
217<A
218 HREF="sub_HEALPix_F90_subroutines.htm">
219<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
220<A
221 HREF="sub_xcc_v_convert.htm">
222<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
223<A ID="tex2html522"
224  HREF="sub_TABLE_CONTENTS.htm">
225<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
226<BR>
227<B> Previous:</B> <A
228 HREF="sub_write_minimal_header.htm">write_minimal_header</A>
229
230<B>Up:</B> <A
231 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A>
232
233<B> Next:</B> <A
234 HREF="sub_xcc_v_convert.htm">xcc_v_convert</A>
235<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
236<!--End of Navigation Panel-->
237<ADDRESS>
238Version 3.50, 2018-12-10
239</ADDRESS>
240</BODY>
241</HTML>
242