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>remove_dipole*</TITLE> 7<META NAME="description" CONTENT="remove_dipole*"> 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_ring_analysis.htm"> 29<LINK REL="previous" HREF="sub_real_fft.htm"> 30<LINK REL="next" HREF="sub_ring_analysis.htm"> 31</HEAD> 32 33<body text="#000000" bgcolor="#FFFFFA"> 34 35<DIV CLASS="navigation"><!--Navigation Panel--> 36<A 37 HREF="sub_real_fft.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_ring_analysis.htm"> 44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> 45<A ID="tex2html476" 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_real_fft.htm">real_fft</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_ring_analysis.htm">ring_analysis</A> 57<B> Top:</B> <a href="main.htm">Main Page</a></DIV> 58<!--End of Navigation Panel--> 59 60<H1><A ID="SECTION9200"></A> 61<A ID="sub:remove_dipole"></A> 62<BR> 63 64</H1> 65 66<P> 67<b><font size=+6><FONT COLOR="#CC0000">remove_dipole*</FONT></font></b><hr> 68<H3>This routine provides a means to fit and remove the dipole and monopole 69from a <b>HEALPix</b> map. The fit is obtained by solving the linear system 70<BR> 71<DIV ALIGN="CENTER"> 72 73<!-- MATH 74 \begin{eqnarray} 75\sum_{j=0}^{d^2-1}\ A_{ij}\ f_j = b_i 76\end{eqnarray} 77 --> 78<SPAN CLASS="MATH"> 79<TABLE CELLPADDING="0" ALIGN="CENTER" WIDTH="100%"> 80<TR VALIGN="MIDDLE"><TD NOWRAP WIDTH="50%" ALIGN="RIGHT"><IMG STYLE="height: 6.53ex; vertical-align: -2.91ex; " SRC="sub_img172.png" 81 ALT="$\displaystyle \sum_{j=0}^{d^2-1}\ A_{ij}\ f_j = b_i$"></TD> 82<TD> </TD> 83<TD> </TD> 84<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT"> 85(<SPAN CLASS="arabic">19</SPAN>)</TD></TR> 86</TABLE> 87</SPAN></DIV> 88<BR CLEAR="ALL"><P></P> 89with, <SPAN CLASS="MATH"><I>d</I>=1</SPAN> or <SPAN CLASS="MATH">2</SPAN>, and 90<BR> 91<DIV ALIGN="CENTER"> 92 93<!-- MATH 94 \begin{eqnarray} 95b_i \equiv \sum_{p \in \cal{P}} s_i(p) w(p) m(p), 96\end{eqnarray} 97 --> 98<SPAN CLASS="MATH"> 99<TABLE CELLPADDING="0" ALIGN="CENTER" WIDTH="100%"> 100<TR VALIGN="MIDDLE"><TD NOWRAP WIDTH="50%" ALIGN="RIGHT"><IMG STYLE="height: 4.66ex; vertical-align: -2.94ex; " SRC="sub_img173.png" 101 ALT="$\displaystyle b_i \equiv \sum_{p \in \cal{P}} s_i(p) w(p) m(p),$"></TD> 102<TD> </TD> 103<TD> </TD> 104<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT"> 105(<SPAN CLASS="arabic">20</SPAN>)</TD></TR> 106</TABLE> 107</SPAN></DIV> 108<BR CLEAR="ALL"><P></P> 109<BR> 110<DIV ALIGN="CENTER"> 111 112<!-- MATH 113 \begin{eqnarray} 114A_{ij} \equiv \sum_{p \in \cal{P}} s_i(p) w(p) s_j(p), 115\end{eqnarray} 116 --> 117<SPAN CLASS="MATH"> 118<TABLE CELLPADDING="0" ALIGN="CENTER" WIDTH="100%"> 119<TR VALIGN="MIDDLE"><TD NOWRAP WIDTH="50%" ALIGN="RIGHT"><IMG STYLE="height: 4.66ex; vertical-align: -2.94ex; " SRC="sub_img174.png" 120 ALT="$\displaystyle A_{ij} \equiv \sum_{p \in \cal{P}} s_i(p) w(p) s_j(p),$"></TD> 121<TD> </TD> 122<TD> </TD> 123<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT"> 124(<SPAN CLASS="arabic">21</SPAN>)</TD></TR> 125</TABLE> 126</SPAN></DIV> 127<BR CLEAR="ALL"><P></P> 128where <SPAN CLASS="MATH"><IMG STYLE="height: 1.75ex; vertical-align: -0.10ex; " SRC="sub_img175.png" 129 ALT="$\cal{P}$"></SPAN> is the set of 130valid, unmasked pixels, <SPAN CLASS="MATH"><I>m</I></SPAN> is the input map, <SPAN CLASS="MATH"><I>w</I></SPAN> is pixel weighting, while 131<SPAN CLASS="MATH"><I>s</I><SUB><i>0</i></SUB>(<I>p</I>) = 1</SPAN> and <!-- MATH 132 $s_1(p)=x,\ s_2(p)=y,\ s_3(p)=z$ 133 --> 134<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img176.png" 135 ALT="$s_1(p)=x,\ s_2(p)=y,\ s_3(p)=z$"></SPAN> are 136respectively the monopole and dipole templates. The output map is then 137<BR> 138<DIV ALIGN="CENTER"> 139 140<!-- MATH 141 \begin{eqnarray} 142m'(p) = m(p) - \sum_{i=0}^{d^2-1} f_i s_i(p). 143\end{eqnarray} 144 --> 145<SPAN CLASS="MATH"> 146<TABLE CELLPADDING="0" ALIGN="CENTER" WIDTH="100%"> 147<TR VALIGN="MIDDLE"><TD NOWRAP WIDTH="50%" ALIGN="RIGHT"><IMG STYLE="height: 6.24ex; vertical-align: -2.60ex; " SRC="sub_img177.png" 148 ALT="$\displaystyle m'(p) = m(p) - \sum_{i=0}^{d^2-1} f_i s_i(p).$"></TD> 149<TD> </TD> 150<TD> </TD> 151<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT"> 152(<SPAN CLASS="arabic">22</SPAN>)</TD></TR> 153</TABLE> 154</SPAN></DIV> 155<BR CLEAR="ALL"><P></P> 156</H3> 157Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/f90/mod/pix_tools.F90"><b>src/f90/mod/pix_tools.F90</b></a> 158 159<P> 160<hr><h1>FORMAT </h1><blockquote><h3>call <FONT COLOR="#CC0000">remove_dipole*</FONT>( 161<A HREF="#sub:remove_dipole:nside">nside</A>, <A HREF="#sub:remove_dipole:map">map</A>, <A HREF="#sub:remove_dipole:ordering">ordering</A>, <A HREF="#sub:remove_dipole:degree">degree</A>, <A HREF="#sub:remove_dipole:multipoles">multipoles</A>, <A HREF="#sub:remove_dipole:zbounds">zbounds</A>[, <A HREF="#sub:remove_dipole:fmissval">fmissval</A>, <A HREF="#sub:remove_dipole:mask">mask</A>, <A HREF="#sub:remove_dipole:weights">weights</A>] 162)</h3></blockquote> 163 164<P> 165<hr><H1>ARGUMENTS</H1> 166 167<TABLE CELLPADDING=3 BORDER="1"> 168<TR><TH ALIGN="LEFT" VALIGN="TOP" WIDTH=160><SPAN CLASS="textbf">name & dimensionality</SPAN></TH> 169<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=25><SPAN CLASS="textbf">kind</SPAN></TH> 170<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=40><SPAN CLASS="textbf">in/out</SPAN></TH> 171<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=225><SPAN CLASS="textbf">description</SPAN></TH> 172</TR> 173<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160> </TD> 174<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25> </TD> 175<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40> </TD> 176<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225> </TD> 177</TR> 178<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160> 179nside<A ID="sub:remove_dipole:nside"></A></TD> 180<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD> 181<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 182<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225>value of <!-- MATH 183 $N_{\mathrm{side}}$ 184 --> 185<SPAN CLASS="MATH"><I>N</I><SUB>side</SUB></SPAN> resolution parameter for input map</TD> 186</TR> 187<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>map<A ID="sub:remove_dipole:map"></A>(0:12*nside*nside-1)</TD> 188<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>SP/ DP</TD> 189<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>INOUT</TD> 190<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225><b>HEALPix</b> map from which the monopole and dipole will be 191 removed. Those are removed from <EM>all unflagged pixels</EM>, 192 even those excluded by the cut <TT>zounds</TT> or the <TT>mask</TT>.</TD> 193</TR> 194<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>ordering<A ID="sub:remove_dipole:ordering"></A></TD> 195<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD> 196<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 197<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225><b>HEALPix</b> scheme 1:RING, 2: NESTED</TD> 198</TR> 199<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>degree<A ID="sub:remove_dipole:degree"></A></TD> 200<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD> 201<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 202<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225>multipoles to fit and remove. It is either 0 (nothing done), 203 1 (monopole only) or 2 (monopole and dipole).</TD> 204</TR> 205<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>multipoles<A ID="sub:remove_dipole:multipoles"></A>(0:degree*degree-1)</TD> 206<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>DP</TD> 207<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>OUT</TD> 208<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225>values of best fit monopole and 209 dipole. The monopole is described as a scalar in the same 210 units as the input map, the dipole as a 3D cartesian vector, in the same units.</TD> 211</TR> 212<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>zbounds<A ID="sub:remove_dipole:zbounds"></A>(1:2)</TD> 213<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>DP</TD> 214<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 215<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225>section of the map on which to perform the 216 fit, expressed in terms of <!-- MATH 217 $z=\sin({\rm latitude}) = 218 \cos(\theta)$ 219 --> 220<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img88.png" 221 ALT="$z=\sin({\rm latitude}) = 222\cos(\theta)$"></SPAN>. If zbounds(1)<SPAN CLASS="MATH"><</SPAN>zbounds(2), it is 223performed <EM>on</EM> the strip zbounds(1)<SPAN CLASS="MATH"><<I>z</I><</SPAN>zbounds(2); if not, 224it is performed <EM>outside</EM> the strip 225zbounds(2)<SPAN CLASS="MATH"><IMG STYLE="height: 1.87ex; vertical-align: -0.41ex; " SRC="sub_img43.png" 226 ALT="$\le z \le$"></SPAN>zbounds(1). If absent, the whole map is processed. 227</TD> 228</TR> 229<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>fmissval<A ID="sub:remove_dipole:fmissval"></A> (OPTIONAL)</TD> 230<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>SP/ DP</TD> 231<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 232<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225>value used to flag bad pixel on input 233 <b>default:</b>-1.6375e30. Pixels with that value are ignored 234 during the fit, and left unchanged on output.</TD> 235</TR> 236<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>mask<A ID="sub:remove_dipole:mask"></A>(0:12*nside*nside-1) (OPTIONAL)</TD> 237<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>SP/ DP</TD> 238<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 239<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225>mask of valid pixels. 240 Pixels with <SPAN CLASS="MATH">|</SPAN>mask<SPAN CLASS="MATH">|<10<SUP>-10</SUP></SPAN> are not used for fit. Note: 241 the map is <EM>not</EM> multiplied by the mask.</TD> 242</TR> 243<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=160>weights<A ID="sub:remove_dipole:weights"></A>(0:12*nside*nside-1) (OPTIONAL)</TD> 244<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>SP/ DP</TD> 245<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 246<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=225>weight to be 247given to each map pixel before doing the fit. By default pixels are given 248a uniform weight of 1. Note: 249 the output map is <EM>not</EM> multiplied by the weights.</TD> 250</TR> 251</TABLE> 252 253<P> 254 255<HR><H1>EXAMPLE:</H1> 256<tt>s = sin(15.0_dp * <A HREF="sub_healpix_types_module.htm#sub:healpix_types:deg2rad">DEG2RAD</A>) 257<BR> 258call <FONT COLOR="#CC0000">remove_dipole*</FONT>(128, map, 1, 2, multipoles, (<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img17.png" 259 ALT="$\backslash$"></SPAN> s, -s <SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="sub_img17.png" 260 ALT="$\backslash$"></SPAN>) ) 261<BR></tt> 262<blockquote> 263Will compute and remove the best fit monopole and dipole from a map with 264<!-- MATH 265 $N_{\mathrm{side}}=128$ 266 --> 267<SPAN CLASS="MATH"><I>N</I><SUB>side</SUB>=128</SPAN> in RING ordering scheme. The fit is performed on pixels with <SPAN CLASS="MATH">|b|>15<SUP><i>o</i></SUP></SPAN>. 268</blockquote> 269 270<P> 271<hr><H1>MODULES & ROUTINES</H1><H3>This section lists the modules and routines used by <FONT COLOR="#CC0000">remove_dipole*</FONT>.</h3> 272 <DL COMPACT><DT> 273<B><SPAN CLASS="textbf">pix_tools</SPAN></B> 274<DD>module, containing: 275</DL> 276 277<P> 278<hr><H1>RELATED ROUTINES</H1><h3>This section lists the routines related to <b><FONT COLOR="#CC0000">remove_dipole*</FONT></b></h3> 279 280 <DL COMPACT><DT> 281<B><A HREF="sub_add_dipole.htm#sub:add_dipole">add_dipole</A></B> 282<DD>routine to add a dipole and 283 monopole to a map. 284 </DL> 285 286<P> 287 288<P> 289 290 291<P> 292 293<P> 294 295<DIV CLASS="navigation"><HR> 296<!--Navigation Panel--> 297<A 298 HREF="sub_real_fft.htm"> 299<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A> 300<A 301 HREF="sub_HEALPix_F90_subroutines.htm"> 302<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A> 303<A 304 HREF="sub_ring_analysis.htm"> 305<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> 306<A ID="tex2html476" 307 HREF="sub_TABLE_CONTENTS.htm"> 308<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A> 309<BR> 310<B> Previous:</B> <A 311 HREF="sub_real_fft.htm">real_fft</A> 312 313<B>Up:</B> <A 314 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A> 315 316<B> Next:</B> <A 317 HREF="sub_ring_analysis.htm">ring_analysis</A> 318<B> Top:</B> <a href="main.htm">Main Page</a></DIV> 319<!--End of Navigation Panel--> 320<ADDRESS> 321Version 3.50, 2018-12-10 322</ADDRESS> 323</BODY> 324</HTML> 325