SCRIPTS RDB d3d_ref_shotsΒΆ

# -*-Python-*-
# Created by bgrierson at 10 Mar 2017  08:26

# Get a list of all DIII-D reference shots
q = OMFITrdb(query="select shot from shots where shot_type='reference'", db='d3drdb', server='d3drdb', by_column=False)

shots = np.zeros(len(q), dtype=int)

for i, k in enumerate(q.keys()):
    shots[i] = q[i]['shot']

fig, ax = plt.subplots()
ax.plot(shots, marker='o')