forked from petebachant/Nortek-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
31 lines (26 loc) · 721 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 17 18:24:36 2014
@author: Pete
"""
from __future__ import print_function, division
from nortek.files import VectrinoFile
from nortek.controls import PdControl
import matplotlib.pyplot as plt
def test_vectrino_file():
vec = VectrinoFile("examples/test.vno")
print(vec.keys())
u = vec["velocity"]["data"][0,:,0]
print(vec["velocityHeader"])
print(vec["hardwareConfiguration"])
plt.plot(u)
plt.show()
def test_pdcontrol():
vec = PdControl()
print(vec.sound_speed_mode)
vec.sound_speed = 1489.0
print(vec.sound_speed)
print(vec.salinity)
print(vec.sound_speed_mode)
if __name__ == "__main__":
test_pdcontrol()