Skip to content

Commit 56bfc71

Browse files
committed
replace echogrambuilder with echogrambuilder new
1 parent ba58874 commit 56bfc71

5 files changed

Lines changed: 3529 additions & 4788 deletions

File tree

python/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ sources = [
6969
'themachinethatgoesping/pingprocessing/watercolumn/echograms/coordinate_system.py',
7070
'themachinethatgoesping/pingprocessing/watercolumn/echograms/echodata.py',
7171
'themachinethatgoesping/pingprocessing/watercolumn/echograms/echogrambuilder.py',
72-
'themachinethatgoesping/pingprocessing/watercolumn/echograms/echogrambuilder_new.py',
7372
'themachinethatgoesping/pingprocessing/watercolumn/echograms/indexers.py',
7473
'themachinethatgoesping/pingprocessing/watercolumn/echograms/layers/__init__.py',
7574
'themachinethatgoesping/pingprocessing/watercolumn/echograms/layers/echolayer.py',

python/tests/watercolumn/echograms/test_combine_from_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from themachinethatgoesping.pingprocessing.watercolumn.echograms.backends.image_backend import (
1616
ImageBackend,
1717
)
18-
from themachinethatgoesping.pingprocessing.watercolumn.echograms.echogrambuilder_new import (
18+
from themachinethatgoesping.pingprocessing.watercolumn.echograms.echogrambuilder import (
1919
EchogramBuilder,
2020
)
2121

python/themachinethatgoesping/pingprocessing/watercolumn/echograms/__init__.py

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,12 @@
66

77
# functions
88
from .echodata import EchoData
9-
from .echogrambuilder import EchogramBuilder
109

1110
# backends (convenience exports)
1211
from .backends import EchogramDataBackend, PingDataBackend, ZarrDataBackend
1312

1413
# New refactored classes
1514
from .coordinate_system import EchogramCoordinateSystem
16-
from .echogrambuilder_new import EchogramBuilder as EchogramBuilderNew
15+
from .echogrambuilder import EchogramBuilder
1716
from .indexers import EchogramImageRequest
1817

19-
20-
def is_new_builder(echogram) -> bool:
21-
"""Check if an echogram instance is the new EchogramBuilderNew with LayerManager.
22-
23-
Args:
24-
echogram: An EchogramBuilder or EchogramBuilderNew instance.
25-
26-
Returns:
27-
True if using EchogramBuilderNew (with LayerManager), False otherwise.
28-
"""
29-
return hasattr(echogram, '_layer_manager')
30-
31-
32-
def is_refactored_builder(echogram) -> bool:
33-
"""Check if an echogram instance uses the refactored builder with separate coordinate system.
34-
35-
Args:
36-
echogram: An EchogramBuilder instance.
37-
38-
Returns:
39-
True if using EchogramBuilderRefactored (with separate coord_system), False otherwise.
40-
"""
41-
return hasattr(echogram, '_coord_system')
42-
43-
44-
def has_layers(echogram) -> bool:
45-
"""Check if an echogram has any layers (works with both builder types).
46-
47-
Args:
48-
echogram: An EchogramBuilder or EchogramBuilderNew instance.
49-
50-
Returns:
51-
True if there are named layers or a main layer.
52-
"""
53-
if is_new_builder(echogram):
54-
return echogram._layer_manager.has_layers()
55-
else:
56-
return len(echogram.layers.keys())>0 or echogram.main_layer is not None
57-

0 commit comments

Comments
 (0)