Esempio n. 1
0
    def __init__(self,parent,title,filename):
        super(DatafileViewer,self).__init__(parent, title=title, size=(300,400))
        self.filename=filename
        
        self.fbfile=datafile.freebird_file_factory(self.filename)
        
        #HERE: when/where do we get this from the user?
        self.fbfile.serials['squid']='SN104'
        self.fbfile.serials['sbe7probe']='C175'
        
        self.grid=wx.GridBagSizer(hgap=5,vgap=5)
        label=wx.StaticText(self, label="File: %s"%(self.filename))
        self.grid.Add(label,pos=(0,0),span=(1,5))

        # Various attributes:
        self.grid.Add(wx.StaticText(self,label="Size [bytes]:"),pos=(1,0),span=(1,2))
        self.grid.Add(wx.StaticText(self,label="{:,}".format(self.fbfile.nbytes)),pos=(1,2),span=(1,3))

        self.grid.Add(wx.StaticText(self,label="Start:"),pos=(2,0),span=(1,2))
        self.start_text=wx.StaticText(self,label="n/a")
        self.grid.Add(self.start_text,pos=(2,2),span=(1,2))

        self.grid.Add(wx.StaticText(self,label="End:"),pos=(3,0),span=(1,2))
        self.end_text=wx.StaticText(self,label="n/a")
        self.grid.Add(self.end_text,pos=(3,2),span=(1,2))

        self.canvas=data_gui.CanvasPanel(self)
        self.grid.Add(self.canvas,pos=(5,0),span=(5,5))

        self.SetSizerAndFit(self.grid)

        self.Show(True)

        self.parse()

        self.canvas.show_data(self.fbfile)
Esempio n. 2
0
import os

import datafile

reload(datafile)

fbin = datafile.freebird_file_factory("../../../../testing/2014-04-30/DATA0004.BIN")
fbin.serials["squid"] = "SN104"
fbin.serials["sbe7probe"] = "C175"

data = fbin.read_all()
t_adj = 3.5 / 86400.0
data["dn_py"] += t_adj


stride = slice(4300 * 500, 4430 * 500, 1)

dnums = data["dn_py"]


if 0:
    clf()
    ax1 = subplot(2, 1, 1)
    plot_date(dnums[stride], data["counts"][stride], "g-")
    ax2 = subplot(2, 1, 2, sharex=ax1)
    imu_az = data["imu_a"][stride, 2]
    plot_date(dnums[stride], data["imu_a"][stride, 0], "r-")
    plot_date(dnums[stride], data["imu_a"][stride, 1], "b-")
    plot_date(dnums[stride], data["imu_a"][stride, 2], "k-")

Esempio n. 3
0
import datafile
reload(datafile)
df=datafile.freebird_file_factory("../../../../../ct_river/data/2014-05/tioga_winch/freebird/20140514/afternoon/DATA0009.BIN")

df.read_all()