コード例 #1
0
    def __init__(self, filename, debug=False):
        """ Initialize ADCP class."""
        self._debug = debug
        self._origin_file = filename
        if debug:
            print '-Debug mode on-'
        #TR_comments: find a way to dissociate raw and processed data
        self.History = ['Created from ' + filename]
        #TR_comments: *_Raw and *_10minavg open with h5py whereas *_davgBS
        try:
            self.Data = sio.loadmat(filename,
                                    struct_as_record=False,
                                    squeeze_me=True)
        except NotImplementedError:
            self.Data = h5py.File(filename, 'r')
        #TR_comments: Initialize class structure
        self.Variables = _load_adcp(self, self.History, debug=self._debug)
        self.Plots = PlotsAdcp(self.Variables, debug=self._debug)
        self.Utils = FunctionsAdcp(self.Variables,
                                   self.Plots,
                                   self.History,
                                   debug=self._debug)

        ##Re-assignement of utility functions as methods
        self.dump_profile_data = self.Plots._dump_profile_data_as_csv

        return
コード例 #2
0
ファイル: adcpClass.py プロジェクト: GrumpyNounours/PySeidon
    def __init__(self, filename, debug=False):
        """ Initialize ADCP class."""
        self._debug = debug
        self._origin_file = filename
        if debug:
            print '-Debug mode on-' 
        #TR_comments: find a way to dissociate raw and processed data
        self.History = ['Created from ' + filename]
        #TR_comments: *_Raw and *_10minavg open with h5py whereas *_davgBS
        try:
            self.Data = sio.loadmat(filename,struct_as_record=False, squeeze_me=True)
        except NotImplementedError:
            self.Data = h5py.File(filename, 'r')
        #TR_comments: Initialize class structure
        self.Variables = _load_adcp(self, self.History, debug=self._debug)
        self.Plots = PlotsAdcp(self.Variables, debug=self._debug)
        self.Utils = FunctionsAdcp(self.Variables,
                                   self.Plots,
                                   self.History,
                                   debug=self._debug) 

        ##Re-assignement of utility functions as methods
        self.dump_profile_data = self.Plots._dump_profile_data_as_csv

        return
コード例 #3
0
ファイル: adcpClass.py プロジェクト: Swanny7/PySeidon
 def __init__(self, filename, debug=False):
     ''' Initialize ADCP class.
         Notes: only handle processed ADCP matlab data at the mo.'''    
     self._debug = debug
     if debug:
         print '-Debug mode on-' 
     #TR_comments: find a way to dissociate raw and processed data
     self.History = ['Raw data']
     #TR_comments: *_Raw and *_10minavg open with h5py whereas *_davgBS
     self.Data = h5py.File(filename)
     #TR_Alternative: self.Data = sio.loadmat(filename,struct_as_record=False, squeeze_me=True)
     self.Variables = _load_adcp(self, debug=self._debug)
     self.Utils = FunctionsAdcp(self)
     self.Plots = PlotsAdcp(self)   
コード例 #4
0
ファイル: adcpClass.py プロジェクト: pwcazenave/PySeidon
 def __init__(self, filename, debug=False):
     """ Initialize ADCP class.
         Notes: only handle processed ADCP matlab data at the mo."""
     self._debug = debug
     self._origin_file = filename
     if debug:
         print "-Debug mode on-"
     # TR_comments: find a way to dissociate raw and processed data
     self.History = ["Created from" + filename]
     # TR_comments: *_Raw and *_10minavg open with h5py whereas *_davgBS
     try:
         self.Data = sio.loadmat(filename, struct_as_record=False, squeeze_me=True)
     except NotImplementedError:
         self.Data = h5py.File(filename)
     self.Variables = _load_adcp(self, debug=self._debug)
     self.Plots = PlotsAdcp(self.Variables, debug=self._debug)
     self.Utils = FunctionsAdcp(self.Variables, self.Plots, self.History, debug=self._debug)
コード例 #5
0
ファイル: adcpClass.py プロジェクト: rsignell-usgs/PySeidon
 def __init__(self, filename, debug=False):
     ''' Initialize ADCP class.
         Notes: only handle processed ADCP matlab data at the mo.'''    
     self._debug = debug
     self._origin_file = filename
     if debug:
         print '-Debug mode on-' 
     #TR_comments: find a way to dissociate raw and processed data
     self.History = ['Created from' + filename]
     #TR_comments: *_Raw and *_10minavg open with h5py whereas *_davgBS
     try:
         self.Data = sio.loadmat(filename,struct_as_record=False, squeeze_me=True)
     except NotImplementedError:
         self.Data = h5py.File(filename)
     self.Variables = _load_adcp(self, debug=self._debug)
     self.Plots = PlotsAdcp(self.Variables, debug=self._debug)
     self.Utils = FunctionsAdcp(self.Variables,
                                self.Plots,
                                self.History,
                                debug=self._debug)