wcslib (8.2.2)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>WCSLIB: sph.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">WCSLIB<span id="projectnumber"> 8.2.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_af99bb3c152a306abd27951285ad1127.html">C</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">sph.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<p><a href="sph_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:abcdbd119e57482315882d849f2b04e91" id="r_abcdbd119e57482315882d849f2b04e91"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="sph_8h.html#abcdbd119e57482315882d849f2b04e91">sphx2s</a> (const double eul[5], int nphi, int ntheta, int spt, int sxy, const double phi[], const double theta[], double lng[], double lat[])</td></tr>
<tr class="memdesc:abcdbd119e57482315882d849f2b04e91"><td class="mdescLeft"> </td><td class="mdescRight">Rotation in the pixel-to-world direction. <br /></td></tr>
<tr class="separator:abcdbd119e57482315882d849f2b04e91"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5c0783d56189d48d9f52af05b64a4df6" id="r_a5c0783d56189d48d9f52af05b64a4df6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="sph_8h.html#a5c0783d56189d48d9f52af05b64a4df6">sphs2x</a> (const double eul[5], int nlng, int nlat, int sll, int spt, const double lng[], const double lat[], double phi[], double theta[])</td></tr>
<tr class="memdesc:a5c0783d56189d48d9f52af05b64a4df6"><td class="mdescLeft"> </td><td class="mdescRight">Rotation in the world-to-pixel direction. <br /></td></tr>
<tr class="separator:a5c0783d56189d48d9f52af05b64a4df6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec6222fe1e4d807c9b59980b8e548eb0" id="r_aec6222fe1e4d807c9b59980b8e548eb0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="sph_8h.html#aec6222fe1e4d807c9b59980b8e548eb0">sphdpa</a> (int nfield, double lng0, double lat0, const double lng[], const double lat[], double dist[], double pa[])</td></tr>
<tr class="memdesc:aec6222fe1e4d807c9b59980b8e548eb0"><td class="mdescLeft"> </td><td class="mdescRight">Compute angular distance and position angle. <br /></td></tr>
<tr class="separator:aec6222fe1e4d807c9b59980b8e548eb0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ee2e117701f434f0bffbbe52f05d118" id="r_a8ee2e117701f434f0bffbbe52f05d118"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="sph_8h.html#a8ee2e117701f434f0bffbbe52f05d118">sphpad</a> (int nfield, double lng0, double lat0, const double dist[], const double pa[], double lng[], double lat[])</td></tr>
<tr class="memdesc:a8ee2e117701f434f0bffbbe52f05d118"><td class="mdescLeft"> </td><td class="mdescRight">Compute field points offset from a given point. <br /></td></tr>
<tr class="separator:a8ee2e117701f434f0bffbbe52f05d118"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Routines in this suite implement the spherical coordinate transformations defined by the FITS World Coordinate System (WCS) standard </p><div class="fragment"><div class="line"><span class="stringliteral">"Representations of world coordinates in FITS"</span>,</div>
<div class="line">Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I)</div>
<div class="line"> </div>
<div class="line"><span class="stringliteral">"Representations of celestial coordinates in FITS"</span>,</div>
<div class="line">Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II)</div>
</div><!-- fragment --><p>The transformations are implemented via separate functions, <a class="el" href="sph_8h.html#abcdbd119e57482315882d849f2b04e91" title="Rotation in the pixel-to-world direction.">sphx2s()</a> and <a class="el" href="sph_8h.html#a5c0783d56189d48d9f52af05b64a4df6" title="Rotation in the world-to-pixel direction.">sphs2x()</a>, for the spherical rotation in each direction.</p>
<p>A utility function, <a class="el" href="sph_8h.html#aec6222fe1e4d807c9b59980b8e548eb0" title="Compute angular distance and position angle.">sphdpa()</a>, computes the angular distances and position angles from a given point on the sky to a number of other points. <a class="el" href="sph_8h.html#a8ee2e117701f434f0bffbbe52f05d118" title="Compute field points offset from a given point.">sphpad()</a> does the complementary operation - computes the coordinates of points offset by the given angular distances and position angles from a given point on the sky. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="abcdbd119e57482315882d849f2b04e91" name="abcdbd119e57482315882d849f2b04e91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abcdbd119e57482315882d849f2b04e91">◆ </a></span>sphx2s()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int sphx2s </td>
<td>(</td>
<td class="paramtype">const double </td>
<td class="paramname"><em>eul</em>[5], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nphi</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>ntheta</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>spt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>sxy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>phi</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>theta</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lng</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lat</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Rotation in the pixel-to-world direction. </p>
<p><b>sphx2s</b>() transforms native coordinates of a projection to celestial coordinates.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">eul</td><td>Euler angles for the transformation:<ul>
<li>0: Celestial longitude of the native pole [deg].</li>
<li>1: Celestial colatitude of the native pole, or native colatitude of the celestial pole [deg].</li>
<li>2: Native longitude of the celestial pole [deg].</li>
<li>3: <picture><source srcset="form_48_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$cos$" src="form_48.png" width="16" height="6"/></picture>(eul[1])</li>
<li>4: <picture><source srcset="form_49_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$sin$" src="form_49.png" width="18" height="9"/></picture>(eul[1]) </li>
</ul>
</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">nphi,ntheta</td><td>Vector lengths. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">spt,sxy</td><td>Vector strides. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">phi,theta</td><td>Longitude and latitude in the native coordinate system of the projection [deg].</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">lng,lat</td><td>Celestial longitude and latitude [deg]. These may refer to the same storage as <em>phi</em> and <em>theta</em> respectively.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success. </li>
</ul>
</dd></dl>
</div>
</div>
<a id="a5c0783d56189d48d9f52af05b64a4df6" name="a5c0783d56189d48d9f52af05b64a4df6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c0783d56189d48d9f52af05b64a4df6">◆ </a></span>sphs2x()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int sphs2x </td>
<td>(</td>
<td class="paramtype">const double </td>
<td class="paramname"><em>eul</em>[5], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nlng</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nlat</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>sll</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>spt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>lng</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>lat</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>phi</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>theta</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Rotation in the world-to-pixel direction. </p>
<p><b>sphs2x</b>() transforms celestial coordinates to the native coordinates of a projection.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">eul</td><td>Euler angles for the transformation:<ul>
<li>0: Celestial longitude of the native pole [deg].</li>
<li>1: Celestial colatitude of the native pole, or native colatitude of the celestial pole [deg].</li>
<li>2: Native longitude of the celestial pole [deg].</li>
<li>3: <picture><source srcset="form_48_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$cos$" src="form_48.png" width="16" height="6"/></picture>(eul[1])</li>
<li>4: <picture><source srcset="form_49_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$sin$" src="form_49.png" width="18" height="9"/></picture>(eul[1]) </li>
</ul>
</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">nlng,nlat</td><td>Vector lengths. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">sll,spt</td><td>Vector strides. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lng,lat</td><td>Celestial longitude and latitude [deg].</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">phi,theta</td><td>Longitude and latitude in the native coordinate system of the projection [deg]. These may refer to the same storage as <em>lng</em> and <em>lat</em> respectively.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success. </li>
</ul>
</dd></dl>
</div>
</div>
<a id="aec6222fe1e4d807c9b59980b8e548eb0" name="aec6222fe1e4d807c9b59980b8e548eb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec6222fe1e4d807c9b59980b8e548eb0">◆ </a></span>sphdpa()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int sphdpa </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>nfield</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lng0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lat0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>lng</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>lat</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>dist</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>pa</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute angular distance and position angle. </p>
<p><b>sphdpa</b>() computes the angular distance and generalized position angle (see notes) from a "reference" point to a number of "field" points on the sphere. The points must be specified consistently in any spherical coordinate system.</p>
<p><b>sphdpa</b>() is complementary to <a class="el" href="sph_8h.html#a8ee2e117701f434f0bffbbe52f05d118" title="Compute field points offset from a given point.">sphpad()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">nfield</td><td>The number of field points. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lng0,lat0</td><td>Spherical coordinates of the reference point [deg]. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lng,lat</td><td>Spherical coordinates of the field points [deg].</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">dist,pa</td><td>Angular distances and position angles [deg]. These may refer to the same storage as <em>lng</em> and <em>lat</em> respectively.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
</ul>
</dd></dl>
<p><b>Notes:</b> <br />
1. <b>sphdpa</b>() uses <a class="el" href="sph_8h.html#a5c0783d56189d48d9f52af05b64a4df6" title="Rotation in the world-to-pixel direction.">sphs2x()</a> to rotate coordinates so that the reference point is at the north pole of the new system with the north pole of the old system at zero longitude in the new. The Euler angles required by <a class="el" href="sph_8h.html#a5c0783d56189d48d9f52af05b64a4df6" title="Rotation in the world-to-pixel direction.">sphs2x()</a> for this rotation are </p><div class="fragment"><div class="line">eul[0] = lng0;</div>
<div class="line">eul[1] = 90.0 - lat0;</div>
<div class="line">eul[2] = 0.0;</div>
</div><!-- fragment --><p>The angular distance and generalized position angle are readily obtained from the longitude and latitude of the field point in the new system. This applies even if the reference point is at one of the poles, in which case the "position angle" returned is as would be computed for a reference point at <picture><source srcset="form_50_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$(\alpha_0,+90^\circ-\epsilon)$" src="form_50.png" width="76" height="14"/></picture> or <picture><source srcset="form_51_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$(\alpha_0,-90^\circ+\epsilon)$" src="form_51.png" width="76" height="14"/></picture>, in the limit as <picture><source srcset="form_45_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$\epsilon$" src="form_45.png" width="5" height="6"/></picture> goes to zero.</p>
<p>It is evident that the coordinate system in which the two points are expressed is irrelevant to the determination of the angular separation between the points. However, this is not true of the generalized position angle.</p>
<p>The generalized position angle is here defined as the angle of intersection of the great circle containing the reference and field points with that containing the reference point and the pole. It has its normal meaning when the the reference and field points are specified in equatorial coordinates (right ascension and declination).</p>
<p>Interchanging the reference and field points changes the position angle in a non-intuitive way (because the sum of the angles of a spherical triangle normally exceeds <picture><source srcset="form_52_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$180^\circ$" src="form_52.png" width="24" height="10"/></picture>).</p>
<p>The position angle is undefined if the reference and field points are coincident or antipodal. This may be detected by checking for a distance of <picture><source srcset="form_53_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$0^\circ$" src="form_53.png" width="13" height="10"/></picture> or <picture><source srcset="form_52_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$180^\circ$" src="form_52.png" width="24" height="10"/></picture> (within rounding tolerance). <b>sphdpa</b>() will return an arbitrary position angle in such circumstances. </p>
</div>
</div>
<a id="a8ee2e117701f434f0bffbbe52f05d118" name="a8ee2e117701f434f0bffbbe52f05d118"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ee2e117701f434f0bffbbe52f05d118">◆ </a></span>sphpad()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int sphpad </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>nfield</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lng0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lat0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>dist</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>pa</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lng</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lat</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute field points offset from a given point. </p>
<p><b>sphpad</b>() computes the coordinates of a set of points that are offset by the specified angular distances and position angles from a given "reference" point on the sky. The distances and position angles must be specified consistently in any spherical coordinate system.</p>
<p><b>sphpad</b>() is complementary to <a class="el" href="sph_8h.html#aec6222fe1e4d807c9b59980b8e548eb0" title="Compute angular distance and position angle.">sphdpa()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">nfield</td><td>The number of field points. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lng0,lat0</td><td>Spherical coordinates of the reference point [deg]. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dist,pa</td><td>Angular distances and position angles [deg].</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">lng,lat</td><td>Spherical coordinates of the field points [deg]. These may refer to the same storage as <em>dist</em> and <em>pa</em> respectively.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
</ul>
</dd></dl>
<p><b>Notes:</b> <br />
</p><ol>
<li>
<b>sphpad</b>() is implemented analogously to <a class="el" href="sph_8h.html#aec6222fe1e4d807c9b59980b8e548eb0" title="Compute angular distance and position angle.">sphdpa()</a> although using <a class="el" href="sph_8h.html#abcdbd119e57482315882d849f2b04e91" title="Rotation in the pixel-to-world direction.">sphx2s()</a> for the inverse transformation. In particular, when the reference point is at one of the poles, "position angle" is interpreted as though the reference point was at <picture><source srcset="form_50_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$(\alpha_0,+90^\circ-\epsilon)$" src="form_50.png" width="76" height="14"/></picture> or <picture><source srcset="form_51_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$(\alpha_0,-90^\circ+\epsilon)$" src="form_51.png" width="76" height="14"/></picture>, in the limit as <picture><source srcset="form_45_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$\epsilon$" src="form_45.png" width="5" height="6"/></picture> goes to zero. </li>
</ol>
<p>Applying <b>sphpad</b>() with the distances and position angles computed by <a class="el" href="sph_8h.html#aec6222fe1e4d807c9b59980b8e548eb0" title="Compute angular distance and position angle.">sphdpa()</a> should return the original field points. </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Nov 29 2023 19:09:57 for WCSLIB by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>