Exemplo n.º 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
Exemplo n.º 2
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
Exemplo n.º 3
0
 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)   
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)