This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from ocean_wave_tracing.ocean_wave_tracing import Wave_tracing | |
from scipy.ndimage.filters import uniform_filter | |
nx = 100; ny = 100 # number of grid points in x- and y-direction | |
nb_wave_rays = 100 | |
depth = np.ones((nx,ny)) | |
x = np.linspace(0,1000,nx) # size x-domain [m] | |
y = np.linspace(0,1000,ny) # size y-domain [m] | |
X,Y = np.meshgrid(x,y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The imported target "vtkRenderingPythonTkWidgets" references the file | |
"/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so" | |
but this file does not exist. Possible reasons include: | |
* The file was deleted, renamed, or moved to another location. | |
* An install or uninstall procedure did not complete successfully. | |
* The installation package was faulty and contained | |
"/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" | |
but not all the files it references. | |
-- The imported target "vtk" references the file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Surfaces is a dictionary which has keys for each neutral surface | |
## at each neutral surface it has a multi dimensional array with this structure: | |
## [[lon],[lat],[nsdepth],[[nsdepth],[temp],[salinity],[PV],[uz],[vz]]] | |
## I plan on reworking it into a dictionary to make my code more clear soon | |
##Neighbors is a dictionary which has keys for each neutral surface | |
## every key has a value which is another dictionary which has one key | |
## which is the point at which we are calculating the derivative. The value | |
## connected to that key is an array of the indexs of the four nearest points to that point | |
def componentDistance(surfaces,k,i1,i2): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fileObject = open("data/286364.pickle",'rb') | |
surfaces = pickle.load(fileObject) | |
fileObject.close() | |
fileObject = open("data/1500NoNorwegian.pickle",'rb') | |
offsets,profiles,deepestindex = pickle.load(fileObject) | |
fileObject.close() | |
tempSurfs = {} | |
ecef = pyproj.Proj(proj='geocent', ellps='WGS84', datum = 'WGS84',preserve_units=True) | |
lla = pyproj.Proj(proj='latlong', ellps='WGS84', datum = 'WGS84',preserve_units=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ignore umbilical | |
>health mode | |
>CAN size remaining was only 0; last packet ID was 0x12700243,size was 71,time=4 13 | |
Sending poll at time 420, prev CAN msg counts: total=4,health=3,WOD=1,Realtime=0 | |
> | |
> | |
>enable canprint 7 | |
Specify 1=realtime, 2=health, 3=WOD in, 4=WOD out,5=Poll and CAN Received packet count,6=5-PacketFill Count | |
>enable canprint=7 | |
Specify 1=realtime, 2=health, 3=WOD in, 4=WOD out,5=Poll and CAN Received packet count,6=5-PacketFill Count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20190118113127,6,300,39199,1409,5,-227999138,18,105,2,94,18,105,2,94 | |
20190118113127,6,300,39199,1410,5,-227999217,18,105,2,15,18,105,2,15 | |
20190118113127,6,300,39199,1411,5,-227999218,18,105,2,14,18,105,2,14 | |
20190118113127,6,300,39199,1412,5,-227999219,18,105,2,13,18,105,2,13 | |
20190118113141,6,300,39214,1406,5,-227999220,18,105,2,12,18,105,2,12 | |
20190118113141,6,300,39214,1407,5,-227999125,18,105,2,107,18,105,2,107 | |
20190118113141,6,300,39214,1408,5,-227999134,18,105,2,98,18,105,2,98 | |
20190118113141,6,300,39214,1409,5,308871790,18,0,0,0,0,0,0,0 | |
20190118113141,6,300,39214,1410,5,-227999128,18,105,2,104,18,105,2,104 | |
20190118113141,6,300,39214,1411,5,-227999131,18,105,2,101,18,105,2,101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMAND CAN_LOCAL_CMD rc_eps_batt_6 BIG_ENDIAN | |
APPEND_PARAMETER LENGTH 16 UINT MIN MAX 36 "Length of TCP-ized CAN message (always 36/0x24 bytes) " | |
STATE DEFAULT 36 | |
APPEND_ID_PARAMETER FIXED_TYPE 16 UINT MIN MAX 128 "Fixed message type for CAN" BIG_ENDIAN | |
STATE DEFAULT 128 | |
APPEND_PARAMETER TAG 64 UINT MIN MAX 0 "NOT USED in current PCAN-Ethernet Gateway DR hardware/software." | |
STATE DEFAULT 0 | |
APPEND_PARAMETER TIMESTAMP_L 32 UINT MIN MAX 0 "Timestamp of the CAN message, in microseconds. This is the lower 4 bytes of the timestamp." | |
STATE DEFAULT 0 | |
APPEND_PARAMETER TIMESTAMP_H 32 UINT MIN MAX 0 "Timestamp of the CAN message, in microseconds. This is the upper 4 bytes of the timestamp." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nu | |
syntax on | |
color solarized | |
set wildmode=longest,list,full | |
set wildmenu | |
set backspace=2 | |
set nowrap | |
set t_Co=256 | |
set mouse=a | |
set splitright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def yes_or_no(question): | |
reply = str(raw_input(question+' (y/n): ')).lower().strip() | |
if reply[0] == 'y': | |
return True | |
if reply[0] == 'n': | |
return False | |
else: | |
return yes_or_no("Uhhhh... please enter ") |