<!DOCTYPE html> <html class="writer-html5" lang="en" > <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Grid options and descriptions — binary_c-python documentation</title> <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script src="_static/jquery.js"></script> <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/language_data.js"></script> <script type="text/javascript" src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="hpc_functions module" href="hpc_functions.html" /> <link rel="prev" title="grid_class module" href="grid.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python </a> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <p class="caption"><span class="caption-text">Contents:</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">Binarycpython code</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="custom_logging_functions.html">custom_logging_functions module</a></li> <li class="toctree-l2"><a class="reference internal" href="distribution_functions.html">distribution_functions module</a></li> <li class="toctree-l2"><a class="reference internal" href="functions.html">functions module</a></li> <li class="toctree-l2"><a class="reference internal" href="grid.html">grid_class module</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="#">Grid options and descriptions</a></li> <li class="toctree-l2"><a class="reference internal" href="hpc_functions.html">hpc_functions module</a></li> <li class="toctree-l2"><a class="reference internal" href="plot_functions.html">plot_functions module</a></li> <li class="toctree-l2"><a class="reference internal" href="run_system_wrapper.html">run_system_wrapper module</a></li> <li class="toctree-l2"><a class="reference internal" href="spacing_functions.html">spacing_functions module</a></li> <li class="toctree-l2"><a class="reference internal" href="stellar_types.html">stellar_types module</a></li> <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li> <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li> <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li> <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">binary_c-python</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> »</li> <li><a href="modules.html">Binarycpython code</a> »</li> <li>Grid options and descriptions</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/grid_options_defaults.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="module-binarycpython.utils.grid_options_defaults"> <span id="grid-options-and-descriptions"></span><h1>Grid options and descriptions<a class="headerlink" href="#module-binarycpython.utils.grid_options_defaults" title="Permalink to this headline">¶</a></h1> <dl class="simple"> <dt>Module that contains the default options for the population grid code along with the description for these options, in the form of dictionaries:</dt><dd><ul class="simple"> <li><p>grid_options_defaults_dict: dictionary containing the default values for all the options</p></li> <li><p>grid_options_descriptions: dictionary containing the description for these options.</p></li> </ul> </dd> <dt>There are several other functions in this module, mostly to generate help texts or documents:</dt><dd><ul class="simple"> <li><p>grid_options_help: interactive function for the user to get descriptions for options</p></li> <li><p>grid_options_description_checker: function that checks that checks which options have a description.</p></li> <li><p>write_grid_options_to_rst_file: function to generate the .rst document for the docs</p></li> </ul> </dd> </dl> <p>With this its also possible to automatically generate a document containing all the setting names + descriptions.</p> <p>All the options starting with _ should not be changed by the user except when you really know what you’re doing (which is probably hacking the code :P)</p> <dl class="py function"> <dt id="binarycpython.utils.grid_options_defaults.grid_options_description_checker"> <code class="sig-prename descclassname">binarycpython.utils.grid_options_defaults.</code><code class="sig-name descname">grid_options_description_checker</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">print_info</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid_options_defaults.html#grid_options_description_checker"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid_options_defaults.grid_options_description_checker" title="Permalink to this definition">¶</a></dt> <dd><p>Function that checks which descriptions are missing</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>print_info</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – whether to print out information about which options contain proper descriptions and which do not</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> </dd> <dt class="field-odd">Returns</dt> <dd class="field-odd"><p>the amount of undescribed keys</p> </dd> </dl> </dd></dl> <dl class="py function"> <dt id="binarycpython.utils.grid_options_defaults.grid_options_help"> <code class="sig-prename descclassname">binarycpython.utils.grid_options_defaults.</code><code class="sig-name descname">grid_options_help</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">option</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid_options_defaults.html#grid_options_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid_options_defaults.grid_options_help" title="Permalink to this definition">¶</a></dt> <dd><p>Function that prints out the description of a grid option. Useful function for the user.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>option</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – which option you want to have the description of</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p> </dd> <dt class="field-odd">Returns</dt> <dd class="field-odd"><p>dict containg the option, the description if its there, otherwise empty string. And if the key doesnt exist, the dict is empty</p> </dd> </dl> </dd></dl> <dl class="py function"> <dt id="binarycpython.utils.grid_options_defaults.print_option_descriptions"> <code class="sig-prename descclassname">binarycpython.utils.grid_options_defaults.</code><code class="sig-name descname">print_option_descriptions</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">filehandle</span></em>, <em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">descriptions</span></em>, <em class="sig-param"><span class="n">title</span></em>, <em class="sig-param"><span class="n">extra_text</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid_options_defaults.html#print_option_descriptions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid_options_defaults.print_option_descriptions" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="py function"> <dt id="binarycpython.utils.grid_options_defaults.write_grid_options_to_rst_file"> <code class="sig-prename descclassname">binarycpython.utils.grid_options_defaults.</code><code class="sig-name descname">write_grid_options_to_rst_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">output_file</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid_options_defaults.html#write_grid_options_to_rst_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid_options_defaults.write_grid_options_to_rst_file" title="Permalink to this definition">¶</a></dt> <dd><p>Function that writes the descriptions of the grid options to a rst file</p> <dl class="simple"> <dt>Tasks:</dt><dd><p>TODO: seperate things into private and public options</p> </dd> </dl> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>output_file</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – target file where the grid options descriptions are written to</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></p> </dd> </dl> </dd></dl> </div> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="hpc_functions.html" class="btn btn-neutral float-right" title="hpc_functions module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="grid.html" class="btn btn-neutral float-left" title="grid_class module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p> © Copyright 2021, David Hendriks, Robert Izzard </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. <br><br> Generated on binarycpython git branch: development_version/2.1.7 git revision 2135dbcead0f3862c3fabcb8ded503997c61e279 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>. <br><br> Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>