Skip to content

Commit

Permalink
manual merging of the new version
Browse files Browse the repository at this point in the history
  • Loading branch information
GrumpyNounours committed Aug 23, 2015
1 parent fcf9342 commit 84ac94f
Show file tree
Hide file tree
Showing 64 changed files with 9,105 additions and 4,244 deletions.
462 changes: 235 additions & 227 deletions PySeidon_tuto_0.ipynb

Large diffs are not rendered by default.

1,301 changes: 636 additions & 665 deletions PySeidon_tuto_1.ipynb

Large diffs are not rendered by default.

629 changes: 629 additions & 0 deletions PySeidon_tuto_2.ipynb

Large diffs are not rendered by default.

456 changes: 456 additions & 0 deletions PySeidon_tuto_3.ipynb

Large diffs are not rendered by default.

350 changes: 350 additions & 0 deletions PySeidon_tuto_4.ipynb

Large diffs are not rendered by default.

309 changes: 309 additions & 0 deletions PySeidon_tuto_5.ipynb

Large diffs are not rendered by default.

792 changes: 792 additions & 0 deletions PySeidon_tuto_6.ipynb

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Hydrodynamic model:
* This package has been primarily developed and designed for post-processing FVCOM outputs. One can download FVCOM from [here](http://fvcom.smast.umassd.edu/fvcom/)

Requirements:
* This package ha been designed for Python 2.7: One can download Python from [here](http://www.python.org/download)
* It recommended to install Anaconda beforehand: One can download Anaconda from [here](http://continuum.io/downloads#all)
* This package has been designed for Python 2.7: one can download Python from [here](http://www.python.org/download)
* It is recommended to install Anaconda beforehand: one can download Anaconda from [here](http://continuum.io/downloads#all)
* The HDF5 library is also needed for this package to work: one can download the HDF5 library from [here](https://www.hdfgroup.org/HDF5/)

Dependencies:

Althought they should be automatically resolved during the installation, this package relies on the following dependencies:
* setuptools: One can download setuptools from [here](https://pypi.python.org/pypi/setuptools#installation-instructions)
* UTide: One can download UTide from [here](https://github.com/wesleybowman/UTide)
Expand All @@ -54,15 +54,22 @@ Up-dating:
Recommendations:
* The tutorials and package functioning have been designed for use in IPython shell: One can download IPython from [here](http://ipython.org/)

### Documentation ###
Package's documentation can be found [here](http://grumpynounours.github.io/PySeidon/index.html)

### Contribution guidelines ###
* [Tutorial 0: First steps](http://nbviewer.ipython.org/github/GrumpyNounours/PySeidon/blob/master/PySeidon_tuto_0.ipynb)
* [Tutorial 1: FVCOM class](http://nbviewer.ipython.org/github/GrumpyNounours/PySeidon/blob/master/PySeidon_tuto_1.ipynb)
* [Tutorial 2: Station class](http://nbviewer.ipython.org/github/GrumpyNounours/PySeidon/blob/development/PySeidon_tuto_2.ipynb)
* [Tutorial 3: ADCP class](http://nbviewer.ipython.org/github/GrumpyNounours/PySeidon/blob/development/PySeidon_tuto_3.ipynb)
* [Tutorial 4: TideGauge class](http://nbviewer.ipython.org/github/GrumpyNounours/PySeidon/blob/development/PySeidon_tuto_4.ipynb)
* [Tutorial 5: Drifter class](http://nbviewer.ipython.org/github/GrumpyNounours/PySeidon/blob/development/PySeidon_tuto_5.ipynb)
* [Tutorial 6: Validation class](http://nbviewer.ipython.org/github/GrumpyNounours/PySeidon/blob/development/PySeidon_tuto_6.ipynb)

### Contacts ###
* Project Leader: [Richard Karsten](richard.karsten@acadiau.ca)
* Repository Admin & Software Development Manager: [Thomas Roc](thomas.roc@acadiau.ca)
* Main Developers: [Wesley Bowman](https://github.com/wesleybowman), [Thomas Roc](thomas.roc@acadiau.ca), [Jonathan Smith](https://github.com/LaVieEnRoux)
* Main Developers: [Thomas Roc](thomas.roc@acadiau.ca), [Jonathan Smith](https://github.com/LaVieEnRoux), [Wesley Bowman](https://github.com/wesleybowman), [Kody Crowell](https://github.com/TheKingInYellow)

### Contributors ###
Dr. Richard Karsten, [Aidan Bharath](https://github.com/Aidan-Bharath), Mitchell O'Flaherty-Sproul, Robie Hennigar, Dr. Joel Culina, Justine McMillan, Dr. Brian Polagye, [Dr. Kristen Thyng](https://github.com/kthyng)...
Expand Down
Binary file added data4tutorial/adcp_GP_01aug2013.mat
Binary file not shown.
Binary file added data4tutorial/drifter_GP_01aug2013.mat
Binary file not shown.
Binary file added data4tutorial/tidegauge_GP_01aug2013.mat
Binary file not shown.
15 changes: 9 additions & 6 deletions pyseidon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@
sys.path.append(os.path.join(local,'utilities'))

#Local import
from fvcomClass import *
from utilities import *
from adcpClass import *
#from drifterClass import *
from drifterClass import *
from tidegaugeClass import *
from validationClass import *
from stationClass import *
from utilities import *
from fvcomClass import *
from validationClass import *

# Custom error
from pyseidon.utilities.pyseidon_error import PyseidonError

#Permission info for OpenDap server
#print "OpenDap server connexion info:"

__version__ = '1.1'
__version__ = '2.0'
__all__ = ["FVCOM", "ADCP", "Drifter", "TideGauge",\
"Validation", "Station", "utilities" ]
"Validation", "Station", "utilities", "PyseidonError"]
__authors__ = ['Wesley Bowman, Thomas Roc, Jonathan Smith']
__licence__ = 'GNU Affero GPL v3.0'
__copyright__ = 'Copyright (c) 2014 EcoEnergyII'
Expand Down
4 changes: 0 additions & 4 deletions pyseidon/adcpClass/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/usr/bin/python2.7
# encoding: utf-8

from __future__ import division
import os
import sys

#Local import
from adcpClass import ADCP

Expand Down
67 changes: 33 additions & 34 deletions pyseidon/adcpClass/adcpClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,66 @@
# encoding: utf-8
from __future__ import division
import numpy as np
import sys
import scipy.io as sio
import h5py

#Add local path to utilities
sys.path.append('../utilities/')

#Local import
from variablesAdcp import _load_adcp
from functionsAdcp import *
from plotsAdcp import *


class ADCP:
'''
Description:
-----------
A class/structure for ADCP data.
Functionality structured as follows:
_Data. = raw matlab file data
|_Variables. = useable adcp variables and quantities
|_History = Quality Control metadata
testAdcp._|_Utils. = set of useful functions
|_Plots. = plotting functions
|_method_1
| ... = methods and analysis techniques intrinsic to ADCPs
|_method_n
"""
**A class/structure for ADCP data**
Functionality structured as follows: ::
Inputs:
------
Only takes a file name as input, ex: testAdcp=ADCP('./path_to_matlab_file/filename')
_Data. = raw matlab file data
|_Variables. = useable adcp variables and quantities
|_History = Quality Control metadata
testAdcp._|_Utils. = set of useful functions
|_Plots. = plotting functions
|_method_1
| ... = methods and analysis techniques intrinsic to ADCPs
|_method_n
Notes:
-----
Only handle fully processed ADCP matlab data previously quality-controlled as well
as formatted through "EnsembleData_FlowFile" matlab script at the mo.
Inputs:
- Only takes a file name as input, ex: testAdcp=ADCP('./path_to_matlab_file/filename')
Throughout the package, the following conventions apply:
- Coordinates = decimal degrees East and North
- Directions = in degrees, ???
- Depth = 0m is the free surface and depth is negative
'''
*Notes*
Only handle fully processed ADCP matlab data previously quality-controlled as well
as formatted through "EnsembleData_FlowFile" matlab script at the mo.
Throughout the package, the following conventions apply:
- Coordinates = decimal degrees East and North
- Directions = in degrees, between -180 and 180 deg., i.e. 0=East, 90=North,
+/-180=West, -90=South
- Depth = 0m is the free surface and depth is negative
"""

def __init__(self, filename, debug=False):
''' Initialize ADCP class.
Notes: only handle processed ADCP matlab data at the mo.'''
""" 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]
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.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
Loading

0 comments on commit 84ac94f

Please sign in to comment.