In [2]:
from numpy import *
from os import path, listdir
import plotly.plotly as py
from plotly.graph_objs import *
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
from myfunctions import *
from plotlylayouts import *



In [3]:
datapath = "\\\\128.230.72.36\labshare\Experiments\ADR2\JPM - 051215A-E8 - 5GHz Cavity\\160107"

In [4]:
datas = []
for f in listdir(datapath):
    if "PhotonOscillation" in f:
        if f.endswith('.h5'):
            datas.append(f)

In [61]:
trace = Scatter(x=[], y=[], mode='markers')
for i in arange(815, 845):
    for f in datas:
        if str(i) in f:
            x, y = getH5Data(path.join(datapath, f))
            x = float(f.split('.h5')[0].split('ion')[1].split('us')[0])
            trace['x'].append(x)
            trace['y'].append(float(y))
fig = Figure(data = [trace])
iplot(fig)


Drawing...

In [63]:
trace = Scatter(x=[], y=[], mode='markers')
for i in arange(884, 904):
    for f in datas:
        if str(i) in f:
            x, y = getH5Data(path.join(datapath, f))
            x = float(f.split('.h5')[0].split('ion')[1].split('us')[0])
            trace['x'].append(x)
            trace['y'].append(float(y))
fig = Figure(data = [trace])
iplot(fig)


Drawing...

In [ ]: