wawi 0.0.7__py3-none-any.whl → 0.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
wawi/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.0.7"
1
+ __version__ = "0.0.8"
2
2
 
3
3
  __pdoc__ = dict()
4
4
  __pdoc__['wawi.abq'] = False
wawi/io.py CHANGED
@@ -355,25 +355,25 @@ def import_wadam_hydro_transfer(wadam_file):
355
355
  6-by-len(theta)-by-len(omega)
356
356
  '''
357
357
 
358
- string = ('.+W A V E P E R I O D.+=\s+(?P<period>.+):.+\n.+'
359
- 'H E A D I N G A N G L E.+=\s+(?P<theta>.+):(?:.*\n){5,10}'
358
+ string = (r'.+W A V E P E R I O D.+=\s+(?P<period>.+):.+\n.+'
359
+ r'H E A D I N G A N G L E.+=\s+(?P<theta>.+):(?:.*\n){5,10}'
360
360
 
361
- '.+EXCITING FORCES AND MOMENTS FROM THE HASKIN RELATIONS(?:.*\n){4,6}\s+'
361
+ r'.+EXCITING FORCES AND MOMENTS FROM THE HASKIN RELATIONS(?:.*\n){4,6}\s+'
362
362
 
363
- '-F1-\s+(?P<F1_real>[-?.E\d+]+)\s+(?P<F1_imag>[-?.E\d+]+)\s.+\n\s+'
364
- '-F2-\s+(?P<F2_real>[-?.E\d+]+)\s+(?P<F2_imag>[-?.E\d+]+)\s.+\n\s+'
365
- '-F3-\s+(?P<F3_real>[-?.E\d+]+)\s+(?P<F3_imag>[-?.E\d+]+)\s.+\n\s+'
366
- '-F4-\s+(?P<F4_real>[-?.E\d+]+)\s+(?P<F4_imag>[-?.E\d+]+)\s.+\n\s+'
367
- '-F5-\s+(?P<F5_real>[-?.E\d+]+)\s+(?P<F5_imag>[-?.E\d+]+)\s.+\n\s+'
368
- '-F6-\s+(?P<F6_real>[-?.E\d+]+)\s+(?P<F6_imag>[-?.E\d+]+)\s.+\n')
363
+ r'-F1-\s+(?P<F1_real>[-?.E\d+]+)\s+(?P<F1_imag>[-?.E\d+]+)\s.+\n\s+'
364
+ r'-F2-\s+(?P<F2_real>[-?.E\d+]+)\s+(?P<F2_imag>[-?.E\d+]+)\s.+\n\s+'
365
+ r'-F3-\s+(?P<F3_real>[-?.E\d+]+)\s+(?P<F3_imag>[-?.E\d+]+)\s.+\n\s+'
366
+ r'-F4-\s+(?P<F4_real>[-?.E\d+]+)\s+(?P<F4_imag>[-?.E\d+]+)\s.+\n\s+'
367
+ r'-F5-\s+(?P<F5_real>[-?.E\d+]+)\s+(?P<F5_imag>[-?.E\d+]+)\s.+\n\s+'
368
+ r'-F6-\s+(?P<F6_real>[-?.E\d+]+)\s+(?P<F6_imag>[-?.E\d+]+)\s.+\n')
369
369
  regex = re.compile(string)
370
370
 
371
- nondim_string = ('\s+NON-DIMENSIONALIZING FACTORS:\n(?:.*\n)+'
372
- '\s+RO\s+=\s+(?P<rho>[-?.E\d+]+)\n'
373
- '\s+G\s+=\s+(?P<g>[-?.E\d+]+)\n'
374
- '\s+VOL\s+=\s+(?P<vol>[-?.E\d+]+)\n'
375
- '\s+L\s+=\s+(?P<l>[-?.E\d+]+)\n'
376
- '\s+WA\s+=\s+(?P<wa>[-?.E\d+]+)')
371
+ nondim_string = (r'\s+NON-DIMENSIONALIZING FACTORS:\n(?:.*\n)+'
372
+ r'\s+RO\s+=\s+(?P<rho>[-?.E\d+]+)\n'
373
+ r'\s+G\s+=\s+(?P<g>[-?.E\d+]+)\n'
374
+ r'\s+VOL\s+=\s+(?P<vol>[-?.E\d+]+)\n'
375
+ r'\s+L\s+=\s+(?P<l>[-?.E\d+]+)\n'
376
+ r'\s+WA\s+=\s+(?P<wa>[-?.E\d+]+)')
377
377
 
378
378
  regex_nondim = re.compile(nondim_string)
379
379
 
wawi/plot.py CHANGED
@@ -9,9 +9,9 @@ from scipy.interpolate import RectBivariateSpline, interp1d
9
9
 
10
10
  def plot_ads(ad_dict, v, terms='stiffness', num=None, test_v=dict(), test_ad=dict(), zasso_type=False, ranges=None):
11
11
  # v: v or K
12
- if terms is 'stiffness':
12
+ if terms == 'stiffness':
13
13
  terms = [['P4', 'P6', 'P3'], ['H6', 'H4', 'H3'], ['A6', 'A4', 'A3']]
14
- elif terms is 'damping':
14
+ elif terms == 'damping':
15
15
  terms = [['P1', 'P5', 'P2'], ['H5', 'H1', 'H2'], ['A5', 'A1', 'A2']]
16
16
 
17
17
  # Create exponent defs for K_normalized plotting
@@ -60,9 +60,9 @@ def plot_ads(ad_dict, v, terms='stiffness', num=None, test_v=dict(), test_ad=dic
60
60
 
61
61
  for col_ix in range(len(terms)):
62
62
  if zasso_type:
63
- ax[-1, col_ix].set_xlabel('$K$')
63
+ ax[-1, col_ix].set_xlabel(r'$K$')
64
64
  else:
65
- ax[-1, col_ix].set_xlabel('$V/(B\cdot \omega)$')
65
+ ax[-1, col_ix].set_xlabel(r'$V/(B\cdot \omega)$')
66
66
 
67
67
  fig.tight_layout()
68
68
  return fig, ax
@@ -98,7 +98,7 @@ def plot_dir_and_crests(theta0, Tp, arrow_length=100, origin=np.array([0,0]),
98
98
  wave_length = 2*np.pi/get_kappa(2*np.pi/Tp, U=0.0)
99
99
 
100
100
  plt.arrow(origin[0],origin[1], arrow_length*v[0], arrow_length*v[1], **arr_opts)
101
- plt.text(origin[0], origin[1], f'$\\theta_0$ = {theta0}$^o$\n $T_p$={Tp} s\n $\lambda=${wave_length:.0f} m')
101
+ plt.text(origin[0], origin[1], f'$\\theta_0$ = {theta0}$^o$\n $T_p$={Tp} s\n $\\lambda=${wave_length:.0f} m')
102
102
 
103
103
  dv = v*wave_length
104
104
  for n in range(n_repeats):
@@ -317,7 +317,10 @@ def _set_axes_radius(ax, origin, radius):
317
317
  ax.set_ylim3d([y - radius, y + radius])
318
318
  ax.set_zlim3d([z - radius, z + radius])
319
319
 
320
- def equal_3d(ax=plt.gca()):
320
+ def equal_3d(ax=None):
321
+ if ax is None:
322
+ ax = plt.gca()
323
+
321
324
  x_lims = np.array(ax.get_xlim())
322
325
  y_lims = np.array(ax.get_ylim())
323
326
  z_lims = np.array(ax.get_zlim())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: wawi
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: WAve and WInd response prediction
5
5
  Author-email: "Knut A. Kvåle" <knut.a.kvale@ntnu.no>, Ole Øiseth <ole.oiseth@ntnu.no>, Aksel Fenerci <aksel.fenerci@ntnu.no>, Øivind Wiig Petersen <oyvind.w.petersen@ntnu.no>
6
6
  License: MIT License
@@ -1,10 +1,10 @@
1
- wawi/__init__.py,sha256=ZGsScT_c7WfnnnPCIKTMq2u95I502YsW9e2AXSVKAaY,158
1
+ wawi/__init__.py,sha256=oZOxto9PG8WxUfEE02tcFY0o5-yLRR8lK8WXH30zxDE,158
2
2
  wawi/fe.py,sha256=22QKI1GlfsG7o_TpFXaKJfzmbO2_2zdIMaoJmaIZdmY,4001
3
3
  wawi/general.py,sha256=xHRoDkcchrL6Y7pTUqGsjBHh8YBLvX9dYcNXXCjQap8,13787
4
4
  wawi/identification.py,sha256=bVB6EVRR6J39OO9ckuzNJ6f0FwIo4cLqfYgrsIN89TE,1748
5
- wawi/io.py,sha256=5p3q_lQStQR85yo5hZ1Syl25RS2C__zIyV6e_2qRRw4,25308
5
+ wawi/io.py,sha256=NrziwlebaZUEdu8nWKNXKExHNZZKMzJ0gSHciBTJ4As,25323
6
6
  wawi/modal.py,sha256=WjNGFsk0C3tYRy18Q9WNRCatmGJtq1JSv0WrkGV02Eo,20247
7
- wawi/plot.py,sha256=XVaQjkjXv26Kt-G8xtAULa4KbWcCIErTQfB6euPACLg,19750
7
+ wawi/plot.py,sha256=jllJcjZxTBqjzBoT4k9jLXVUnie8oqNr8371IJvCd3c,19791
8
8
  wawi/prob.py,sha256=0nCdKdwkNf4M6sHyCZuYlt06gD0NmqRNfl4KesgySWA,215
9
9
  wawi/random.py,sha256=MHPpyTlRJSJFkCmeTAmw4Q5K1BPoFVb0Nxg0jDhkuIM,871
10
10
  wawi/signal.py,sha256=9HJs7VUhXOccuYPo12A0IUVoBIAJ2e_9F3rL-q3JuP4,1179
@@ -14,8 +14,8 @@ wawi/tools.py,sha256=-hFBvf0qK4AMn2MQRhrOitDMMMKm2QuRkVfbPBefEkQ,332
14
14
  wawi/wave.py,sha256=hhKg3KhKMBhOoCI7g8PFOGUbYgVhDyGmnYdBEdJ8mkY,16064
15
15
  wawi/wind.py,sha256=1rUqiEdMaUrhprs87TBdX24l1uDCOINaYkBChMLYWso,38208
16
16
  wawi/wind_code.py,sha256=8OKLPpqc84obNNKBoYb2NunKjcn6a3i_pAWpIFEwg4Q,223
17
- wawi-0.0.7.dist-info/LICENSE,sha256=bH1aWhrNbbPLrYnVFRaoYYzcUr-figHjry-kGB7Tc54,1076
18
- wawi-0.0.7.dist-info/METADATA,sha256=8rKv08-csO88ctlULuHEvJ0CPGLeIPmwh-5LiWi71SE,5197
19
- wawi-0.0.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
20
- wawi-0.0.7.dist-info/top_level.txt,sha256=sE2NH_xVXnDKTGeIYzeX5IyU_j5vYDLl32v5uLiOMT4,5
21
- wawi-0.0.7.dist-info/RECORD,,
17
+ wawi-0.0.8.dist-info/LICENSE,sha256=bH1aWhrNbbPLrYnVFRaoYYzcUr-figHjry-kGB7Tc54,1076
18
+ wawi-0.0.8.dist-info/METADATA,sha256=nlNip0I5cZlcT3lgLf5lXTysEeQ2y8nSVMapDTvoXlA,5197
19
+ wawi-0.0.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
20
+ wawi-0.0.8.dist-info/top_level.txt,sha256=sE2NH_xVXnDKTGeIYzeX5IyU_j5vYDLl32v5uLiOMT4,5
21
+ wawi-0.0.8.dist-info/RECORD,,
File without changes
File without changes