PageRenderTime 42ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/1.2.3/generated/cf.Field.sin.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 229 lines | 185 code | 14 blank | 30 comment | 0 complexity | df654869992f4d9ac000340389a41ac1 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>cf.Field.sin &mdash; Documentation</title>
  7. <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '1.2.3',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <script type="text/javascript" src="../_static/copybutton.js"></script>
  22. <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  23. <link rel="top" title="Documentation" href="../index.html" />
  24. <link rel="up" title="cf.Field" href="../classes/cf.Field.html" />
  25. <link rel="next" title="cf.Field.tan" href="cf.Field.tan.html" />
  26. <link rel="prev" title="cf.Field.cos" href="cf.Field.cos.html" />
  27. </head>
  28. <body role="document">
  29. <div class="related" role="navigation" aria-label="related navigation">
  30. <h3>Navigation</h3>
  31. <ul>
  32. <li class="right" style="margin-right: 10px">
  33. <a href="../genindex.html" title="General Index"
  34. accesskey="I">index</a></li>
  35. <li class="right" >
  36. <a href="cf.Field.tan.html" title="cf.Field.tan"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.Field.cos.html" title="cf.Field.cos"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="../../archive.html">Archive</a> &laquo;</li>
  42. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.2.3</a> &raquo;</li>
  43. <!--
  44. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  45. <li><select onchange="location = this.options[this.selectedIndex].value;">
  46. <option value="../../1.0/index.html">1.0
  47. <option value="../../0.9.9/index.html">0.9.9
  48. <option value="../../0.9.8.3/index.html">0.9.8.3
  49. <option value="../../archive.html">Archive
  50. </select>
  51. </li>
  52. -->
  53. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  54. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  55. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  56. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" accesskey="U">cf.Field</a> &raquo;</li>
  57. </ul>
  58. </div>
  59. <div class="document">
  60. <div class="documentwrapper">
  61. <div class="bodywrapper">
  62. <div class="body" role="main">
  63. <div class="section" id="cf-field-sin">
  64. <h1>cf.Field.sin<a class="headerlink" href="#cf-field-sin" title="Permalink to this headline">Âś</a></h1>
  65. <dl class="method">
  66. <dt id="cf.Field.sin">
  67. <code class="descclassname">Field.</code><code class="descname">sin</code><span class="sig-paren">(</span><em>i=False</em><span class="sig-paren">)</span><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v1.2.3/cf/variable.py#variable.py-5507"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.Field.sin" title="Permalink to this definition">Âś</a></dt>
  68. <dd><p>Take the trigonometric sine of the data array.</p>
  69. <p>Units are accounted for in the calculation. For example, the the sine
  70. of 90 degrees_east is 1.0, as is the sine of 1.57079632 radians. If
  71. the units are not equivalent to radians (such as Kelvin) then they are
  72. treated as if they were radians.</p>
  73. <p>The Units are changed to &#8216;1&#8217; (nondimensionsal).</p>
  74. <div class="admonition seealso">
  75. <p class="first admonition-title">See also</p>
  76. <p class="last"><a class="reference internal" href="cf.Field.cos.html#cf.Field.cos" title="cf.Field.cos"><code class="xref py py-obj docutils literal"><span class="pre">cos</span></code></a>, <a class="reference internal" href="cf.Field.tan.html#cf.Field.tan" title="cf.Field.tan"><code class="xref py py-obj docutils literal"><span class="pre">tan</span></code></a></p>
  77. </div>
  78. <table class="docutils field-list" frame="void" rules="none">
  79. <col class="field-name" />
  80. <col class="field-body" />
  81. <tbody valign="top">
  82. <tr class="field-odd field"><th class="field-name">Examples 1:</th><td class="field-body"></td>
  83. </tr>
  84. </tbody>
  85. </table>
  86. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">g</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">sin</span><span class="p">()</span>
  87. </pre></div>
  88. </div>
  89. <table class="docutils field-list" frame="void" rules="none">
  90. <col class="field-name" />
  91. <col class="field-body" />
  92. <tbody valign="top">
  93. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
  94. <dt>i: <a class="reference external" href="http://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">bool</span></code></a>, optional</dt>
  95. <dd><p class="first last">If True then update the field in place. By default a new
  96. field is created. In either case, a field is
  97. returned.</p>
  98. </dd>
  99. </dl>
  100. </td>
  101. </tr>
  102. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
  103. <dt>out: <a class="reference internal" href="../classes/cf.Field.html#cf.Field" title="cf.Field"><code class="xref py py-obj docutils literal"><span class="pre">cf.Field</span></code></a></dt>
  104. <dd><p class="first last">The field with the sine of data array values.</p>
  105. </dd>
  106. </dl>
  107. </td>
  108. </tr>
  109. <tr class="field-odd field"><th class="field-name">Examples 2:</th><td class="field-body"></td>
  110. </tr>
  111. </tbody>
  112. </table>
  113. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  114. <span class="go">&lt;CF Units: degrees_north&gt;</span>
  115. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  116. <span class="go">[[-90 0 90 --]]</span>
  117. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">sin</span><span class="p">()</span>
  118. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  119. <span class="go">&lt;CF Units: 1&gt;</span>
  120. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  121. <span class="go">[[-1.0 0.0 1.0 --]]</span>
  122. </pre></div>
  123. </div>
  124. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  125. <span class="go">&lt;CF Units: m s-1&gt;</span>
  126. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  127. <span class="go">[[1 2 3 --]]</span>
  128. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">sin</span><span class="p">()</span>
  129. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  130. <span class="go">&lt;CF Units: 1&gt;</span>
  131. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  132. <span class="go">[[0.841470984808 0.909297426826 0.14112000806 --]]</span>
  133. </pre></div>
  134. </div>
  135. </dd></dl>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  141. <div class="sphinxsidebarwrapper">
  142. <h4>Previous topic</h4>
  143. <p class="topless"><a href="cf.Field.cos.html"
  144. title="previous chapter">cf.Field.cos</a></p>
  145. <h4>Next topic</h4>
  146. <p class="topless"><a href="cf.Field.tan.html"
  147. title="next chapter">cf.Field.tan</a></p>
  148. <div role="note" aria-label="source link">
  149. <h3>This Page</h3>
  150. <ul class="this-page-menu">
  151. <li><a href="../_sources/generated/cf.Field.sin.txt"
  152. rel="nofollow">Show Source</a></li>
  153. </ul>
  154. </div>
  155. <div id="searchbox" style="display: none" role="search">
  156. <h3>Quick search</h3>
  157. <form class="search" action="../search.html" method="get">
  158. <input type="text" name="q" />
  159. <input type="submit" value="Go" />
  160. <input type="hidden" name="check_keywords" value="yes" />
  161. <input type="hidden" name="area" value="default" />
  162. </form>
  163. </div>
  164. <script type="text/javascript">$('#searchbox').show(0);</script>
  165. </div>
  166. </div>
  167. <div class="clearer"></div>
  168. </div>
  169. <div class="related" role="navigation" aria-label="related navigation">
  170. <h3>Navigation</h3>
  171. <ul>
  172. <li class="right" style="margin-right: 10px">
  173. <a href="../genindex.html" title="General Index"
  174. >index</a></li>
  175. <li class="right" >
  176. <a href="cf.Field.tan.html" title="cf.Field.tan"
  177. >next</a> |</li>
  178. <li class="right" >
  179. <a href="cf.Field.cos.html" title="cf.Field.cos"
  180. >previous</a> |</li>
  181. <li><a target="_blank" href="../../archive.html">Archive</a> &laquo;</li>
  182. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.2.3</a> &raquo;</li>
  183. <!--
  184. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  185. <li><select onchange="location = this.options[this.selectedIndex].value;">
  186. <option value="../../1.0/index.html">1.0
  187. <option value="../../0.9.9/index.html">0.9.9
  188. <option value="../../0.9.8.3/index.html">0.9.8.3
  189. <option value="../../archive.html">Archive
  190. </select>
  191. </li>
  192. -->
  193. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  194. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  195. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  196. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" >cf.Field</a> &raquo;</li>
  197. </ul>
  198. </div>
  199. <div class="footer" role="contentinfo">
  200. &copy; Copyright 2016, David Hassell.
  201. Last updated on Aug 23, 2016.
  202. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.1.
  203. </div>
  204. </body>
  205. </html>