<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>coerce_range_list_param — Astropy v0.2.4</title> <link rel="stylesheet" href="../_static/bootstrap-astropy.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '0.2.4', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/sidebar.js"></script> <link rel="shortcut icon" href="../_static/astropy_logo.ico"/> <link rel="top" title="Astropy v0.2.4" href="../index.html" /> <link rel="up" title="VOTable XML handling (astropy.io.votable)" href="../io/votable/index.html" /> <link rel="next" title="is_callable" href="astropy.io.votable.util.is_callable.html" /> <link rel="prev" title="convert_to_writable_filelike" href="astropy.io.votable.util.convert_to_writable_filelike.html" /> </head> <body> <div class="topbar"> <a class="brand" title="Documentation Home" href="../index.html"></a> <ul> <li><a class="homelink" title="AstroPy Homepage" href="http://www.astropy.org"></a></li> <li><a title="General Index" href="../genindex.html">Index</a></li> <li><a title="Python Module Index" href="../py-modindex.html">Modules</a></li> <li> <form action="../search.html" method="get"> <input type="text" name="q" placeholder="Search" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </li> </ul> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right"> <a href="astropy.io.votable.util.is_callable.html" title="is_callable"> next » </a> </li> <li class="right"> <a href="astropy.io.votable.util.convert_to_writable_filelike.html" title="convert_to_writable_filelike"> « previous </a> | </li> <li> <a href="../index.html">Astropy v0.2.4</a> » </li> <li><a href="../io/votable/index.html" accesskey="U">VOTable XML handling (<tt class="docutils literal"><span class="pre">astropy.io.votable</span></tt>)</a> »</li> <li>coerce_range_list_param</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="coerce-range-list-param"> <h1>coerce_range_list_param<a class="headerlink" href="#coerce-range-list-param" title="Permalink to this headline">¶</a></h1> <dl class="function"> <dt id="astropy.io.votable.util.coerce_range_list_param"> <tt class="descclassname">astropy.io.votable.util.</tt><tt class="descname">coerce_range_list_param</tt><big>(</big><em>p</em>, <em>frames=None</em>, <em>numeric=True</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/io/votable/util.py#L105" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link"> [edit on github]</span></a><a class="reference internal" href="../_modules/astropy/io/votable/util.html#coerce_range_list_param"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.io.votable.util.coerce_range_list_param" title="Permalink to this definition">¶</a></dt> <dd><p>Coerces and/or verifies the object <em>p</em> into a valid range-list-format parameter.</p> <p>As defined in <a class="reference external" href="http://www.ivoa.net/Documents/REC/DAL/SSA-20080201.html">Section 8.7.2 of Simple Spectral Access Protocol</a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>p</strong> : str or sequence</p> <blockquote> <div><p>May be a string as passed verbatim to the service expecting a range-list, or a sequence. If a sequence, each item must be either:</p> <blockquote> <div><ul class="simple"> <li>a numeric value</li> <li>a named value, such as, for example, ‘J’ for named spectrum (if the <em>numeric</em> kwarg is False)</li> <li>a 2-tuple indicating a range</li> <li>the last item my be a string indicating the frame of reference</li> </ul> </div></blockquote> </div></blockquote> <p><strong>frames</strong> : sequence of str, optional</p> <blockquote> <div><p>A sequence of acceptable frame of reference keywords. If not provided, the default set in <tt class="xref py py-obj docutils literal"><span class="pre">set_reference_frames</span></tt> will be used.</p> </div></blockquote> <p><strong>numeric</strong> : bool, optional</p> <blockquote> <div><p>TODO</p> </div></blockquote> </td> </tr> <tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>parts</strong> : tuple</p> <blockquote class="last"> <div><dl class="docutils"> <dt>The result is a tuple:</dt> <dd><ul class="first last simple"> <li>a string suitable for passing to a service as a range-list argument</li> <li>an integer counting the number of elements</li> </ul> </dd> </dl> </div></blockquote> </td> </tr> </tbody> </table> </dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"><h3>Page Contents</h3> <ul> <li><a class="reference internal" href="#">coerce_range_list_param</a></li> </ul> </div> </div> <div class="clearer"></div> </div> <footer class="footer"> <p class="pull-right"> <a href="../_sources/_generated/astropy.io.votable.util.coerce_range_list_param.txt" rel="nofollow">Page Source</a> <a href="#">Back to Top</a></p> <p> © Copyright 2011-2013, The Astropy Developers.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. Last built 22 Oct 2013. <br/> </p> </footer> </body> </html>