Skip to content

Commit

Permalink
add parameters to layergenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-urban committed Jan 10, 2025
1 parent 2a880cd commit 7c051f2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import themachinethatgoesping as theping

class LayerGenerator:
def __init__(self, echogram_base, echogram_second, cut_in_range=True):
def __init__(self, echogram_base, echogram_second, cut_in_range=True, minslant_relative=0.95, minslant_absolute=-0.5):
echogram_base.clear_layers()
echogram_second.clear_layers()

if echogram_base.y_axis_name != 'Range (m)':
echogram_base.set_y_axis_range()

self.valid = theping.pingprocessing.watercolumn.echograms.layers.EchoLayer.from_ping_param_offsets_relative(echogram_base, 'minslant', None, 0.95)
self.valid.combine(theping.pingprocessing.watercolumn.echograms.layers.EchoLayer.from_ping_param_offsets_absolute(echogram_base, 'minslant', None, -0.5))
self.valid = theping.pingprocessing.watercolumn.echograms.layers.EchoLayer.from_ping_param_offsets_relative(echogram_base, 'minslant', None, minslant_relative)
self.valid.combine(theping.pingprocessing.watercolumn.echograms.layers.EchoLayer.from_ping_param_offsets_absolute(echogram_base, 'minslant', None, minslant_absolute))
self.valid.combine(theping.pingprocessing.watercolumn.echograms.layers.EchoLayer.from_ping_param_offsets_relative(echogram_base, 'bubbles', 1, None))

self.cut_in_range = cut_in_range
Expand Down

0 comments on commit 7c051f2

Please sign in to comment.