Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions moorpy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1868,6 +1868,12 @@ def read_mooring_file(dirName,fileName):

data2 = np.array(data)

# Check if *** characters in data2 and if so replace with 0
for i in range(len(data2)):
for j in range(len(data2[i])):
if data2[i][j].count('***') > 0:
data2[i][j] = '0.0'

data3 = data2.astype(float)

return data3, ch, channels, units
Expand Down
3 changes: 2 additions & 1 deletion moorpy/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def __init__(self, mooringSys, num, L, lineType, nSegs=100, cb=0, isRod=0, attac
self.type = lineType # dictionary of a System.lineTypes entry
self.cost = {} # empty dictionary to contain cost information

self.EA = self.type['EA'] # use the default stiffness value for now (may be modified if using nonlinear elasticity) [N]
if not self.isRod:
self.EA = self.type['EA'] # use the default stiffness value for now (may be modified if using nonlinear elasticity) [N]

self.nNodes = int(nSegs) + 1
self.cb = float(cb) # friction coefficient (will automatically be set negative if line is fully suspended)
Expand Down
2 changes: 1 addition & 1 deletion moorpy/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -4148,7 +4148,7 @@ def animateLines(self, figure=None, axis=None, color=None, interval=200, repeat=
# Animation: update the figure with the updated coordinates from update_Coords function
# NOTE: the animation needs to be stored in a variable, return out of the method, and referenced when calling self.animatelines()
line_ani = animation.FuncAnimation(fig, self.updateCoords, np.arange(1, nFrames-1, speed), fargs=(colortension, cmap_tension, label, dt),
interval=1, repeat=repeat, repeat_delay=delay, blit=False)
interval=interval, repeat=repeat, repeat_delay=delay, blit=False)
# works well when np.arange(...nFrames...) is used. Others iterable ways to do this

return line_ani
Expand Down
Loading