Skip to content

Commit

Permalink
build based on 421f387
Browse files Browse the repository at this point in the history
  • Loading branch information
zeptodoctor committed Nov 17, 2023
1 parent 8667c62 commit 37e46ca
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
pkg&gt; add Batsrus</code></pre><h2 id="Benchmark-1"><a class="docs-heading-anchor" href="#Benchmark-1">Benchmark</a><a class="docs-heading-anchor-permalink" href="#Benchmark-1" title="Permalink"></a></h2><p>Data loading speed of a 2.4GB 3D binary file, 317MB 3D binary file, and 65KB 2D binary file on Macbook Pro with quad core 2.2 GHz Intel i7 and 16 GB 1600 MHz DDR3:</p><table><tr><th style="text-align: left">2.4GB</th><th style="text-align: center">tmax [s]</th><th style="text-align: center">tmean [s]</th></tr><tr><td style="text-align: left">Julia</td><td style="text-align: center">2.73</td><td style="text-align: center">1.32</td></tr><tr><td style="text-align: left">Python</td><td style="text-align: center">1.35</td><td style="text-align: center">1.34</td></tr><tr><td style="text-align: left">IDL</td><td style="text-align: center">6.18</td><td style="text-align: center">6.08</td></tr><tr><td style="text-align: left">MATLAB</td><td style="text-align: center">16.02</td><td style="text-align: center">10.60</td></tr></table><table><tr><th style="text-align: left">317MB</th><th style="text-align: center">tmean [ms]</th></tr><tr><td style="text-align: left">Julia</td><td style="text-align: center">180.8</td></tr><tr><td style="text-align: left">Python</td><td style="text-align: center">179.5</td></tr><tr><td style="text-align: left">IDL</td><td style="text-align: center">453.5</td></tr><tr><td style="text-align: left">MATLAB</td><td style="text-align: center">698.4</td></tr></table><table><tr><th style="text-align: left">65KB</th><th style="text-align: center">tmean [μs]</th></tr><tr><td style="text-align: left">Julia</td><td style="text-align: center">163.36</td></tr><tr><td style="text-align: left">Python</td><td style="text-align: center">4390.95</td></tr><tr><td style="text-align: left">IDL</td><td style="text-align: center">1970.29</td></tr><tr><td style="text-align: left">MATLAB</td><td style="text-align: center">19273.25</td></tr></table><p>The Julia, IDL, and MATLAB version all shares the same kernel design. The timings are obtained for Julia v1.3.1, Python 3.7.6 + Numpy 1.18.1, IDL 8.5, and MATLAB R2018b. For dynamic languages with JIT, the first time when function gets executed is also the slowest due to runtime compilation, as can be seen from tmax in the tables. <a href="https://github.com/spacepy/spacepy">spacepy</a> reaches the same level of performance as Batsruls.jl because of the well-optimized numpy library written in C. However, for small data sizes Batsrus.jl is much faster than packages written in other languages.</p><h2 id="Calling-From-Python-1"><a class="docs-heading-anchor" href="#Calling-From-Python-1">Calling From Python</a><a class="docs-heading-anchor-permalink" href="#Calling-From-Python-1" title="Permalink"></a></h2><p>In Python, you can easily take advantage of this package with the aid of <a href="https://pyjulia.readthedocs.io/en/latest/">PyJulia</a>. After the installation, in the Python REPL:</p><pre><code class="language-python">from julia import Batsrus
dir = &#39;test&#39;
filename = &#39;1d__raw_2_t25.60000_n00000258.out&#39;
data = Batsrus.readdata(filename, dir=dir)</code></pre><p>There you have it! Enjoy!</p><div class="admonition is-warning"><header class="admonition-header">Python dependency</header><div class="admonition-body"><p><code>PyPlot</code> package backend may be affected by the settings of <code>PyJulia</code> dependencies. If you want to set it back properly, you need to recompile the <code>PyCall</code> package in Julia.</p></div></div><h2 id="Developers-1"><a class="docs-heading-anchor" href="#Developers-1">Developers</a><a class="docs-heading-anchor-permalink" href="#Developers-1" title="Permalink"></a></h2><p>This package inherits the ideas and code structures from its predecessor in <a href="https://github.com/MSTEM-QUDA/share/tree/stable/IDL">IDL</a> (developed by Gábor Tóth) and <a href="https://github.com/henry2004y/VisAnaMatlab">MATLAB</a>.</p><p>Batsrus.jl is developed and maintained by <a href="https://github.com/henry2004y">Hongyang Zhou</a>.</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="man/examples/">Example »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 23 October 2023 22:17">Monday 23 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
data = Batsrus.readdata(filename, dir=dir)</code></pre><p>There you have it! Enjoy!</p><div class="admonition is-warning"><header class="admonition-header">Python dependency</header><div class="admonition-body"><p><code>PyPlot</code> package backend may be affected by the settings of <code>PyJulia</code> dependencies. If you want to set it back properly, you need to recompile the <code>PyCall</code> package in Julia.</p></div></div><h2 id="Developers-1"><a class="docs-heading-anchor" href="#Developers-1">Developers</a><a class="docs-heading-anchor-permalink" href="#Developers-1" title="Permalink"></a></h2><p>This package inherits the ideas and code structures from its predecessor in <a href="https://github.com/MSTEM-QUDA/share/tree/stable/IDL">IDL</a> (developed by Gábor Tóth) and <a href="https://github.com/henry2004y/VisAnaMatlab">MATLAB</a>.</p><p>Batsrus.jl is developed and maintained by <a href="https://github.com/henry2004y">Hongyang Zhou</a>.</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="man/examples/">Example »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 17 November 2023 23:14">Friday 17 November 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/man/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@
x1, z1 = trace2d_eul(bx, bz, xs, zs, x, z, ds=0.1, maxstep=1000, gridType=&quot;ndgrid&quot;)
plot(x1,z1,&quot;--&quot;)
end
axis(&quot;equal&quot;)</code></pre><p>Currently the <code>select_seeds</code> function uses pseudo random number generator that produces the same seeds every time.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../">« Home</a><a class="docs-footer-nextpage" href="../internal/">Internal »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 23 October 2023 22:17">Monday 23 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
axis(&quot;equal&quot;)</code></pre><p>Currently the <code>select_seeds</code> function uses pseudo random number generator that produces the same seeds every time.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../">« Home</a><a class="docs-footer-nextpage" href="../internal/">Internal »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 17 November 2023 23:14">Friday 17 November 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 37e46ca

Please sign in to comment.