Skip to content

Commit 747f93e

Browse files
switch get_table to to_table #360
There was a mix of `get_table` and `to_table` already driving `protocol.to_table`. Since the `get_table` methods were all lower-level, I've switched everything to be `to_table`.
1 parent c96a978 commit 747f93e

16 files changed

Lines changed: 25 additions & 25 deletions

File tree

src/openlifu/bf/apod_methods/apodmethod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def from_dict(d):
3232
return class_constructor(**d)
3333

3434
@abstractmethod
35-
def get_table(self):
35+
def to_table(self):
3636
"""
3737
Get a table of the apodization method parameters
3838

src/openlifu/bf/apod_methods/maxangle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def calc_apodization(self, arr: Transducer, target: Point, params: xa.Dataset, t
3737
apod[angles <= self.max_angle] = 1
3838
return apod
3939

40-
def get_table(self):
40+
def to_table(self):
4141
"""
4242
Get a table of the apodization method parameters
4343

src/openlifu/bf/apod_methods/piecewiselinear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def calc_apodization(self, arr: Transducer, target: Point, params: xa.Dataset, t
4747
apod = np.maximum(0, np.minimum(1, f))
4848
return apod
4949

50-
def get_table(self):
50+
def to_table(self):
5151
"""
5252
Get a table of the apodization method parameters
5353

src/openlifu/bf/apod_methods/uniform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Uniform(ApodizationMethod):
2020
def calc_apodization(self, arr: Transducer, target: Point, params: xa.Dataset, transform:np.ndarray | None=None):
2121
return np.full(arr.numelements(), self.value)
2222

23-
def get_table(self):
23+
def to_table(self):
2424
"""
2525
Get a table of the apodization method parameters
2626

src/openlifu/bf/delay_methods/delaymethod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def from_dict(d):
3131
return class_constructor(**d)
3232

3333
@abstractmethod
34-
def get_table(self):
34+
def to_table(self):
3535
"""
3636
Get a table of the delay method parameters
3737

src/openlifu/bf/delay_methods/direct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def calc_delays(self, arr: Transducer, target: Point, params: xa.Dataset | None=
3636
delays = max(tof) - tof
3737
return delays
3838

39-
def get_table(self):
39+
def to_table(self):
4040
"""
4141
Get a table of the delay method parameters
4242

src/openlifu/bf/focal_patterns/focal_pattern.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def from_dict(d):
7474
return class_constructor(**d)
7575

7676
@abstractmethod
77-
def get_table(self):
77+
def to_table(self):
7878
"""
7979
Get a table of the focal pattern parameters
8080

src/openlifu/bf/focal_patterns/single.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def num_foci(self):
3030
"""
3131
return 1
3232

33-
def get_table(self):
33+
def to_table(self):
3434
"""
3535
Get a table of the focal pattern parameters
3636

src/openlifu/bf/focal_patterns/wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def num_foci(self) -> int:
7171
"""
7272
return int(self.center) + self.num_spokes
7373

74-
def get_table(self):
74+
def to_table(self):
7575
"""
7676
Get a table of the focal pattern parameters
7777

src/openlifu/bf/pulse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def calc_time(self, dt: float):
5151
"""
5252
return np.arange(0, self.duration, dt)
5353

54-
def get_table(self):
54+
def to_table(self):
5555
"""
5656
Get a table of the pulse parameters
5757

0 commit comments

Comments
 (0)