Source

yt.hub / ythub / templates / getting_started.html

Full commit
{% extends "layout.html" %}
{% block subpage %} Getting Started {% endblock %}

{% block mainbody %}
      <!-- Main hero unit for a primary marketing message or call to action -->
      <section id="getting_started" style="padding-top:5.0em;">
        <div class="row">
          <div class="span12">
            <h1>How To Get Going</h1>
            <p>&nbsp;</p>
            <p>Once you have an <a href="/user">API Key</a>, add these lines to
            your <tt>~/.yt/config</tt>:</p>
<pre>hub_api_key = YOUR_API_KEY</pre>
            <p>Now you can upload items.</p>
            <hr>
            <h2>How to Upload a Projection</h2>
            <p>To upload a projection, you can run a
            script similar to this:</p>
<pre>from yt.mods import *
pf = load("JHK-DD0030/galaxy0030")
proj = pf.h.proj(0, "Density", weight="Density")
proj.hub_upload()</pre>
            <p>What we're doing there is getting the parameter file, uploading
            that (this is crucial!  And, it can be done multiple times...) and
            then projecting.  Once we have the projection, we upload it.</p>
            <hr>
            <h2>How to Upload a Slice</h2>
            <p>To upload a slice, you can run a
            script similar to this:</p>
<pre>from yt.mods import *
pf = load("JHK-DD0030/galaxy0030")
sl = pf.h.slice(0, 0.5, fields=["Density"])
sl.hub_upload()</pre>
            <hr>
            <h2>How to Upload a Plot Collection</h2>
            <p>To upload a slice, you can run a
            script similar to this:</p>
<pre>from yt.mods import *
pf = load("DD0252/DD0252")
pc = PlotCollection(pf, 'c')
pc.add_projection("Density", 0)
pc.add_slice("Temperature", 1)
pc.add_profile_sphere(0.2, 'unitary', ["Density", "Temperature"])
dd = pf.h.all_data()
pc.add_phase_object(dd, ["Density", "Temperature", "CellMassMsun"],
                    weight=None)
pc.hub_upload()</pre>
            <hr>
            <h2>How to Upload a New Project or 3D Vertices</h2>
            <p>We're still working on this!</p>
            <hr>
            <h2>How do I set my icon?</h2>
            <p>We use <a href="http://gravatar.com/">Gravatar</a> to get our
            icons.  If you affiliate your e-mail address with an image, it will
            show up here.</p>
            <hr>
            <p>We'll post more tutorials as we settle on vertices and image
            collection uploading -- keep checking back!</p>
          </div>
        </div>
      </section>
{% endblock %}