{
    "body": "<section id=\"usage\">\n<span id=\"usagepage\"></span><h1>Usage<a class=\"headerlink\" href=\"#usage\" title=\"Permalink to this heading\">\uf0c1</a></h1>\n<p>To access the routines in the astLib modules, simply:</p>\n<div class=\"highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"kn\">from</span> <span class=\"nn\">astLib</span> <span class=\"kn\">import</span> <span class=\"n\">astCalc</span>\n<span class=\"kn\">from</span> <span class=\"nn\">astLib</span> <span class=\"kn\">import</span> <span class=\"n\">astCoords</span>\n<span class=\"kn\">from</span> <span class=\"nn\">astLib</span> <span class=\"kn\">import</span> <span class=\"n\">astWCS</span>\n</pre></div>\n</div>\n<p>etc.</p>\n<p>The astWCS module currently provides access to what are (I think) the most commonly needed WCS information\nand functions (such as converting between pixel and WCS coordinates etc.). However, should you wish to\naccess the wrapped WCSTools routines themselves directly:</p>\n<div class=\"highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"kn\">from</span> <span class=\"nn\">PyWCSTools</span> <span class=\"kn\">import</span> <span class=\"n\">wcs</span>\n<span class=\"kn\">from</span> <span class=\"nn\">PyWCSTools</span> <span class=\"kn\">import</span> <span class=\"n\">wcscon</span>\n</pre></div>\n</div>\n<p>etc.</p>\n<p>Note that PyWCSTools only includes some functions from wcs.c and wcscon.c at present. For examples of usage,\nlook at the Python code for the astLib.astWCS module. Documentation for the WCSTools routines can be found\nhere: <a class=\"reference external\" href=\"http://tdc-www.harvard.edu/software/wcstools/subroutines/libwcs.wcs.html\">http://tdc-www.harvard.edu/software/wcstools/subroutines/libwcs.wcs.html</a>.</p>\n<p>As of version 0.11.x+, by default the <code class=\"docutils literal notranslate\"><span class=\"pre\">astWCS.WCS</span></code> class is using the <code class=\"docutils literal notranslate\"><span class=\"pre\">astropy.wcs</span></code> module instead of\nPyWCSTools (this allows one to benefit from some features of <code class=\"docutils literal notranslate\"><span class=\"pre\">astropy.wcs</span></code> without having to re-write\ncode based on <code class=\"docutils literal notranslate\"><span class=\"pre\">astWCS.WCS</span></code>). To use PyWCSTools instead, set <code class=\"docutils literal notranslate\"><span class=\"pre\">useAstropyWCS</span> <span class=\"pre\">=</span> <span class=\"pre\">False</span></code> when creating a\n<code class=\"docutils literal notranslate\"><span class=\"pre\">WCS</span></code> object.</p>\n<section id=\"known-issues-may-no-longer-be-relevant\">\n<h2>Known issues (may no longer be relevant)<a class=\"headerlink\" href=\"#known-issues-may-no-longer-be-relevant\" title=\"Permalink to this heading\">\uf0c1</a></h2>\n<p>This may no longer apply, but just in case\u2026</p>\n<p>Recent versions of matplotlib (on which astLib depends) now use locale information. On systems where the\ndecimal point separator is not \u2018.\u2019 (e.g. Germany), the astWCS coordinate conversions routines will give\nstrange results if this is not accounted for. As of version 0.3.0, the astWCS module will detect if this is\nthe case and print a warning message to the console.</p>\n<p>The workaround for this issue is to add the following after importing any python modules that expicitly set\nthe locale (such as matplotlib):</p>\n<div class=\"highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"kn\">import</span> <span class=\"nn\">locale</span>\n<span class=\"n\">locale</span><span class=\"o\">.</span><span class=\"n\">setlocale</span><span class=\"p\">(</span><span class=\"n\">locale</span><span class=\"o\">.</span><span class=\"n\">LC_NUMERIC</span><span class=\"p\">,</span> <span class=\"s1\">&#39;C&#39;</span><span class=\"p\">)</span><span class=\"s2\">&quot;</span>\n</pre></div>\n</div>\n<p>Thanks to Markus Demleitner for pointing this out.</p>\n</section>\n</section>\n",
    "title": "Usage",
    "sourcename": "usage.rst.txt",
    "current_page_name": "usage",
    "toc": "<ul>\n<li><a class=\"reference internal\" href=\"#\">Usage</a><ul>\n<li><a class=\"reference internal\" href=\"#known-issues-may-no-longer-be-relevant\">Known issues (may no longer be relevant)</a></li>\n</ul>\n</li>\n</ul>\n",
    "page_source_suffix": ".rst"
}