Skip to content

Commit

Permalink
Generated gh-pages for commit ad4a3ee
Browse files Browse the repository at this point in the history
Author: Serwan Asaad <serwan.asaad@gmail.com>

    Feature/parameter improvements (#651)
  • Loading branch information
Documentation Bot committed Sep 29, 2017
1 parent c179044 commit 5498fdb
Show file tree
Hide file tree
Showing 22 changed files with 698 additions and 781 deletions.
7 changes: 3 additions & 4 deletions _modules/qcodes/instrument/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ <h1>Source code for qcodes.instrument.base</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">qcodes.utils.helpers</span> <span class="k">import</span> <span class="n">DelegateAttributes</span><span class="p">,</span> <span class="n">strip_attrs</span><span class="p">,</span> <span class="n">full_class</span>
<span class="kn">from</span> <span class="nn">qcodes.utils.metadata</span> <span class="k">import</span> <span class="n">Metadatable</span>
<span class="kn">from</span> <span class="nn">qcodes.utils.validators</span> <span class="k">import</span> <span class="n">Anything</span>
<span class="kn">from</span> <span class="nn">.parameter</span> <span class="k">import</span> <span class="n">Parameter</span>
<span class="kn">from</span> <span class="nn">.function</span> <span class="k">import</span> <span class="n">Function</span>
<span class="kn">from</span> <span class="nn">.parameter</span> <span class="k">import</span> <span class="n">StandardParameter</span>


<span class="k">class</span> <span class="nc">InstrumentBase</span><span class="p">(</span><span class="n">Metadatable</span><span class="p">,</span> <span class="n">DelegateAttributes</span><span class="p">):</span>
Expand Down Expand Up @@ -236,8 +236,7 @@ <h1>Source code for qcodes.instrument.base</h1><div class="highlight"><pre>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Cannot get mock messages if not in testing mode&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mocker</span><span class="o">.</span><span class="n">get_log_messages</span><span class="p">()</span>

<span class="k">def</span> <span class="nf">add_parameter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">parameter_class</span><span class="o">=</span><span class="n">StandardParameter</span><span class="p">,</span>
<span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">add_parameter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">parameter_class</span><span class="o">=</span><span class="n">Parameter</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Bind one Parameter to this instrument.</span>

Expand Down Expand Up @@ -488,7 +487,7 @@ <h1>Source code for qcodes.instrument.base</h1><div class="highlight"><pre>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">p</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="n">p</span><span class="o">.</span><span class="n">has_get</span> <span class="ow">and</span> <span class="n">p</span><span class="o">.</span><span class="n">has_set</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="s1">&#39;get&#39;</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="s1">&#39;set&#39;</span><span class="p">):</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
<span class="k">if</span> <span class="n">verbose</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;validate_status: param </span><span class="si">%s</span><span class="s1">: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">value</span><span class="p">))</span>
Expand Down
1,188 changes: 574 additions & 614 deletions _modules/qcodes/instrument/parameter.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion _sources/api/generated/qcodes.ArrayParameter.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ qcodes\.ArrayParameter
.. autosummary::

~ArrayParameter.__init__
~ArrayParameter.get_attrs
~ArrayParameter.get_ramp_values
~ArrayParameter.load_metadata
~ArrayParameter.set_validator
~ArrayParameter.snapshot
~ArrayParameter.snapshot_base
~ArrayParameter.validate



Expand Down
4 changes: 1 addition & 3 deletions _sources/api/generated/qcodes.ManualParameter.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ qcodes\.ManualParameter
.. autosummary::

~ManualParameter.__init__
~ManualParameter.get
~ManualParameter.get_attrs
~ManualParameter.get_ramp_values
~ManualParameter.increment
~ManualParameter.load_metadata
~ManualParameter.set
~ManualParameter.set_validator
~ManualParameter.snapshot
~ManualParameter.snapshot_base
Expand Down
4 changes: 3 additions & 1 deletion _sources/api/generated/qcodes.MultiParameter.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ qcodes\.MultiParameter
.. autosummary::

~MultiParameter.__init__
~MultiParameter.get_attrs
~MultiParameter.get_ramp_values
~MultiParameter.load_metadata
~MultiParameter.set_validator
~MultiParameter.snapshot
~MultiParameter.snapshot_base
~MultiParameter.validate



Expand Down
2 changes: 1 addition & 1 deletion _sources/api/generated/qcodes.Parameter.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ qcodes\.Parameter
.. autosummary::

~Parameter.__init__
~Parameter.get_attrs
~Parameter.get_ramp_values
~Parameter.increment
~Parameter.load_metadata
~Parameter.set_validator
Expand Down
6 changes: 1 addition & 5 deletions _sources/api/generated/qcodes.StandardParameter.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ qcodes\.StandardParameter
.. autosummary::

~StandardParameter.__init__
~StandardParameter.get
~StandardParameter.get_attrs
~StandardParameter.get_delay
~StandardParameter.get_ramp_values
~StandardParameter.increment
~StandardParameter.load_metadata
~StandardParameter.set_delay
~StandardParameter.set_step
~StandardParameter.set_validator
~StandardParameter.snapshot
~StandardParameter.snapshot_base
Expand Down
19 changes: 12 additions & 7 deletions api/generated/qcodes.ArrayParameter.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<h1>qcodes.ArrayParameter<a class="headerlink" href="#qcodes-arrayparameter" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="qcodes.ArrayParameter">
<em class="property">class </em><code class="descclassname">qcodes.</code><code class="descname">ArrayParameter</code><span class="sig-paren">(</span><em>name</em>, <em>shape</em>, <em>instrument=None</em>, <em>label=None</em>, <em>unit=None</em>, <em>units=None</em>, <em>setpoints=None</em>, <em>setpoint_names=None</em>, <em>setpoint_labels=None</em>, <em>setpoint_units=None</em>, <em>docstring=None</em>, <em>snapshot_get=True</em>, <em>snapshot_value=True</em>, <em>metadata=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/qcodes/instrument/parameter.html#ArrayParameter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qcodes.ArrayParameter" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="descclassname">qcodes.</code><code class="descname">ArrayParameter</code><span class="sig-paren">(</span><em>name</em>, <em>shape</em>, <em>instrument=None</em>, <em>label=None</em>, <em>unit=None</em>, <em>setpoints=None</em>, <em>setpoint_names=None</em>, <em>setpoint_labels=None</em>, <em>setpoint_units=None</em>, <em>docstring=None</em>, <em>snapshot_get=True</em>, <em>snapshot_value=True</em>, <em>metadata=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/qcodes/instrument/parameter.html#ArrayParameter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qcodes.ArrayParameter" title="Permalink to this definition"></a></dt>
<dd><p>A gettable parameter that returns an array of values.
Not necessarily part of an instrument.</p>
<p>Subclasses should define a <code class="docutils literal"><span class="pre">.get</span></code> method, which returns an array.
Expand Down Expand Up @@ -221,7 +221,6 @@ <h1>qcodes.ArrayParameter<a class="headerlink" href="#qcodes-arrayparameter" tit
<li><strong>label</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3.5/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a><em>]</em>) – Normally used as the axis label when this
parameter is graphed, along with <code class="docutils literal"><span class="pre">unit</span></code>.</li>
<li><strong>unit</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3.5/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a><em>]</em>) – The unit of measure. Use <code class="docutils literal"><span class="pre">''</span></code> for unitless.</li>
<li><strong>units</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3.5/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a><em>]</em>) – DEPRECATED, redirects to <code class="docutils literal"><span class="pre">unit</span></code>.</li>
<li><strong>setpoints</strong> (<em>Optional</em><em>[</em><em>Tuple</em><em>[</em><em>setpoint_array</em><em>]</em><em>]</em>) – <code class="docutils literal"><span class="pre">setpoint_array</span></code> can be a DataArray, numpy.ndarray, or sequence.
The setpoints for each dimension of the returned array. An
N-dimension item should have N setpoint arrays, where the first is
Expand Down Expand Up @@ -253,7 +252,7 @@ <h1>qcodes.ArrayParameter<a class="headerlink" href="#qcodes-arrayparameter" tit
</table>
<dl class="method">
<dt id="qcodes.ArrayParameter.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>shape</em>, <em>instrument=None</em>, <em>label=None</em>, <em>unit=None</em>, <em>units=None</em>, <em>setpoints=None</em>, <em>setpoint_names=None</em>, <em>setpoint_labels=None</em>, <em>setpoint_units=None</em>, <em>docstring=None</em>, <em>snapshot_get=True</em>, <em>snapshot_value=True</em>, <em>metadata=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/qcodes/instrument/parameter.html#ArrayParameter.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qcodes.ArrayParameter.__init__" title="Permalink to this definition"></a></dt>
<code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>shape</em>, <em>instrument=None</em>, <em>label=None</em>, <em>unit=None</em>, <em>setpoints=None</em>, <em>setpoint_names=None</em>, <em>setpoint_labels=None</em>, <em>setpoint_units=None</em>, <em>docstring=None</em>, <em>snapshot_get=True</em>, <em>snapshot_value=True</em>, <em>metadata=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/qcodes/instrument/parameter.html#ArrayParameter.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qcodes.ArrayParameter.__init__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<p class="rubric">Methods</p>
Expand All @@ -266,18 +265,24 @@ <h1>qcodes.ArrayParameter<a class="headerlink" href="#qcodes-arrayparameter" tit
<tr class="row-odd"><td><a class="reference internal" href="#qcodes.ArrayParameter.__init__" title="qcodes.ArrayParameter.__init__"><code class="xref py py-obj docutils literal"><span class="pre">__init__</span></code></a>(name,&nbsp;shape[,&nbsp;instrument,&nbsp;label,&nbsp;…])</td>
<td></td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">get_attrs</span></code>()</td>
<td>Attributes recreated as properties in the RemoteParameter proxy.</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">get_ramp_values</span></code>(value[,&nbsp;step])</td>
<td>Return values to sweep from current value to target value.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">load_metadata</span></code>(metadata)</td>
<td>Load metadata</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot</span></code>([update])</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">set_validator</span></code>(vals)</td>
<td>Deprecated Set a validator <cite>vals</cite> for this parameter.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot</span></code>([update])</td>
<td>Decorate a snapshot dictionary with metadata.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot_base</span></code>([update])</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot_base</span></code>([update])</td>
<td>State of the parameter as a JSON-compatible dict.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">validate</span></code>(value)</td>
<td>Validate value</td>
</tr>
</tbody>
</table>
</dd></dl>
Expand Down
36 changes: 6 additions & 30 deletions api/generated/qcodes.ManualParameter.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,25 +191,7 @@ <h1>qcodes.ManualParameter<a class="headerlink" href="#qcodes-manualparameter" t
<dl class="class">
<dt id="qcodes.ManualParameter">
<em class="property">class </em><code class="descclassname">qcodes.</code><code class="descname">ManualParameter</code><span class="sig-paren">(</span><em>name</em>, <em>instrument=None</em>, <em>initial_value=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/qcodes/instrument/parameter.html#ManualParameter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qcodes.ManualParameter" title="Permalink to this definition"></a></dt>
<dd><p>Define one parameter that reflects a manual setting / configuration.</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"><ul class="first last simple">
<li><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3.5/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a>) – the local name of this parameter</li>
<li><strong>instrument</strong> (<em>Optional</em><em>[</em><a class="reference internal" href="qcodes.Instrument.html#qcodes.Instrument" title="qcodes.Instrument"><em>Instrument</em></a><em>]</em>) – the instrument this applies to,
if any.</li>
<li><strong>initial_value</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3.5/library/stdtypes.html#str" title="(in Python v3.5)"><em>str</em></a><em>]</em>) – starting value, may be None even if
None does not pass the validator. None is only allowed as an
initial value and cannot be set after initiation.</li>
<li><strong>**kwargs</strong> – Passed to Parameter parent class</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dd><dl class="method">
<dt id="qcodes.ManualParameter.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>instrument=None</em>, <em>initial_value=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/qcodes/instrument/parameter.html#ManualParameter.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qcodes.ManualParameter.__init__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
Expand All @@ -224,23 +206,17 @@ <h1>qcodes.ManualParameter<a class="headerlink" href="#qcodes-manualparameter" t
<tr class="row-odd"><td><a class="reference internal" href="#qcodes.ManualParameter.__init__" title="qcodes.ManualParameter.__init__"><code class="xref py py-obj docutils literal"><span class="pre">__init__</span></code></a>(name[,&nbsp;instrument,&nbsp;initial_value])</td>
<td></td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">get</span></code>()</td>
<td>Return latest value</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">get_attrs</span></code>()</td>
<td>Attributes recreated as properties in the RemoteParameter proxy.</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">get_ramp_values</span></code>(value[,&nbsp;step])</td>
<td>Return values to sweep from current value to target value.</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">increment</span></code>(value)</td>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">increment</span></code>(value)</td>
<td>Increment the parameter with a value</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">load_metadata</span></code>(metadata)</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">load_metadata</span></code>(metadata)</td>
<td>Load metadata</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">set</span></code>(value)</td>
<td>Validate and saves value</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">set_validator</span></code>(vals)</td>
<td>Set a validator <cite>vals</cite> for this parameter.</td>
<td>Deprecated Set a validator <cite>vals</cite> for this parameter.</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot</span></code>([update])</td>
<td>Decorate a snapshot dictionary with metadata.</td>
Expand Down
14 changes: 10 additions & 4 deletions api/generated/qcodes.MultiParameter.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,18 +272,24 @@ <h1>qcodes.MultiParameter<a class="headerlink" href="#qcodes-multiparameter" tit
<tr class="row-odd"><td><a class="reference internal" href="#qcodes.MultiParameter.__init__" title="qcodes.MultiParameter.__init__"><code class="xref py py-obj docutils literal"><span class="pre">__init__</span></code></a>(name,&nbsp;names,&nbsp;shapes[,&nbsp;instrument,&nbsp;…])</td>
<td></td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">get_attrs</span></code>()</td>
<td>Attributes recreated as properties in the RemoteParameter proxy.</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">get_ramp_values</span></code>(value[,&nbsp;step])</td>
<td>Return values to sweep from current value to target value.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">load_metadata</span></code>(metadata)</td>
<td>Load metadata</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot</span></code>([update])</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">set_validator</span></code>(vals)</td>
<td>Deprecated Set a validator <cite>vals</cite> for this parameter.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot</span></code>([update])</td>
<td>Decorate a snapshot dictionary with metadata.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot_base</span></code>([update])</td>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">snapshot_base</span></code>([update])</td>
<td>State of the parameter as a JSON-compatible dict.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">validate</span></code>(value)</td>
<td>Validate value</td>
</tr>
</tbody>
</table>
</dd></dl>
Expand Down
Loading

0 comments on commit 5498fdb

Please sign in to comment.