Skip to content

Commit

Permalink
added files to add package to pypi and changed seiche to upam
Browse files Browse the repository at this point in the history
  • Loading branch information
cparcerisas committed Oct 21, 2021
1 parent c044bd1 commit 47e6040
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 12 deletions.
67 changes: 61 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,62 @@
.vscode
.idea
=
__pycache__
pyhydrophone.egg-info/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
venv*/
build/
docs/build
dist/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
result_images

# Sphinx documentation
doc/_build/
.buildinfo

# Jupyter Notebook
.ipynb_checkpoints

# pytest
.pytest_cache

.mypy_cache

# projects
.spyderproject
.spyproject
.idea
.ropeproject
.vscode

*.py~
.DS_Store

tests/test_data/data_exploration
pypam.egg-info/
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,29 @@ pyhydrophone helps keeping together all the information of the recorder.

Each class represents a different hydrophone. The available ones now are (others will be added):
- SoundTrap (OceanInstruments)
- Seiche (Seiche)
- uPam (Seiche)
- AMAR (JASCO)
- B&K Nexus
- RTSys (RESEA)
- EARS
- MTE (Seiche)

They all inherit from the main class Hydrophone.
If a hydrophone provides an output different than a regular wav file, functions to read and understand the output are provided.
Functions to read the metadata are also provided (which is often encoded in the file name).


## How to install
# Using pip
```bash
pip install pyhydrophone
```

# using git clone
```bash
pip install setup.py
```
```
```bash
pip install -r requirements.txt
```

Expand All @@ -39,7 +48,7 @@ and you would not have to worry about which format the file name has or where th
For more information about the parameters that each hydrophone takes, see examples folder:

```
sei = pyhy.Seiche(name, model, sensitivity, preamp_gain)
upam = pyhy.uPam(name, model, sensitivity, preamp_gain)
st = pyhy.SoundTrap(name, model, serial_number)
am = pyhy.AmarG3(name, model, sensitivity, preamp_gain, mems_sensitivity)
bk = pyhy.BruelKjaer(name, model, amplif)
Expand Down
2 changes: 1 addition & 1 deletion pyhydrophone/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyhydrophone.seiche import Seiche
from pyhydrophone.upam import uPam
from pyhydrophone.amar import AmarG3, AmarG3MEMS
from pyhydrophone.soundtrap import SoundTrap, SoundTrapHF
from pyhydrophone.bruelkjaer import BruelKjaer
Expand Down
4 changes: 2 additions & 2 deletions pyhydrophone/seiche.py → pyhydrophone/upam.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
"""
Module : seiche.py
Module : upam.py
Authors : Clea Parcerisas
Institution : VLIZ (Vlaams Instituut voor de Zee)
Last Accessed : 9/23/2020
Expand All @@ -11,7 +11,7 @@
from datetime import datetime


class Seiche(Hydrophone):
class uPam(Hydrophone):
def __init__(self, name, model, serial_number, sensitivity, preamp_gain, Vpp, string_format="%Y%m%d_%H%M%S_%f"):
"""
Init an instance of Seiche
Expand Down
20 changes: 20 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[metadata]
name = pyhydrophone
version = 0.1
author = Clea Parcerisas
author_email = [email protected]
description = Python scripts to read hydrophones files
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/lifewatch/pyhydrophone
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
packages = find:
python_requires = >=3.6

[options.packages.find]
where = pyhydrophone

0 comments on commit 47e6040

Please sign in to comment.