Skip to content

Commit

Permalink
Deploying to gh-pages from @ 26c997b 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoubelet committed Feb 23, 2024
1 parent f55dc2a commit f263ac4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _modules/omc3/optics_measurements/dpp.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h1>Source code for omc3.optics_measurements.dpp</h1><div class="highlight"><pre
<span class="n">df_filtered</span> <span class="o">=</span> <span class="n">df_orbit</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="n">mask</span><span class="p">,</span> <span class="p">:]</span>
<span class="n">amps</span> <span class="o">=</span> <span class="n">input_files</span><span class="o">.</span><span class="n">get_data</span><span class="p">(</span><span class="n">df_filtered</span><span class="p">,</span> <span class="s1">&#39;AMPX&#39;</span><span class="p">)</span> <span class="o">*</span> <span class="n">input_files</span><span class="o">.</span><span class="n">get_data</span><span class="p">(</span><span class="n">df_filtered</span><span class="p">,</span> <span class="s1">&#39;AMPZ&#39;</span><span class="p">)</span>
<span class="n">mask_zeros</span> <span class="o">=</span> <span class="p">(</span><span class="n">amps</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span> <span class="k">if</span> <span class="n">amps</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">1</span> <span class="k">else</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">amps</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>
<span class="n">dispersions</span> <span class="o">=</span> <span class="n">df_filtered</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="n">mask_zeros</span><span class="p">,</span> <span class="s2">&quot;DX&quot;</span><span class="p">]</span>
<span class="n">dispersions</span> <span class="o">=</span> <span class="n">df_filtered</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="n">mask_zeros</span><span class="p">,</span> <span class="s2">&quot;DX&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">to_numpy</span><span class="p">()</span>
<span class="n">denom</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">dispersions</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
<span class="k">if</span> <span class="n">denom</span> <span class="o">==</span> <span class="mf">0.</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Cannot compute dpp probably no arc BPMs.&quot;</span><span class="p">)</span>
Expand Down
Binary file modified environment.pickle
Binary file not shown.

0 comments on commit f263ac4

Please sign in to comment.