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>rotate_coord</TITLE>
7<META NAME="description" CONTENT="rotate_coord">
8<META NAME="keywords" CONTENT="idl">
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="idl.css">
27
28<LINK REL="next" HREF="idl_same_shape_pixels_nest_same.htm">
29<LINK REL="previous" HREF="idl_reorder.htm">
30<LINK REL="next" HREF="idl_same_shape_pixels_nest_same.htm">
31</HEAD>
32
33<body text="#000000" bgcolor="#FFFFFA">
34
35<DIV CLASS="navigation"><!--Navigation Panel-->
36<A
37 HREF="idl_reorder.htm">
38<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
39<A
40 HREF="idl_HEALPix_IDL_subroutines.htm">
41<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
42<A
43 HREF="idl_same_shape_pixels_nest_same.htm">
44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
45<A ID="tex2html407"
46  HREF="idl_TABLE_CONTENTS.htm">
47<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
48<BR>
49<B> Previous:</B> <A
50 HREF="idl_reorder.htm">reorder</A>
51
52<B>Up:</B> <A
53 HREF="idl_HEALPix_IDL_subroutines.htm">HEALPix/IDL subroutines</A>
54
55<B> Next:</B> <A
56 HREF="idl_same_shape_pixels_nest_same.htm">same_shape_pixels_nest &amp; same_shape_pixels_ring</A>
57<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
58<!--End of Navigation Panel-->
59
60<H1><A ID="SECTION6700"></A>
61<A ID="idl:rotate_coord"></A>
62<BR>
63
64</H1>
65
66<P>
67<b><font size=+6><FONT COLOR="#CC0000">rotate_coord</FONT></font></b><hr>
68<H3>This IDL facility provides a means to rotate a set of 3D position
69vectors (and their Stokes parameters <SPAN CLASS="MATH"><I>Q</I></SPAN> and <SPAN CLASS="MATH"><I>U</I></SPAN>) between to astrophysical coordinate systems
70or by an arbitrary rotation.
71</H3>
72Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/idl/misc/rotate_coord.pro"><b>src/idl/misc/rotate_coord.pro</b></a>&nbsp;
73
74<P>
75<hr><h1>FORMAT </h1><h3>IDL>
76<A HREF="#idl:rotate_coord:outvec">Outvec</A> = rotate_coord(<A HREF="#idl:rotate_coord:invec">Invec</A>
77[, <A HREF="#idl:rotate_coord:delta_psi">Delta_Psi=</A>, <A HREF="#idl:rotate_coord:euler_matrix">Euler_Matrix=</A>, <A HREF="#idl:rotate_coord:inco">Inco=</A>, <A HREF="#idl:rotate_coord:outco">Outco=</A>, <A HREF="#idl:rotate_coord:stokes_parameters">Stokes_Parameters=</A>, <A HREF="#idl:rotate_coord:free_norm">/free_norm</A>, <A HREF="#idl:rotate_coord:help">/help</A>] )
78</h3>
79
80<P>
81<hr>
82<H1>QUALIFIERS</H1>
83
84  <DL COMPACT><DT>
85<B>Invec</B>
86<DD><A ID="idl:rotate_coord:invec"></A>      input,  array of size (n,3) : set of 3D position vectors
87<DT>
88<B>Outvec</B>
89<DD><A ID="idl:rotate_coord:outvec"></A>     output, array of size (n,3) : rotated 3D vectors, with the same norms as the input vectors
90<DT>
91<B>Delta_Psi</B>
92<DD><A ID="idl:rotate_coord:delta_psi"></A>       output, vector of size (n) containing the change in azimuth <SPAN CLASS="MATH"><IMG STYLE="height: 2.16ex; vertical-align: -0.55ex; " SRC="idl_img106.png"
93 ALT="$\Delta\psi$"></SPAN> in Radians
94	resulting from the rotation
95       (<A HREF="./intro_HEALPix_conventions.htm#intro:fig:reftqu">measured with respect to the local meridian, from South to East</A>),
96        so that for field of spin <SPAN CLASS="MATH"><I>s</I></SPAN> the output <SPAN CLASS="MATH"><I>Q</I>',<I>U</I>'</SPAN> is related to the input <SPAN CLASS="MATH"><I>Q</I>,<I>U</I></SPAN> via
97                  <!-- MATH
98 $Q' = Q \cos (s\Delta\psi)  -  U \sin (s\Delta\psi),\$
99 -->
100<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="idl_img107.png"
101 ALT="$Q' = Q \cos (s\Delta\psi) - U \sin (s\Delta\psi),\ $"></SPAN>
102                  <!-- MATH
103 $U' = U \cos (s\Delta\psi)  +  Q \sin (s\Delta\psi),$
104 -->
105<SPAN CLASS="MATH"><IMG STYLE="height: 2.33ex; vertical-align: -0.68ex; " SRC="idl_img108.png"
106 ALT="$U' = U \cos (s\Delta\psi) + Q \sin (s\Delta\psi), $"></SPAN>
107       with <SPAN CLASS="MATH"><I>s</I>=2</SPAN> for polarization Stokes parameters
108(for which the specific <A HREF="#idl:rotate_coord:stokes_parameters">Stokes_Parameters</A> is also available).
109<DT>
110<B>Euler_Matrix=</B>
111<DD><A ID="idl:rotate_coord:euler_matrix"></A>       input, array of size (3,3). Euler Matrix
112       describing the rotation to apply to vectors.
113       <b>default:</b>identity : no rotation.
114<BR>
115Can <SPAN  CLASS="textit">not</SPAN> be used together with a change in coordinates.
116<DT>
117<B>Inco=</B>
118<DD><A ID="idl:rotate_coord:inco"></A>       input, character string (either 'Q' or 'C': equatorial,
119    'G': galactic or 'E': ecliptic) describing the input coordinate system
120<DT>
121<B>Outco=</B>
122<DD><A ID="idl:rotate_coord:outco"></A>        input, character string (see above) describing the output
123          coordinate system.
124<BR>
125Can not be used together with <A HREF="#idl:rotate_coord:euler_matrix">Euler_Matrix</A>
126<DT>
127<B>Stokes_Parameters=</B>
128<DD><A ID="idl:rotate_coord:stokes_parameters"></A>       input and output, array of size (n, 2) :
129      values of the <SPAN CLASS="MATH"><I>Q</I></SPAN> and <SPAN CLASS="MATH"><I>U</I></SPAN> Stokes parameters on the sphere for each of
130      the input position vector. <A HREF="./intro_HEALPix_conventions.htm#intro:fig:reftqu"><SPAN CLASS="MATH"><I>Q</I></SPAN> and <SPAN CLASS="MATH"><I>U</I></SPAN> are defined wrt the local
131      meridian and parallel</A> and are therefore transformed in a
132      non-trivial way in case of rotation
133</DL>
134
135<P>
136<hr><H1>KEYWORDS</H1>
137
138  <DL COMPACT><DT>
139<B>/free_norm</B>
140<DD><A ID="idl:rotate_coord:free_norm"></A> if set
141         (and <A HREF="#idl:rotate_coord:stokes_parameters">Stokes_Parameters</A> and/or
142         <A HREF="#idl:rotate_coord:delta_psi">Delta_Psi</A> are present)
143        the input (and output) coordinate vectors are <SPAN  CLASS="textit">not</SPAN> assumed to be normalized to 1.
144        Using this option is therefore safer, but 20 to 30% slower.
145        (Note that 3D vectors produced by
146        <A HREF="idl_ang2vec.htm#idl:ang2vec"><SPAN  CLASS="texttt">ang2vec</SPAN></A>,
147	<A HREF="idl_pix2xxx_ang2xxx_vec2xxx_nes.htm#idl:pix_tools"><SPAN  CLASS="texttt">pix2vec_nest</SPAN></A> and
148        <A HREF="idl_pix2xxx_ang2xxx_vec2xxx_nes.htm#idl:pix_tools"><SPAN  CLASS="texttt">pix2vec_ring</SPAN></A> <SPAN  CLASS="textit">are</SPAN> properly normalized).
149        Ignored when <A HREF="#idl:rotate_coord:stokes_parameters">Stokes_Parameters</A> and
150         <A HREF="#idl:rotate_coord:delta_psi">Delta_Psi</A> are both absent.
151<DT>
152<B>/help</B>
153<DD><A ID="idl:rotate_coord:help"></A>     if set, the documentation header is printed and the routine exits
154</DL>
155
156<P>
157<hr>
158<H1>DESCRIPTION</H1>
159<blockquote>
160<FONT COLOR="#CC0000">rotate_coord</FONT> is a generalisation of the Astro library routine <TT>skyconv</TT>. It allows
161a rotation of 3D position vectors between two standard astronomic coordinates
162system but also an arbitrary active rotation described by its Euler Matrix.
163It can also compute how the linear polarization Stokes parameters (<SPAN CLASS="MATH"><I>Q</I></SPAN> and <SPAN CLASS="MATH"><I>U</I></SPAN>,
164expressed in local coordinates system)
165of each input location are affected by the solid body rotation, or equivalently
166it can output the corresponding change in azimuth.
167</blockquote>
168
169<P>
170<hr><H1>RELATED ROUTINES</H1><h3>This section lists the routines related to <b><FONT COLOR="#CC0000">rotate_coord</FONT></b></h3>
171
172  <DL COMPACT><DT>
173<B>idl</B>
174<DD>version 6.4 or more is necessary to run <FONT COLOR="#CC0000">rotate_coord</FONT>.
175    <DT>
176<B><A HREF="idl_euler_matrix_new.htm#idl:euler_matrix_new">euler_matrix_new</A></B>
177<DD>constructs the Euler Matrix for a set of
178    three angles and three axes of rotation
179    <DT>
180<B><A HREF="idl_ang2vec.htm#idl:ang2vec"><SPAN  CLASS="texttt">ang2vec</SPAN></A>, <A HREF="idl_pix2xxx_ang2xxx_vec2xxx_nes.htm#idl:pix_tools"><SPAN  CLASS="texttt">pix2vec_*</SPAN></A></B>
181<DD>can be used to generate the input 3D vectors
182  </DL>
183
184<P>
185
186<P>
187
188<P>
189
190<DIV CLASS="navigation"><HR>
191<!--Navigation Panel-->
192<A
193 HREF="idl_reorder.htm">
194<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
195<A
196 HREF="idl_HEALPix_IDL_subroutines.htm">
197<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
198<A
199 HREF="idl_same_shape_pixels_nest_same.htm">
200<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
201<A ID="tex2html407"
202  HREF="idl_TABLE_CONTENTS.htm">
203<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
204<BR>
205<B> Previous:</B> <A
206 HREF="idl_reorder.htm">reorder</A>
207
208<B>Up:</B> <A
209 HREF="idl_HEALPix_IDL_subroutines.htm">HEALPix/IDL subroutines</A>
210
211<B> Next:</B> <A
212 HREF="idl_same_shape_pixels_nest_same.htm">same_shape_pixels_nest &amp; same_shape_pixels_ring</A>
213<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
214<!--End of Navigation Panel-->
215<ADDRESS>
216Version 3.50, 2018-12-10
217</ADDRESS>
218</BODY>
219</HTML>
220